summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/statusbar/sb-volume5
1 files changed, 3 insertions, 2 deletions
diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume
index 52999f4..acdf7a9 100755
--- a/.local/bin/statusbar/sb-volume
+++ b/.local/bin/statusbar/sb-volume
@@ -19,14 +19,15 @@ vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
[ "$vol" != "${vol%\[MUTED\]}" ] && echo 🔇 && exit
vol="${vol#Volume: }"
+
split() {
# For ommiting the . without calling and external program.
IFS=$2
set -- $1
printf '%s' "$@"
}
-vol="$(split "$vol" ".")"
-vol="${vol##0}"
+
+vol="$(printf "%.0f" "$(split "$vol" ".")")"
case 1 in
$((vol >= 70)) ) icon="🔊" ;;