summaryrefslogtreecommitdiff
path: root/scripts/Scripts/volume
blob: 2029587daf4c684830b4f1f8ddbefb81302875e1 (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
27
28
29
30
31
32
33
34
#!/usr/bin/env bash

plctl_flags="-i chromium,firefox"

case $1 in
    micmutetoggle)
        pacmd set-source-mute @DEFAULT_SOURCE@ toggle
        ;;
    softmute)
        pacmd set-source-volume @DEFAULT_SOURCE@ 0
        ;;
    softunmute)
        pacmd set-source-volume @DEFAULT_SOURCE@ 69000
        ;;
    volumedown)
        pactl set-sink-volume @DEFAULT_SINK@ -2%
        ;;
    volumeup)
        pactl set-sink-volume @DEFAULT_SINK@ +2%
        ;;
    volumetoggle)
        pactl set-sink-mute @DEFAULT_SINK@ toggle
        ;;

    playtoggle)
        playerctl $plctl_flags play-pause
        ;;
    forward)
        playerctl $plctl_flags next
        ;;
    backward)
        playerctl $plctl_flags previous
        ;;
esac