21 lines
445 B
Bash
Executable File
21 lines
445 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euf -o pipefail
|
|
|
|
function send_notification {
|
|
icon="$HOME/.local/share/icons/Marwaita-Dark/24x24/actions/audio-on.svg"
|
|
dunstify -i "$icon" -r 5555 -u low " $(awk -F"[][]" '/dB/ { print $2 }' <(amixer sget Master))"
|
|
}
|
|
|
|
case $1 in
|
|
up)
|
|
# increase volume by 5%
|
|
amixer sset Master 5%+
|
|
send_notification
|
|
;;
|
|
down)
|
|
# decrease volume by 5%
|
|
amixer sset Master 5%-
|
|
send_notification
|
|
;;
|
|
esac
|