fix somehow? switch is better anyway...

This commit is contained in:
2026-01-06 19:50:17 -08:00
parent 1666ab7065
commit 2c4a7e993e

View File

@ -1,24 +1,26 @@
#!/bin/sh
INCREMENT="2"
if [ "$1" = "up" ]; then
wpctl set-volume @DEFAULT_SINK@ $INCREMENT%+
elif [ "$1" = "down" ]; then
wpctl set-volume @DEFAULT_SINK@ $INCREMENT%-
elif [ "$1" = "mute" ]; then
wpctl set-mute @DEFAULT_SINK@ toggle
fi
case $1 in
"up")
wpctl set-volume @DEFAULT_SINK@ $INCREMENT%+
"down")
wpctl set-volume @DEFAULT_SINK@ $INCREMENT%-
"mute")
wpctl set-mute @DEFAULT_SINK@ toggle
esac
kill -RTMIN+1 $(pidof dwmblocks)
# freebsd
#if [ "$1" = "up" ]; then
# mixer vol.volume=+2% > /dev/null
#elif [ "$1" = "down" ]; then
# mixer vol.volume=-2% > /dev/null
#elif [ "$1" = "mute" ]; then
# mixer vol.mute=toggle > /dev/null
#fi
#case $1 in
# "up")
# mixer vol.volume=+$INCREMENT% > /dev/null;;
# "down")
# mixer vol.volume=-$INCREMENT% > /dev/null;;
# "mute")
# mixer vol.mute=toggle > /dev/null;;
#esac
#
#PID=$(ps aux | grep dwmblocks | awk 'NR==1 {print $2}')
#kill -RTMIN+1 $PID