summaryrefslogtreecommitdiff
path: root/echovol
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2026-01-18 11:44:26 +0100
committerfilip <“filip.rabiega@gmail.com”>2026-01-18 11:44:26 +0100
commit83954961af8b6337da100e038561f2fd975ac1fe (patch)
tree33a45dbf91cc4c0b8975287b9537db8aa272505f /echovol
parentafd02bfcce54e3252d356f34c25a155c855f3612 (diff)
downloadchadscripts-83954961af8b6337da100e038561f2fd975ac1fe.tar.gz
chadscripts-83954961af8b6337da100e038561f2fd975ac1fe.tar.bz2
chadscripts-83954961af8b6337da100e038561f2fd975ac1fe.zip
huge changesHEADmaster
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