#!/bin/bash

case $1 in
    +)
        pamixer --unmute --increase 2
        ;;
    -)
        pamixer --unmute --decrease 2
        ;;
    mute)
        pamixer --toggle-mute
        ;;
    *)
        exit 1
        ;;
esac

MUTE=$(pamixer --get-mute)
if [ "$MUTE" == "true" ]; then
    VOLUME=0
else
    VOLUME=$(pamixer --get-volume)
fi

osd_cat --colour=White --shadow 1 --pos bottom --align center --offset 80 --delay=1 -b percentage -P $VOLUME -T "Lautstärke"