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