[[ $(amixer sget Master | tail -n 1 | grep "off") ]] &&
pactl set-sink-mute 0 toggle
pactl set-sink-volume 0 ${1}%
+ mutes="Unmuted"
else
pactl set-sink-mute 0 toggle
+ mutes="Muted"
fi
-notify-send "Volume" "$(amixer sget Master | tail -n 1 | cut -d ' ' -f 7-)" -t 1000
+dunstify -h string:x-canonical-private-synchronous:audio \
+ "Volume" "${mutes}" \
+ -h int:value:"$(amixer sget Master | tail -n 1 | cut -d '[' -f 2 | \
+ head -c +2)" \
+ -t 1000
# Show a notification and change screen brightness
brightnessctl set ${1}
-notify-send "Brightness" "$(brightnessctl | grep % | tail -c +22)" -t 1000
+dunstify -h string:x-canonical-private-synchronous:brightness \
+ "Brightness" "$(brightnessctl | grep % | tail -c +22)" \
+ -h int:value:"$(brightnessctl | grep % | cut -d '(' -f 2 | head -c +3)" \
+ -t 1000