bdwmb/modules/alsa
Ari Archer df4a3c1dc7
update @ Sat 19 Mar 17:14:52 EET 2022
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
2022-03-19 17:14:52 +02:00

13 lines
306 B
Bash

#!/usr/bin/env sh
# DEPENDS ON: amixer
balsa() {
STATUS="$(amixer sget Master | tail -n1 | sed -r "s/.*\[(.*)\]/\1/")"
VOL="$(amixer get Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/")"
if [ "$STATUS" = "off" ]; then
printf "V MUTE"
else
printf "V %s%%" "$VOL"
fi
}