dotfiles/dot_config/i3/executable_volumectrl.sh

16 lines
446 B
Bash
Raw Permalink Normal View History

2024-07-13 13:41:00 +03:00
#!/bin/sh
act="$1"; shift;
show_volume_notification() {
volume_percent=$(pamixer --get-volume);
#is_muted=$(pamixer --get-mute);
notify-send -u low -h "int:value:${volume_percent}" -a i3 volume;
}
case "$act" in
inc) pamixer -i 2; show_volume_notification; sfxc play:rs pjsk/slider_up ;;
dec) pamixer -d 2; show_volume_notification; sfxc play:rs pjsk/slider_down ;;
fwd) pamixer "$@"; code="$?"; exit "$code"; ;;
esac;