summaryrefslogtreecommitdiff
path: root/slstatus/components/pixVol.sh
diff options
context:
space:
mode:
authorcoasteen <coasteen@proton.me>2026-07-09 10:42:28 +0330
committercoasteen <coasteen@proton.me>2026-07-09 10:42:28 +0330
commit8cbadb61604667b407b53ee1258433994fa4765a (patch)
tree97765fb29418fd6278fcb4cbb9760893afaf7a58 /slstatus/components/pixVol.sh
Diffstat (limited to 'slstatus/components/pixVol.sh')
-rwxr-xr-xslstatus/components/pixVol.sh10
1 files changed, 10 insertions, 0 deletions
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