Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3560

Programming • [Solved] Showing CPU fan speed in conky

$
0
0
Conky can print the output of a command with execi, piped through awk to search for specific lines and print only specific strings from the selected line.

Compare for example output of

Code:

$ xset -q
and

Code:

$ xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}'
I can add that to Conky thus:

Code:

${execi 1800 xset -q | awk '/Caps/{print $2 $3 $4, $6 $7 $8}'}

Image


You can also select by line and element with awk:

https://stackoverflow.com/questions/150 ... ent-in-awk
Thanks! That's such a nice way. Much better then using "grep" and "cut" to show the needed values.

Code:

sensors | awk 'FNR == 35 {print $2, $3}'
works like a charm.
Will update the whole config in this new way.

Statistics: Posted by TrixieTest — 2023-12-30 11:28 — Replies 3 — Views 43



Viewing all articles
Browse latest Browse all 3560

Trending Articles