This commit is contained in:
2025-02-07 22:29:57 -05:00
parent 8dd6f08304
commit 9426dc77a7
9 changed files with 79 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env sh
count=$(wpctl get-volume @DEFAULT_SINK@ | sed 's/Volume: //g' | sed -E 's/0\.0?//g')
#!/usr/bin/env bash
count=$(wpctl get-volume @DEFAULT_SINK@ | cut -d' ' -f2- | sed -E 's/\.//g' | sed 's/^0*//g')
color="green"
if ((count > 75)); then color="yellow"; fi
if ((count > 90)); then color="peach"; fi

View File

@@ -130,7 +130,7 @@
(defwidget volume []
(eventbox :tooltip volumesink
:onclick `pwvucontrol &`
(label :text "${volumevalue.count}%" :class {volumevalue.color})))
(label :text "${volumevalue.count}" :class {volumevalue.color})))
(defpoll currentworkspace :interval "1s" `scripts/currentWorkspace.fish`)