herbstluftwm: panel: add check for cpu-temp coloring
This commit is contained in:
parent
36a56026a1
commit
5cdfeb842a
1 changed files with 6 additions and 1 deletions
|
|
@ -80,7 +80,12 @@ function icon() {
|
|||
# CPU
|
||||
function cpu() {
|
||||
cpu=$(sensors | grep "Core" | cut -b 18-21)
|
||||
echo -n $(icon temp yellow) ${cpu}
|
||||
temp=$(sensors | grep "Physical id 0:" | awk '{print $4}' | cut -b 2-3)
|
||||
if [[ $temp -le 70 ]]; then
|
||||
echo -n $(icon temp brightblue) ${cpu}
|
||||
else
|
||||
echo -n $(icon temp red) ${cpu}
|
||||
fi
|
||||
}
|
||||
|
||||
# BATTERY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue