config: barpyrus: config.py: add colorized cpu temperature to conky

Adds cpu temperature to the conky configuration of barpyrus. If the
temperature has reached a specific value, change the color.

if temp <= 50:		blue
else if temp <= 70:	orange
else:			red
This commit is contained in:
Thomas Preisner 2018-03-02 01:50:57 +01:00
parent 37516662d1
commit 38a8c0710b

View file

@ -53,8 +53,20 @@ def conky_icon(icon_code, icon_color, text_color = 'lightgrey'):
return text
# conky specific configuration
# cpu temperature
conky_text = '${if_match \"$acpitemp\" <= \"50\"}'
conky_text += conky_icon('\ue01b', 'lightblue')
conky_text += '${else}'
conky_text += '${if_match \"$acpitemp\" <= \"70\"}'
conky_text += conky_icon('\ue01b', 'orange')
conky_text += '${else}'
conky_text += conky_icon('\ue01b', 'red')
conky_text += '${endif}'
conky_text += '${endif}'
conky_text += '${acpitemp}°C '
# cpu and memory load factor
conky_text = conky_icon('\ue026', 'green') + '${cpu}% '
conky_text += conky_icon('\ue026', 'green') + '${cpu}% '
conky_text += conky_icon('\ue021', 'green') + '${memperc}% '
# options for hlwm.HLWMLayoutSwitcher widget