move modules to ./modules

This commit is contained in:
koksnuss
2018-05-14 07:49:04 +02:00
parent a43aa795eb
commit 2077f89897
12 changed files with 9 additions and 2 deletions

27
modules/audio Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
amixer get Master | gawk '
match($0, /\[([0-9]+)\%\] \[(on|off)\]/, matches) {
audio=matches[1]
}
END {
if (matches[2]=="off") {
printf("mute\n")
printf("\n")
exit 33
}
printf("%d%", audio)
print("\n")
if (audio < 75) {
print("#04B431\n")
} else if (audio < 80) {
print("#A8FF00\n")
} else if (audio < 85) {
print("#FFF600\n")
} else if (audio < 90) {
print("#FFAE00\n")
} else if (audio < 95) {
print("#FF0000\n")
} else {
exit 33
}
}'