durcheinander

This commit is contained in:
koksnuss
2018-05-14 10:11:19 +02:00
parent 2077f89897
commit aa88b06bbc
4 changed files with 25 additions and 39 deletions

View File

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