Compare commits
1 Commits
master
...
80268bcd7b
| Author | SHA1 | Date | |
|---|---|---|---|
| 80268bcd7b |
@@ -123,37 +123,7 @@ riverctl map normal Mod1 F11 enter-mode passthrough
|
|||||||
riverctl map passthrough Mod1 F11 enter-mode normal
|
riverctl map passthrough Mod1 F11 enter-mode normal
|
||||||
|
|
||||||
# Lock screen
|
# Lock screen
|
||||||
#riverctl map normal Mod1+Shift L spawn waylock
|
riverctl map normal Mod1+Shift L spawn waylock
|
||||||
riverctl map normal Mod1+Shift L spawn 'swaylock \
|
|
||||||
--clock \
|
|
||||||
--indicator-idle-visible \
|
|
||||||
--indicator-radius 100 \
|
|
||||||
--indicator-thickness 7 \
|
|
||||||
--ring-color 2D464D \
|
|
||||||
--key-hl-color be5046 \
|
|
||||||
--text-color ffffff \
|
|
||||||
--line-color 00000000 \
|
|
||||||
--inside-color 00000088 \
|
|
||||||
--separator-color 00000000 \
|
|
||||||
--fade-in 0.2 \
|
|
||||||
--effect-blur 7x1 \
|
|
||||||
--image ~/Pictures/bg-astronaut.jpg'
|
|
||||||
|
|
||||||
swayidle \
|
|
||||||
timeout 300 'swaylock \
|
|
||||||
--clock \
|
|
||||||
--indicator-idle-visible \
|
|
||||||
--indicator-radius 100 \
|
|
||||||
--indicator-thickness 7 \
|
|
||||||
--ring-color 2D464D \
|
|
||||||
--key-hl-color be5046 \
|
|
||||||
--text-color ffffff \
|
|
||||||
--line-color 00000000 \
|
|
||||||
--inside-color 00000088 \
|
|
||||||
--separator-color 00000000 \
|
|
||||||
--fade-in 0.2 \
|
|
||||||
--effect-blur 7x1 \
|
|
||||||
--image ~/Pictures/bg-astronaut.jpg' &
|
|
||||||
|
|
||||||
# Various media key mapping examples for both normal and locked mode which do
|
# Various media key mapping examples for both normal and locked mode which do
|
||||||
# not have a modifier
|
# not have a modifier
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
SIG=8
|
|
||||||
|
|
||||||
get_waybar_pid() { pgrep -u "$USER" -x waybar | head -n1 || true; }
|
|
||||||
log() { echo "[waybar-audio-bridge] $*" >&2; }
|
|
||||||
|
|
||||||
WAYBAR_PID=""
|
|
||||||
while [[ -z "$WAYBAR_PID" ]]; do
|
|
||||||
WAYBAR_PID="$(get_waybar_pid)"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
log "connected to Waybar PID $WAYBAR_PID"
|
|
||||||
|
|
||||||
# read pw-mon output, but only care about Audio nodes
|
|
||||||
pw-mon 2>/dev/null | grep --line-buffered -E "Audio|Sink|Source|Stream|Node" | while read -r _; do
|
|
||||||
# small debounce to avoid spamming CPU when multiple updates arrive fast
|
|
||||||
sleep 0.2
|
|
||||||
if ! kill -0 "$WAYBAR_PID" 2>/dev/null; then
|
|
||||||
WAYBAR_PID="$(get_waybar_pid)"
|
|
||||||
[[ -z "$WAYBAR_PID" ]] && continue
|
|
||||||
log "reconnected to Waybar PID $WAYBAR_PID"
|
|
||||||
fi
|
|
||||||
kill -RTMIN+"$SIG" "$WAYBAR_PID" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user