myhome/.local/bin/sb-volume

8 lines
197 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
print_volume() {
[ "$(pulsemixer --get-mute)" = "1" ] && printf "🔇" && exit
vol=$(pulsemixer --get-volume | awk '{print $1}')
printf "%s%%\\n" "🔊 $vol"
}
print_volume