mittags sprint

This commit is contained in:
koksnuss
2018-05-14 14:08:47 +02:00
parent 7b368aba19
commit 2f1e471eb1
9 changed files with 156 additions and 89 deletions

View File

@ -1,21 +1,21 @@
#!/bin/bash
case ${BLOCK_INSTANCE} in
mic) DEV="Capture";;
*) DEV="Master";;
esac
[[ ${BLOCK_BUTTON} == 1 ]] && amixer set $DEV toggle &> /dev/null
[[ $BLOCK_INSTANCE == "mic" ]] && DEV="Capture" || DEV="Master"
[[ $BLOCK_BUTTON == 1 ]] && amixer set $DEV toggle &> /dev/null
amixer get $DEV | gawk '
match($0, /\[([0-9]+)\%\] \[(on|off)\]/, matches) {
audio=matches[1]
}
END {
if (matches[2]=="off") {
print("off \n")
print("off \n")
if (matches[2] == "off") {
print(" off \n")
print("off\n")
exit 33
}
printf("%d% \n", audio)
printf("%d\n", audio)
printf("%d%\n", audio)
if (audio < 75) {
print("#04B431\n")
} else if (audio < 80) {