dotfiles/river-classic/.config/river/volume.sh

11 lines
246 B
Bash
Executable file

#!/bin/sh
wobsock=$XDG_RUNTIME_DIR/wob.sock
if [ $1 = "up" ]; then
wpctl set-volume @DEFAULT_AUDIO_SINK@ "$2+"
else
wpctl set-volume @DEFAULT_AUDIO_SINK@ "$2-"
fi
wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/Volume: 0.//' > $wobsock