#!/bin/sh # Check if PulseAudio (or PipeWire pulse server) is running if ! pactl info >/dev/null 2>&1; then notify-send "Volume control failed" "PulseAudio is not running." exit 1 fi case "$1" in up) pactl set-sink-volume @DEFAULT_SINK@ "+5%" && notify-send "Volume increased by 5%" ;; down) pactl set-sink-volume @DEFAULT_SINK@ "-5%" && notify-send "Volume decreased by 5%" ;; mute) pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send "Volume muted/unmuted" ;; *) pactl set-sink-volume @DEFAULT_SINK@ "$1" && notify-send "Volume changed to $1%" ;; esac