Add dotfiles
This commit is contained in:
27
.scripts/audio.sh
Executable file
27
.scripts/audio.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user