You are not logged in.

#2801 Today 12:57:14

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 3,122

Re: Show us your conky

@Sector11 -

It's just hwmon to get the sensor information.

conky.config = {
--#############################################
-- Settings
--#############################################
	background = true,
	use_xft = true,
	font = 'Fira Code:Regular:size=11',
--	font = 'Fantasque Sans Mono:Regular:size=12',
--	font = 'Inconsolata LGC:regular:size=11',
	xftalpha = 1.0,
	update_interval = 1.0,
	update_interval_on_battery = 3.0,
	total_run_times = 0,

	own_window = true,
	own_window_colour = 'F21C1D1F',
	own_window_transparent = false,
	own_window_type = 'panel',
	own_window_hints = 'undecorated,above,sticky,skip_taskbar,skip_pager',
	own_window_class = 'ConkyFluxbox',
	own_window_title = 'ConkyFluxbox',

--#############################################

	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
	short_units = true,
	imlib_cache_size = 0,
	pad_percents = 1,
	-- max_specials = '2048',
	max_user_text = 3200,
	text_buffer_size = 1024,
	no_buffers = true,
	if_up_strictness = 'address',
	double_buffer = true,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	border_inner_margin = 1,
	border_outer_margin = 1,

	-- default_color = 'edd896',
	default_color = 'BFBFBF',
	default_shade_color = '000000',
	default_outline_color = '828282',
	color0 = 'FFFFFF',
	color1 = '000000',
	color2 = 'FF0000',-- - red
	color3 = 'FFFF00',-- - yellow
	color4 = '0000FF',-- - blue
	color5 = '00FF00',-- - green
	color6 = 'FFA500',-- - orange
	-- color7 = '00CDCD',-- - cyan3
	color7 = 'BFBFBF', -- - match default
	color8 = 'E6D517',-- - gold
	color9 = 'CC0007',-- - reddish

	minimum_width = 1920, minimum_height = 18,
	maximum_width = 1920,
	alignment = 'top_middle',
	gap_x = 0,
	gap_y = 0,
};

conky.text = [[
${goto 20}CPU:${offset 12}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 44}\
${loadavg}\
${goto 360}${if_match ${hwmon 6 temp 1}<=60}${color7}${else}${if_match ${hwmon 6 temp 1}<=80}${color8}${else}${if_match ${hwmon 6 temp 1}>80}${color9}${endif}${endif}${endif}${hwmon 6 temp 1}°C${color}${offset 44}\
${if_match ${hwmon 5 temp 1}<=60}${color7}${else}${if_match ${hwmon 5 temp 1}<=80}${color8}${else}${if_match ${hwmon 5 temp 1}>80}${color9}${endif}${endif}${endif}${hwmon 5 temp 1}°C${color}${offset 44}\
${if_match ${hwmon 5 temp 2}<=60}${color7}${else}${if_match ${hwmon 5 temp 2}<=80}${color8}${else}${if_match ${hwmon 5 temp 2}>80}${color9}${endif}${endif}${endif}${hwmon 5 temp 2}°C${color}${offset 44}\
${if_match ${hwmon 5 temp 3}<=60}${color7}${else}${if_match ${hwmon 5 temp 3}<=80}${color8}${else}${if_match ${hwmon 5 temp 3}>80}${color9}${endif}${endif}${endif}${hwmon 5 temp 3}°C${color}${offset 44}\
${if_match ${hwmon 2 temp 1}<=60}${color7}${else}${if_match ${hwmon 2 temp 1}<=80}${color8}${else}${if_match ${hwmon 2 temp 1}>80}${color9}${endif}${endif}${endif}${hwmon 2 temp 1}°C${color}\
${goto 840}MEM:${offset 12}${if_match ${memperc}<=60}${color7}${else}${if_match ${memperc}<=80}${color8}${else}${if_match ${memperc}>80}${color9}${endif}${endif}${endif}${memperc}%${color}\
${goto 1050}NET:${offset 12}${if_match ${wireless_link_qual_perc wlp2s0}<=30}${color9}${blink ${wireless_link_qual_perc wlp2s0}%}${color}${else}${if_match ${wireless_link_qual_perc wlp2s0}<=50}${color8}${wireless_link_qual_perc wlp2s0}%${else}${if_match ${wireless_link_qual_perc wlp2s0}>50}${color7}${wireless_link_qual_perc wlp2s0}%${endif}${endif}${endif}${color}${offset 44}${if_up wlp2s0}${offset 12}${upspeedf wlp2s0}${offset 44}${offset 12}${downspeedf wlp2s0}${endif}${color}\
${goto 1440}BAT0:${offset 12}${if_match ${battery_percent BAT0}<=15}${color9}${blink ${battery_percent BAT0}%}${color}${else}${if_match ${battery_percent BAT0}<=33}${color8}${battery_percent BAT0}%${else}${if_match ${battery_percent BAT0}>33}${color7}${battery_percent BAT0}%${endif}${endif}${endif}${color}${offset 44}${execpi 60 acpi -b | awk '/Battery 0/ {print $3}' | cut -c1-4}\
${alignr 20}${time %a %b %e, %Y}
]];

EAMPf1v6_t.png

Use this command -

for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done

to generate a nice list of the sensor information:

68ynhqlP_t.png

I have it as a bash alias -

# hwon
alias hwmon-id='for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done'

Sometimes the hwmon order changes. On this laptop hwon is different depending on AC or battery when booting. Either do a quick search-replace of the conky.conf, or have config files that reflect the changes and do a conky restart to suit.

If you're using sway or i3, it can be done in JSON format for the built-in bar -

conky.config = {
	out_to_console = true,
	out_to_x = false,
	background = false,
	max_text_width = 0,
	cpu_avg_samples = 2,
	net_avg_samples = 2,
	no_buffers = true,
	out_to_stderr = false,
	update_interval = 2.0,
	total_run_times = 0,
	if_up_strictness = 'address',
	uppercase = false,
	short_units = false,
	override_utf8_locale = false,
	use_spacer = 'left',

};

conky.text = [[

[

	{ "full_text" : "CPU:  ${cpu}%  " , "color" :
		${if_match ${cpu}>=50}"\#FF0008"${else}${if_match ${cpu}>=25}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "${loadavg}  " , "color" : "\#B0B0B0" },

	{ "full_text" : "${hwmon 6 temp 1}°C  ", "color" :
		${if_match ${hwmon 6 temp 1}>=80}"\#FF0008"${else}${if_match ${hwmon 6 temp 1}>=50}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "${hwmon 5 temp 1}°C  ", "color" :
		${if_match ${hwmon 5 temp 1}>=80}"\#FF0008"${else}${if_match ${hwmon 5 temp 1}>=50}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "${hwmon 5 temp 2}°C  ", "color" :
		${if_match ${hwmon 5 temp 2}>=80}"\#FF0008"${else}${if_match ${hwmon 5 temp 2}>=50}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "${hwmon 5 temp 3}°C  ", "color" :
		${if_match ${hwmon 5 temp 3}>=80}"\#FF0008"${else}${if_match ${hwmon 5 temp 3}>=50}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "MEM:  ${memperc}%  " , "color" :
		${if_match ${memperc}>=50}"\#FF0008"${else}${if_match ${memperc}>=25}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "BAT0:  ${battery_percent BAT0}%  ", "color" :
	    ${if_match ${battery_percent BAT0}<=12}"\#FF001A"${else}${if_match ${battery_percent BAT0}<=25}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "${execpi 60 acpi -b | awk '/Battery 0/ {print $3}' | cut -c1}  ", "color" : "\#B0B0B0" },

	{ "full_text" : "NET:${wireless_link_qual_perc wlp2s0}%  ",  "color" :
		${if_match ${wireless_link_qual_perc wlp2s0}<=30}"\#FF001A"${else}${if_match ${wireless_link_qual_perc wlp2s0}<=60}"\#FBFF00"${else}"\#B0B0B0"${endif}${endif} },

	{ "full_text" : "${upspeed wlp2s0}    ${downspeed wlp2s0}  " , "color" : "\#B0B0B0" },

	{ "full_text" : "${time %a %e %b  %l:%M %p}  " , "color" : "\#B0B0B0" }
	
],

]];

B79oWwjw_t.png


You must unlearn what you have learned.
    -- yoda

Offline

#2802 Today 19:18:00

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,512

Re: Show us your conky

Nice PackRat, thank you.

However this part:

Sometimes the hwmon order changes. On this laptop hwon is different depending on AC or battery when booting. Either do a quick search-replace of the conky.conf, or have config files that reflect the changes and do a conky restart to suit.

you can ignore now.  WHY? => hwmon now looks for "name" not numbers

For example currently on my system:

/sys/class/hwmon/hwmon0/name

I see it is: drivetemp and only one file with the "_input" ending: temp1_input
So for conky:

${hwmon drivetemp temp 1}°

will always display your HDD temp regardless if it is in hwmon0, hwmon1, hwmon2 etc.

I have used an alias to match "inxi -s" and "sensors" for years:

alias sensen='echo "sensors && '=-=-=-=-=-=-=' && inxi -s -c24" && sensors && echo '=-=-=-=-=-=-=' && inxi -s -c24'

Mine:

   $ sensen
sensors && =-=-=-=-=-=-= && inxi -s -c24
drivetemp-scsi-0-0
Adapter: SCSI adapter
temp1:        +34.0°C  (low  =  +0.0°C, high = +60.0°C)
                       (crit low = -41.0°C, crit = +85.0°C)
                       (lowest = +22.0°C, highest = +34.0°C)

amdgpu-pci-0100
Adapter: PCI adapter
vddgfx:      843.00 mV 
fan1:        1418 RPM  (min =  900 RPM, max = 4500 RPM)
edge:         +36.0°C  (crit = +94.0°C, hyst = -273.1°C)
PPT:          15.15 W  (cap = 130.00 W)
pwm1:             24%
sclk:           1 GHz 
mclk:         300 MHz 

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +36.0°C  

=-=-=-=-=-=-=
Sensors:
  System Temperatures: cpu: 45.1 C mobo: N/A gpu: amdgpu temp: 36.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 1418
 
 2026·10·28 @ 14:36:27 ~
   $ 

However, your alias is awesome as it gives the exact "name" needed for conky:

 2026·10·28 @ 15:05:23 ~
   $ hwm
drivetemp: temp1 /sys/devices/pci0000:00/0000:00:01.2/0000:02:00.1/ata1/host0/target0:0:0/0:0:0:0/hwmon/hwmon0/temp1_input
k10temp: Tctl /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input
amdgpu: edge /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/hwmon/hwmon3/temp1_input

Now I don't have as much info as you get but ${hwmon (dev) type n (factor offset)}, where (dev) if the /name file, is much easier and you never have to worry about what info is in which hwmon directory anymore.

 HDD: ${hwmon drivetemp temp 1}°  \
 CPU: ${hwmon k10temp temp 1}°  \
 GPU: ${hwmon amdgpu temp 1}°  \
 GPU FAN:  ${hwmon amdgpu fan 1} RPM

No more "if", "else" "end_if" statements needed for HWMON.

Final note: these should work out of the box on your system no matter how many reboots.

 nvme      ${hwmon nvme temp 1}°
 nvme      ${hwmon nvme temp 2}°
 drivetemp ${hwmon drivetemp temp 1}°
 acpitz    ${hwmon acpitz temp 1}°
 dell_smm  ${hwmon dell_smm temp 1}°
 dell_smm  ${hwmon dell_smm temp 2}°
 dell_smm  ${hwmon dell_smm temp 3}°
 coretemp  ${hwmon coretemp temp 1}° ${cpu} | ${cpu cpu0}
 coretemp  ${hwmon coretemp temp 2}° (core 0) ${cpu cpu1}
 coretemp  ${hwmon coretemp temp 3}° (core 1) ${cpu cpu2}
 coretemp  ${hwmon coretemp temp 4}° (core 2) ${cpu cpu3}
 coretemp  ${hwmon coretemp temp 5}° (core 3) ${cpu cpu4}

With regards to: coretemp  ${hwmon coretemp temp 1}°
= overall/average temp maybe?  I have no clue.

I do know that's the way it works with ${cpu} where ${cpu} and ${cpu cpu0} are the same for Intel or AMD - conky sees both as the "average" of your cores/cpus.

Intell calls them cores; core0, core1, core2, core3
AMD calls them cpus;  cpu1, cpu2, cpu3, cpu4 and
conky calls them cpus

I also need to touch-up my one liner (not a panel) conky


Beardog Linux, hosted by SoxDog
(Debian 13 - X11)
Still a Conky 1.9er at heart.

Offline

#2803 Today 20:17:16

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 3,122

Re: Show us your conky

With regards to: coretemp  ${hwmon coretemp temp 1}°
= overall/average temp maybe?  I have no clue.

From an article by Intel

The processor has different digital thermal sensors to measure the temperature. Core temperature is measured per core while package temperature is a weighted average value of each core temperature reported by software monitoring applications.

So instead of each core temp, I just use the weighted average for the cores and the other dell sensors.

you can ignore now.  WHY? => hwmon now looks for "name" not numbers

That works. Thanks for that.

EFbFLdtY_t.png


You must unlearn what you have learned.
    -- yoda

Offline

#2804 Today 20:41:46

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,512

Re: Show us your conky

PackRat wrote:

From an article by Intel

The processor has different digital thermal sensors to measure the temperature. Core temperature is measured per core while package temperature is a weighted average value of each core temperature reported by software monitoring applications.

So instead of each core temp, I just use the weighted average for the cores and the other dell sensors.

OH!!!!  That's IS nice!  Mind you I only have three anyway, not 25¹ like you.

And yup it work because it's in the man page:

hwmon (dev) type n (factor offset)
              Hwmon  sensor  from sysfs (Linux 2.6).  Parameter dev can be:
1.  Number.  e.g 1 means hwmon1.
2.  Module name.  e.g. k10temp means the first hwmon device whose  module  name  is k10temp.
3.  Omitted.  Then the first hwmon device (hwmon0) will be used.

              Parameter type is either
in or vol meaning voltage;
fan meaning fan;
temp meaning temperature.
              Parameter n is number of the sensor.
     See /sys/class/hwmon/ on your local computer.

              The  optional  arguments factor and offset allow precalculation of the raw input, which is being modified as follows: input = input * factor + offset.  Note that  they  have  to  be given as decimal values (i.e. contain at least one decimal place).

I'm new to conky over v1.9 so I HAD to read the man pages to catchup to how things work.  This find was PURE GOLD!
And my bottom bar has been "fixed"
794268067_261028-172043.jpg

= = = = = =
¹ YES!  I tend to exagerate a bit at times.  This is one of those times.


Beardog Linux, hosted by SoxDog
(Debian 13 - X11)
Still a Conky 1.9er at heart.

Offline

Board footer

Powered by FluxBB