You are not logged in.
Pages: 1
Not sure what to call this thread but im trying to make a temp gauge in conky with sensors and have got so far as per below, but would like to display the reading as a single line not 4 rows, how would i go about doing this in one command?
command so far.
sensors | grep '0:\|1:\|2:\|3:' | head -n4 | cut -c 16-23
what this does is greps multiple words or patterns needed for display from lm sensors and then uses head to print the number of lines i need and the cut them up to show below.
$ sensors | grep '0:\|1:\|2:\|3:' | head -n4 | cut -c 16-23
42.0°C
47.0°C
47.0°C
50.0°C
desired output =
42.0°C 47.0°C 47.0°C 50.0°C
Last edited by clusterF (2019-08-07 12:45:58)
Offline
Solved my own question with fmt command.
sensors | grep '0:\|1:\|2:\|3:' | head -n4 | cut -c 16-23 | fmt -w32
Now to see if it works in conky.
yes works.
Last edited by clusterF (2019-08-07 12:45:38)
Offline
cool! ]:D
I have extended the command, where the first temperature (0:\) is the GPU.
sensors | grep '0:\|1:\|2:\|3:\|4:' | head -n5 | cut -c16-23 | fmt -w42
58.0°C 36.0°C 36.0°C 34.0°C 32.0°C
Thanks!
Offline
^ nice
Offline
Pages: 1