28 lines
554 B
Bash
Executable File
28 lines
554 B
Bash
Executable File
#!/bin/bash
|
|
|
|
current_volume=$(pamixer --get-volume)
|
|
|
|
case $1 in
|
|
"raise")
|
|
(( current_volume += 5 ))
|
|
[[ current_volume -gt 100 ]] && current_volume=100
|
|
|
|
pamixer --set-volume $current_volume
|
|
notify-send -t 250 "VOL: $current_volume"
|
|
pkill -RTMIN+1 i3blocks
|
|
;;
|
|
"lower")
|
|
(( current_volume -= 5 ))
|
|
[[ current_volume -lt 0 ]] && current_volume=0
|
|
|
|
pamixer --set-volume $current_volume
|
|
notify-send -t 250 "VOL: $current_volume"
|
|
pkill -RTMIN+1 i3blocks
|
|
;;
|
|
"toggle_mute")
|
|
pamixer --toggle-mute
|
|
notify-send -t 300 "MUTE: $(pamixer --get-mute)"
|
|
;;
|
|
esac
|
|
|