#!/bin/bash # Usage: # The first argument is the percentage by which you should # change the volume # The second argument should be `+` or `-` # to choose wether to increment or decrement audio. # If no second argument is given, the audio will be SET # to a set percentage fixed by the first argument. case "$1" in mute) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle ;; *) pcnt="$1" sign="$2" wpctl set-volume @DEFAULT_AUDIO_SINK@ "$pcnt%$sign" ;; esac notify-send.sh -t 1000 --replace-file /tmp/vol-notif -a $(wpctl get-volume @DEFAULT_AUDIO_SINK@)