summaryrefslogtreecommitdiff
path: root/scripts/.local/bin/sb-volume
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.local/bin/sb-volume')
-rwxr-xr-xscripts/.local/bin/sb-volume15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/.local/bin/sb-volume b/scripts/.local/bin/sb-volume
new file mode 100755
index 0000000..be07c93
--- /dev/null
+++ b/scripts/.local/bin/sb-volume
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Prints the current volume or MUT if muted.
+
+[ $(pamixer --get-mute) = true ] && echo "MUT" && exit
+
+vol="$(pamixer --get-volume)"
+
+if [ "$vol" -gt "0" ]; then
+ icon=""
+else
+ echo "MUT" && exit
+fi
+
+printf "%3d" $vol