Conkycore.sh (en)

From Conky PitStop

Jump to: navigation, search

conkycore.sh

 Language   English   Français   


Script-crinos512-conkycore.png

A fairly simple script that shows the information about my CPU cores. (thus the name)
This script relies on using sensors and my colorize.sh script.

NOTE: Some CPUs use ‘Core 0′ and so on instead of ‘Core0′, you will need to edit the Temp lines if this is the case.

#!/bin/sh
# conky#!/bin/sh
# conkycore.sh
# by Crinos512
# Usage:
#  ${execp ~/.conky/conkyparts/conkycore.sh}
#
Processor=`cat /proc/cpuinfo | grep 'model name' | head -n1 | sed -e 's/model name.*: //'`
Core1Temp=`sensors | grep 'Core0' | paste -s |sed 's/°/\n/'| head -n1 | cut -c15- | xargs ~/.conky/conkyparts/colorize.sh`"°C"
Core2Temp=`sensors | grep 'Core1' | paste -s |sed 's/°/\n/'| head -n1 | cut -c15- | xargs ~/.conky/conkyparts/colorize.sh`"°C"

echo "\${color1}\${stippled_hr 1}\${color}"
echo "\${voffset -6}  Core Systems:"
echo "\${voffset -6}\${color1}\${stippled_hr 1}\${color}"
echo "\${goto 15}\${color3}\${cpubar 10,360}\${color}"
echo "\${voffset -13}\${alignc}$Processor\${font Liberation Mono:size=8}"
echo "\${goto 25}\${cpugraph 25,350 000033 4682B4 -t}"
echo "\${voffset -45}"
echo "    \`Core 0 (\${color2}\${cpu cpu1}%\${color})\${goto 150}..:: \${color2}\${freq_g cpu1}Ghz\${color} ::..\${goto 340}$Core1Temp\${color}"
echo "    \`Core 1 (\${color2}\${cpu cpu2}%\${color})\${goto 150}..:: \${color2}\${freq_g cpu2}Ghz\${color} ::..\${goto 340}$Core2Temp\${color}\${font}"

exit 0

[UPDATED: 14 Sept. 2009]

Personal tools
Namespaces
Variants
Actions
Navigation
English
Français
Toolbox