#!/bin/sh # how much should we # in-/decrement at a time? VOLUME_STEP="1" # interrupt signal SIGNAL="10" # status bar program STATUS="scells" case $1 in "inc") wpctl set-volume $2 "${VOLUME_STEP}"%+ && pkill -SIGRTMIN+"${SIGNAL}" "${STATUS}" ;; "dec") wpctl set-volume $2 "${VOLUME_STEP}"%- && pkill -SIGRTMIN+"${SIGNAL}" "${STATUS}" ;; "tgl") wpctl set-mute $2 toggle && pkill -SIGRTMIN+"${SIGNAL}" "${STATUS}" ;; *) echo "Usage: $0 " echo " is one of:" echo "inc increase 's volume by \${VOLUME_STEP}" echo "dec decrease 's volume by \${VOLUME_STEP}" echo "tgl toggle 's mute state" ;; esac