This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
2021-02-13 20:17:23 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
######################################################################
|
2021-02-15 00:12:27 +01:00
|
|
|
# @author : swytch (adapted from Luke Smith - lukesmith.xyz)
|
2021-02-13 20:17:23 +01:00
|
|
|
# @file : sb-volume
|
2021-02-15 00:37:34 +01:00
|
|
|
# @license : GPLv3
|
2021-02-13 20:17:23 +01:00
|
|
|
# @created : Saturday Feb 13, 2021 17:51:16 CET
|
|
|
|
#
|
|
|
|
# @description : volume block for dwmblocks
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
[ "1" = $(pulsemixer --get-mute) ] && echo "婢 ---" && exit
|
|
|
|
|
|
|
|
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
|
|
|
|
|
|
|
|
if [ "$vol" -gt "70" ]; then
|
|
|
|
icon="墳"
|
|
|
|
elif [ "$vol" -lt "30" ]; then
|
|
|
|
icon="奄"
|
|
|
|
else
|
|
|
|
icon="奔"
|
|
|
|
fi
|
|
|
|
|
|
|
|
printf "%s %3d%%" $icon $vol
|
|
|
|
|