This repository has been archived on 2020-09-29. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dotfiles_old/scripts/audio.sh
2018-08-01 02:01:42 +03:00

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