#!/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
