Space in the panel is valuable, show only the 1-min load

This commit is contained in:
Tobias Schmidl 2020-09-21 08:06:47 +02:00
parent f8061c5ea7
commit 7005c74795

View file

@ -4,9 +4,9 @@ RED_GREEN_THEME=("#d73027" "#fc8d59" "#fee08b" "#d9ef8b" "#91cf60" "#1a9850")
ORIGINAL_THEME=("#acacac" "#ff0101" "#cc673b" "#ce8458" "#6bbb15" "#0ed812") ORIGINAL_THEME=("#acacac" "#ff0101" "#cc673b" "#ce8458" "#6bbb15" "#0ed812")
COLORS=(${RED_GREEN_THEME[@]}) COLORS=(${RED_GREEN_THEME[@]})
LOADAVG=$(cut -d' ' -f 1-3 /proc/loadavg) LOADAVG=$(cut -d' ' -f 1 /proc/loadavg)
CORES=$(grep -c processor /proc/cpuinfo) CORES=$(grep -c processor /proc/cpuinfo)
LOAD_PER_CORE=$(echo "${LOADAVG% * *} 100 * $CORES / p" | dc) LOAD_PER_CORE=$(echo "${LOADAVG} 100 * $CORES / p" | dc)
case $LOAD_PER_CORE in case $LOAD_PER_CORE in
[0-9]|[0-4][0-9]) [0-9]|[0-4][0-9])