summaryrefslogtreecommitdiff
path: root/.old/volume
diff options
context:
space:
mode:
Diffstat (limited to '.old/volume')
-rwxr-xr-x.old/volume27
1 files changed, 27 insertions, 0 deletions
diff --git a/.old/volume b/.old/volume
new file mode 100755
index 0000000..4a4b4a8
--- /dev/null
+++ b/.old/volume
@@ -0,0 +1,27 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+cmd="amixer -D pipewire sget Master"
+FS="[][]"
+while (cmd | getline) {
+ if (NF > 1) {
+ vol=int($2)
+ if ($4 == "off")
+ icon="񂁳"
+ else if (vol > 70)
+ icon="񂁲"
+ else if (vol > 40)
+ icon="񂁱"
+ else if (vol > 10)
+ icon="񂁰"
+ else
+ icon="񂁯"
+ #printf "%s %s | %05.2fdB", icon, $2, $4
+ print icon" "$2
+ }
+}
+}
+
+##!/bin/sh
+##amixer sget Master | awk -F'[][]' '/%/{print $2" | "$4 " [" $6 "]"}'
+#amixer -M sget Master | sed -n 's/.*Playback [0-9]* \[//; s/. ./ | /; s/\] .off\]/ \[mute\]/p; s/\] .on.//p'