#!/bin/sh
INCREMENT="2"

case $1 in
  "up")
    wpctl set-volume @DEFAULT_SINK@ $INCREMENT%+
  "down")
    wpctl set-volume @DEFAULT_SINK@ $INCREMENT%-
  "mute")
    wpctl set-mute @DEFAULT_SINK@ toggle
esac

kill -RTMIN+1 $(pidof dwmblocks)

# freebsd
#case $1 in
#  "up")
#    mixer vol.volume=+$INCREMENT% > /dev/null;;
#  "down")
#    mixer vol.volume=-$INCREMENT% > /dev/null;;
#  "mute")
#    mixer vol.mute=toggle > /dev/null;;
#esac
#
#PID=$(ps aux | grep dwmblocks | awk 'NR==1 {print $2}')
#kill -RTMIN+1 $PID
