summaryrefslogtreecommitdiff
path: root/echovol
diff options
context:
space:
mode:
Diffstat (limited to 'echovol')
-rwxr-xr-xechovol10
1 files changed, 10 insertions, 0 deletions
diff --git a/echovol b/echovol
new file mode 100755
index 0000000..9845a55
--- /dev/null
+++ b/echovol
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+volume=$(pactl list sinks | grep -A 15 'Sink #0' | grep 'Volume:' | awk '{print $5}' | tr -d '%' | head -1)
+mute=$(pactl list sinks | grep -A 15 'Sink #0' | grep 'Mute' | awk '{print $2}')
+
+if [ "$mute" = "yes" ]; then
+ echo "mute"
+else
+ echo "$volume%"
+fi