aboutsummaryrefslogtreecommitdiff
path: root/scripts/stat/vol-stat
diff options
context:
space:
mode:
authorben <ben@nagy.contact>2025-05-03 14:41:13 -0700
committerben <ben@nagy.contact>2025-05-03 14:41:13 -0700
commitea687c769521b3139c8547a2d4a839842fa7b0fe (patch)
treef4805588bb59ca15e96d8b71124c4aafd5dd40cb /scripts/stat/vol-stat
parent16725b034eeb7122f4174f08221ab7f07b6abbf1 (diff)
added scripts
Diffstat (limited to 'scripts/stat/vol-stat')
-rwxr-xr-xscripts/stat/vol-stat12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/stat/vol-stat b/scripts/stat/vol-stat
new file mode 100755
index 0000000..2b15ef6
--- /dev/null
+++ b/scripts/stat/vol-stat
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+perc=$(awk -F"[][]" '/Front Left/ { print $2 }' <(amixer sget Master) | tail -n +2)
+
+case $(awk -F"[][]" '/Front Left/ { print $4 }' <(amixer sget Master) | tail -n +2) in
+ "on")
+ echo "$perc/1"
+ ;;
+ "off")
+ echo "$perc/0"
+ ;;
+esac