Friday, April 19, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 4431  / 1 Year ago, sat, may 6, 2023, 10:31:32

I'm editing a Conky theme. I would like it to output the processor temperatures in degrees Fahrenheit instead of Celsius.



In the ~/.conkyrc file, the command sensors | grep 'Core 0' | cut -c18-19 is used to find the temperature in Celsius for the first processor core. I want to use bc to compute this (give it outputvalue*9/5+32).



Problem is, bc wants just absolute values, and I see no way to pass it program output. If I try to use something like temp=$(sensors | grep 'Core 0' | cut -c18-19) & echo 'temp*9/5+32' | bc, it ends up giving me 32 because it registers "temp" as a 0.


More From » command-line

 Answers
0

According to the Conky help, you can specify this in the config file ~/.conkyrc



Quote:




temperature_unit




  • Desired output unit of all objects displaying a temperature. Parameters are either "fahrenheit" or "celsius". The default unit is
    degree Celsius.



[#33792] Sunday, May 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ormlai

Total Points: 292
Total Questions: 106
Total Answers: 115

Location: Cape Verde
Member since Fri, Sep 16, 2022
2 Years ago
ormlai questions
Wed, Sep 28, 22, 00:17, 2 Years ago
Sun, Aug 7, 22, 22:05, 2 Years ago
Wed, Jun 16, 21, 03:50, 3 Years ago
Sun, Feb 6, 22, 09:11, 2 Years ago
Mon, Jul 12, 21, 10:00, 3 Years ago
;