mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
17 lines
367 B
Bash
Executable File
17 lines
367 B
Bash
Executable File
#!/bin/sh
|
|
|
|
mute=$(pactl get-sink-mute @DEFAULT_SINK@ 2>/dev/null | awk '{print $2}')
|
|
vol=$(pactl get-sink-volume @DEFAULT_SINK@ 2>/dev/null | awk '/Volume:/ {print $5; exit}')
|
|
|
|
[ -n "$vol" ] || exit 0
|
|
|
|
if [ "$mute" = "yes" ]; then
|
|
text="VOL mute"
|
|
color="#7aa2f7"
|
|
else
|
|
text="VOL $vol"
|
|
color="#c0caf5"
|
|
fi
|
|
|
|
printf '%s\n%s\n%s\n' "$text" "$text" "$color"
|