summaryrefslogtreecommitdiff
path: root/slstatus/components/pixVol.sh
diff options
context:
space:
mode:
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