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

24
modules/cpu Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
top -bn1 | gawk '
/^\%CPU/ {
cpu=100-$8
}
END {
printf("%d%", cpu)
print("\n")
if (cpu < 50) {
print("#04B431\n")
} else if (cpu < 60) {
print("#A8FF00\n")
} else if (cpu < 70) {
print("#FFF600\n")
} else if (cpu < 80) {
print("#FFAE00\n")
} else if (cpu < 90) {
print("#FF0000\n")
} else {
exit 33
}
}
'