#!/bin/bash

vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%')
mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')

icons=(" " "" "" " ")

if [ "$mute" = "yes" ]; then
    icon="${icons[0]}"
elif [ "$vol" -ge 50 ]; then
    icon="${icons[3]}"
elif [ "$vol" -ge 25 ]; then
    icon="${icons[2]}"
elif [ "$vol" -gt 0 ]; then
    icon="${icons[1]}"
else
    icon="${icons[0]}"
fi

echo "$icon $vol%"
