diff options
Diffstat (limited to 'dot/local/bin')
-rwxr-xr-x | dot/local/bin/pavol | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dot/local/bin/pavol b/dot/local/bin/pavol index f269669..c88437c 100755 --- a/dot/local/bin/pavol +++ b/dot/local/bin/pavol | |||
@@ -17,6 +17,15 @@ set_volume() # uses $sink | |||
17 | pactl set-sink-volume "$sink" "$1"% | 17 | pactl set-sink-volume "$sink" "$1"% |
18 | } | 18 | } |
19 | 19 | ||
20 | mute() # uses $sink | ||
21 | { | ||
22 | case "$1" in | ||
23 | toggle|'') pactl set-sink-mute "$sink" toggle ;; | ||
24 | on|1) pactl set-sink-mute "$sink" 1 ;; | ||
25 | off|0) pactl set-sink-mute "$sink" 0 ;; | ||
26 | esac | ||
27 | } | ||
28 | |||
20 | show_volume_line() # uses $sink | 29 | show_volume_line() # uses $sink |
21 | { | 30 | { |
22 | local want_next= | 31 | local want_next= |
@@ -54,6 +63,8 @@ case "$1" in | |||
54 | [0-9]*) set_volume "$1" ;; | 63 | [0-9]*) set_volume "$1" ;; |
55 | [-+*/][0-9]*) set_volume $(( $(show_volume_number) $1 )) ;; | 64 | [-+*/][0-9]*) set_volume $(( $(show_volume_number) $1 )) ;; |
56 | '') show_volume_number ;; | 65 | '') show_volume_number ;; |
66 | --mute=*) mute "${1%mute=}" ;; | ||
67 | --mute) mute "$2" ;; | ||
57 | *) die 'usage' ;; | 68 | *) die 'usage' ;; |
58 | esac | 69 | esac |
59 | 70 | ||