summaryrefslogtreecommitdiffstats
path: root/local/bin/network_control.sh
blob: 381cbec9f38376fe22ec05dbbf9405040cbb0842 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

signal=30

# signal dwmblocks to update volume block
send_signal() {
    pkill -RTMIN+$signal dwmblocks
}

case $1 in
    inc) pactl set-sink-volume @DEFAULT_SINK@ +$delta% ;;
    dec) pactl set-sink-volume @DEFAULT_SINK@ -$delta% ;;
    mutetoggle) pactl set-sink-mute @DEFAULT_SINK@ toggle ;;
    deafentoggle) pactl set-source-mute @DEFAULT_SOURCE@ toggle ;;
    *)
        echo Wifi:
        echo -e "\nBluetooth:"
        bluetoothctl show
        echo -e "\nEthernet:"
        ;;
esac

send_signal