1

I am trying to use conky to display my sensors output but have no idea where to start. I've seen other scripts and they dont make any seance to me. I've tried a few scripts here and there but none seem to work with mine.

My Sensors output is as follows.

acpitz-virtual-0
Adapter: Virtual device
temp1:        +48.0°C  (crit = +110.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +49.0°C  (high = +80.0°C, crit = +85.0°C)
Core 0:         +49.0°C  (high = +80.0°C, crit = +85.0°C)
Core 1:         +44.0°C  (high = +80.0°C, crit = +85.0°C)

The conky im using is as follows:

TEXT
${color #42AE4A}Processes:${color lightgrey} $processes ${color #42AE4A}Run:${color lightgrey} $running_processes ${color #42AE4A}
${color #42AE4A}Core 1 Temp: ${color lightgrey}${exec sensors | grep 'Core0'} ${color #42AE4A}Core 2 Temp: ${color lightgrey}${exec sensors | grep 'Core1'}

The ui output is seen here

http://i.imgur.com/JUrj7qu.jpg

I don't know much about conky scripting, anything helps. And please don't just suggest trying scripts until one works. I rather learn what i'm doing then copy a script. Having said that, the above script is actually copyed and I have no idea what exec means or does, but I assume it stands for execute.

EDIT: Changed the last two lines in conky to:

${color #42AE4A}Core 0 Temp: ${color lightgrey}${exec sensors | grep 'Core 0'}
${color #42AE4A}Core 1 Temp: ${color lightgrey}${exec sensors | grep 'Core 1'}

Now the output is as follows:

http://i.imgur.com/KcKglE9.jpg

1 Answer 1

2

Fixed it. I learned of the cut command. The last two lines now look like this.

${color #42AE4A}Core 0 Temp: ${color lightgrey}${exec sensors | grep 'Core 0' | cut -c18-21}
${color #42AE4A}Core 1 Temp: ${color lightgrey}${exec sensors | grep 'Core 1' | cut -c18-21}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.