16 lines
446 B
Bash
16 lines
446 B
Bash
#!/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;
|