Files
dotfiles/bin/notify-on-volume

15 lines
389 B
Bash
Executable File

#! /bin/bash
msgId="991049"
volume=$(pamixer --get-volume)
mute=$(pamixer --get-mute)
if [[ $volume == 0 || "$mute" == "true" ]]; then
# Show the sound muted notification
dunstify -a "notify-on-volume" -u low -r "$msgId" "Volume muted"
else
# Show the volume notification
dunstify -a "notify-on-volume" -u low -r "$msgId" -h int:value:"$volume" "Volume: ${volume}%"
fi