From 8cbadb61604667b407b53ee1258433994fa4765a Mon Sep 17 00:00:00 2001 From: coasteen Date: Thu, 9 Jul 2026 10:42:28 +0330 Subject: init --- slstatus/components/pixVol.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 slstatus/components/pixVol.sh (limited to 'slstatus/components/pixVol.sh') diff --git a/slstatus/components/pixVol.sh b/slstatus/components/pixVol.sh new file mode 100755 index 0000000..8f59505 --- /dev/null +++ b/slstatus/components/pixVol.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '\d+%' | head -n 1 | tr -d '%') +muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') + +if [ "$muted" = "yes" ]; then + echo "Muted" +else + echo "${volume}" +fi -- cgit v1.2.3