This repository has been archived on 2019-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
2018-05-13 21:02:36 +02:00

23 lines
539 B
Bash
Executable File

#!/bin/bash
amixer get Master | gawk '
match($0, /\[([0-9]+)\%\]/, matches) {
audio=matches[1]
}
END {
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
}
}'