Closed HokieGeek closed 10 years ago
#!/usr/bin/python
import subprocess
numCpus = subprocess.check_output("grep -c 'processor' /proc/cpuinfo", shell=True)
for cpu in range(numCpus)
print("${if_match ${cpu cpu%d} >= 85}^fg(\\#FF0000)${endif}\\", cpu, end="")
print("${if_match ${cpu cpu%d} < 10} ${endif}${cpu cpu%d}%^fg(\\#FFFFFF) \\", cpu, cpu, end="")
And then, in conky:
${execp $HOME/.conky/bin/cpuinfo.py}
Remove the end-of-line backslashes, idiot
So it will need to generate something along these lines: