fix(waybar): mic icon centering and change to event-driven updating
This commit is contained in:
18
.config/waybar/scripts/micmute.sh
Executable file
18
.config/waybar/scripts/micmute.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
print_icon() {
|
||||
if wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# Print once on startup
|
||||
print_icon
|
||||
|
||||
# Subscribe to PipeWire events
|
||||
wpctl subscribe @DEFAULT_AUDIO_SOURCE@ | while read -r _; do
|
||||
print_icon
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user