feat(waybar): add config
This commit is contained in:
12
waybar/scripts/mic-status.sh
Executable file
12
waybar/scripts/mic-status.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# mic volume for waybar custom module
|
||||
|
||||
vol=$(pamixer --default-source --get-volume 2>/dev/null || echo 0)
|
||||
muted=$(pamixer --default-source --get-mute 2>/dev/null || echo false)
|
||||
|
||||
if [[ "$muted" == "true" ]]; then
|
||||
printf '{"text": "", "class": "muted", "tooltip": "mic muted"}\n'
|
||||
else
|
||||
printf '{"text": " %d%%", "class": "", "tooltip": "mic %d%%"}\n' "$vol" "$vol"
|
||||
fi
|
||||
Reference in New Issue
Block a user