#!/usr/bin/env sh
######################################################################
# @author : swytch (adapted from Luke Smith - lukesmith.xyz)
# @file : sb-volume
# @license : GPLv3
# @created : Saturday Feb 13, 2021 17:51:16 CET
#
# @description : volume block for dwmblocks
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
if [ "1" = $(pulsemixer --get-mute) ]; then
icon=""
else
if [ "$vol" -gt "70" ]; then
icon=""
elif [ "$vol" -lt "30" ]; then
icon=""
icon=""
fi
printf " %s %3d%% " $icon $vol