summaryrefslogtreecommitdiff
path: root/bin/volumectl
blob: e48a228037899b9aa098a13893e40407c3b5431a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
INCREMENT="2"

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
#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=$(pgrep dwmblocks)
#kill -RTMIN+1 $PID