diff options
author | ben <ben@nagy.contact> | 2025-01-10 11:14:29 -0800 |
---|---|---|
committer | ben <ben@nagy.contact> | 2025-01-10 11:14:29 -0800 |
commit | fb4f206e21cc2853e904e8e548b3d4450b208c8d (patch) | |
tree | 92044e436174b598bbb831473412ee4382a05396 /scripts/stat/vol-stat | |
parent | 7339a5dae5f48ba37d44094f8aaa9915695f86e5 (diff) |
added scriptsmain
Diffstat (limited to 'scripts/stat/vol-stat')
-rwxr-xr-x | scripts/stat/vol-stat | 12 |
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 |