summaryrefslogtreecommitdiff
path: root/kolwynia/home/bdunahu/files/.config/eww/scripts/getvol
diff options
context:
space:
mode:
authorbdunahu <bdunahu@operationnull.com>2026-01-04 13:13:39 -0700
committerbdunahu <bdunahu@operationnull.com>2026-01-04 13:13:39 -0700
commitc2b706ff2f3aa42d58a03febad1d1b8f8d5a1142 (patch)
treed6786f531f02717472abdc992cc6c6ef81e660b3 /kolwynia/home/bdunahu/files/.config/eww/scripts/getvol
parentc4ca05231236c7e9bdf5304275eadde954acf588 (diff)
remove unnecessary nested guix dir
Diffstat (limited to 'kolwynia/home/bdunahu/files/.config/eww/scripts/getvol')
-rwxr-xr-xkolwynia/home/bdunahu/files/.config/eww/scripts/getvol9
1 files changed, 9 insertions, 0 deletions
diff --git a/kolwynia/home/bdunahu/files/.config/eww/scripts/getvol b/kolwynia/home/bdunahu/files/.config/eww/scripts/getvol
new file mode 100755
index 0000000..9fbe60f
--- /dev/null
+++ b/kolwynia/home/bdunahu/files/.config/eww/scripts/getvol
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+RUNNING_SINK=$(pactl list sinks | awk '
+ /^Sink #/ {sink=$2}
+ /State: RUNNING/ {print sink}
+' | head -n1)
+
+pactl list sinks | grep -A 20 "^Sink $RUNNING_SINK" | grep '^[[:space:]]Volume:' | \
+ head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'