25 lines
567 B
Bash
Executable File
25 lines
567 B
Bash
Executable File
#!/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
|
|
|
|
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
|
|
#
|
|
#PID=$(ps aux | grep dwmblocks | awk 'NR==1 {print $2}')
|
|
#kill -RTMIN+1 $PID
|