#!/bin/bash case "${1:-}" in up) pamixer -i 5 ;; down) pamixer -d 5 ;; mute) pamixer -t ;; *) echo "usage: $0 up|down|mute" >&2; exit 1 ;; esac if [ "$(pamixer --get-mute)" = "true" ]; then notify-send -h string:x-canonical-private-synchronous:volume \ -h int:value:0 \ -t 1500 \ "Muted" else LEVEL=$(pamixer --get-volume) notify-send -h string:x-canonical-private-synchronous:volume \ -h int:value:"$LEVEL" \ -t 1500 \ "Volume: ${LEVEL}%" fi