#!/bin/sh -e # pactl 15.0 compiled+linked with libpulse 15.0.0 case "$argv1" in a*) pactl set-sink-volume @DEFAULT_SINK@ $2% exit $? ;; s*) # really hacky, gets the job done # gets the volume % of Lchan specifically pactl get-sink-volume @DEFAULT_SINK@ \ | sed q \ | cut -d '/' -f 2 \ | xargs echo \ | sed s/'%'// ;; esac exit 1