conky vertical spacing adjustment

Message
Author
User avatar
Jerry3904
Administrator
Posts: 23465
Joined: Wed Jul 19, 2006 6:13 am

Re: conky vertical spacing adjustment

#11 Post by Jerry3904 »

Don't need the lesson, thanks--did it already many times during the development of this conky. Just giving your version a tryout to see alternatives.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
ceeslans
Posts: 855
Joined: Sun Apr 14, 2019 3:48 am

Re: conky vertical spacing adjustment

#12 Post by ceeslans »

Its probably due to excessive changing in $voffset values, it's so easy to loose overview. and the extreme widget width/height don't help either...
It would be better to rewrite the conky.text section to create individual icon+text sections.
Also to set default font to GeosansLight:size=15 and widget dimensions to 250x200.
I've done so --> see screengrab

Image

Below 'my' rewritten/renamed ~/.conky/MX-Flair/System_flair_NoClock config:

Code: Select all

conky.config = {
-- By Jesse_Avalos , See me on Eye Candy Linux_  on Google +
	background = true,
	use_xft = true,
	font = 'GeosansLight:size=15',
	xftalpha = 0.8,
	update_interval = 1,
	total_run_times = 0,
	
	own_window = true,
	own_window_type = 'normal',	
	own_window_colour = '000000',	
	
	own_window_transparent = true,
	own_window_argb_visual = true,
	--own_window_argb_value = 0,

	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	double_buffer = true,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	stippled_borders = 0,
	border_outer_margin = 5,
	border_width = 1,
	default_shade_color = '000000',
	default_outline_color = '000000',
	
	alignment = 'top_right',
	minimum_width = 250, 
	maximum_width = 300,
	-- minimum_height = 200,
	gap_x = 20,
	gap_y = 30,

	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	net_avg_samples = 2,
	short_units = true,
	text_buffer_size = 2048,
	use_spacer = 'none',
	override_utf8_locale = true,

	color0 = 'white',
	color1 = 'darkgreen',
	color2 = 'darkgrey',
	color3 = 'E82A2A',

	own_window_colour = '000000',

-- network templates
-- ========
    if_up_strictness = 'address',
	template0 = 'eth0',
	template1 = 'eth1',
	template2 = 'wlan0',
	template3 = 'wlan1',

-- battery templates
-- change to 'BAT1',  if so applicable
-- ========
	template5 = 'BAT0',  

};

-- fluxbox adjustment

return_code = os.execute('pidof -q fluxbox')
if _VERSION == 'Lua 5.1' and math.floor(return_code/256) == 0 or
  _VERSION ~= 'Lua 5.1' and return_code then
  conky.config.own_window_transparent = true
  conky.config.own_window_argb_visual = false
end

conky.text = [[
${image ./images/whiteline.png -p 10,10 -s 3x165}${color0}\
## temp ##
${voffset 10}${goto 35}${font Dingytwo:size=17}M
${voffset -27}${offset 65}${font}${if_existing /sys/class/thermal/thermal_zone0/temp}${eval ${acpitemp}}${endif}°C
## cpu ##
${voffset 4}${goto 35}${font Dingytwo:size=17}7
${voffset -27}${offset 65}${font}${cpu cpu0}% / 100%
## mem ##
${voffset 4}${goto 35}${font Dingytwo:size=17}O
${voffset -27}${offset 65}${font}$memfree / $memmax
## battery ##
${voffset 4}${goto 35}${font Dingytwo:size=17}U
${voffset -27}${offset 65}${font}${if_existing /sys/class/power_supply/$template5/status}${battery_percent $template5}% bat${endif}
## net up ##
${voffset 4}${goto 35}${font Dingytwo:size=17}5
${if_up $template0}${voffset -27}${offset 65}${font} ${upspeed $template0} kb/s / ${totalup $template0}${color}${else}\
${if_up $template1}${voffset -27}${offset 65}${font}${upspeed $template1} kb/s / ${totalup $template1}${color}${else}\
${if_up $template2}${voffset -27}${offset 65}${font}${upspeed $template2} kb/s / ${totalup $template2}${color}${else}\
${if_up $template3}${voffset -27}${offset 65}${font}${upspeed $template3} kb/s / ${totalup $template3}\
${endif}${endif}${endif}
## net down ##
${voffset 4}${goto 35}${font Dingytwo:size=17}4
${if_up $template0}${voffset -27}${offset 65}${font}${downspeed $template0} kb/s / ${totaldown $template0}${color}${else}\
${if_up $template1}${voffset -27}${offset 65}${font}${downspeed $template1} kb/s / ${totaldown $template1}${color}${else}\
${if_up $template2}${voffset -27}${offset 65}${font}${downspeed $template2} kb/s / ${totaldown $template2}${color}${else}\
${if_up $template3}${voffset -27}${offset 65}${font}${downspeed $template3} kb/s / ${totaldown $template3}${color}\
${endif}${endif}${endif}
## height correction ##
${voffset -150}
]];
Last edited by ceeslans on Sun Mar 02, 2025 6:24 am, edited 2 times in total.
Sony Vaio VPCF23P (2011), Intel Core i7-2670, 6gb RAM, 240gb SSD, MX-Linux 23 based Fluxbox v/1.3.7+
Lenovo Thinkpad L560 (2016), Intel Core i5-6200, 16gb RAM, 240gb SSD, Devuan Daedalus based Fluxbox v/1.3.7+

User avatar
Jerry3904
Administrator
Posts: 23465
Joined: Wed Jul 19, 2006 6:13 am

Re: conky vertical spacing adjustment

#13 Post by Jerry3904 »

Well that looks just perfect, @ceeslans, much appreciated! Now I will be able to suggest it be added to the MX conky group.

BTW: I wonder if we could use a "Conky Review Group" for MX-25...
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
ceeslans
Posts: 855
Joined: Sun Apr 14, 2019 3:48 am

Re: conky vertical spacing adjustment

#14 Post by ceeslans »

@Jerry3904 : I've simplified the ## net-up ## and ## net-down ## sections in the lower part of 'conky.text' settings.
Using the "gw_iface" conky variable, the active interface is automatically recognized - and applicable net speed/total values are likewise displayed :

Code: Select all

## net-up ##
${voffset 4}${goto 35}${font Dingytwo:size=17}5
${if_gw}${voffset -27}${offset 65}${font}${upspeed $gw_iface}/s  /  ${totalup $gw_iface}${color}${endif}
## net-down ##
${voffset 4}${goto 35}${font Dingytwo:size=17}4
${if_gw}${voffset -27}${offset 65}${font}${downspeed $gw_iface}/s  /  ${totaldown $gw_iface}${color}{endif}
Sony Vaio VPCF23P (2011), Intel Core i7-2670, 6gb RAM, 240gb SSD, MX-Linux 23 based Fluxbox v/1.3.7+
Lenovo Thinkpad L560 (2016), Intel Core i5-6200, 16gb RAM, 240gb SSD, Devuan Daedalus based Fluxbox v/1.3.7+

User avatar
Jerry3904
Administrator
Posts: 23465
Joined: Wed Jul 19, 2006 6:13 am

Re: conky vertical spacing adjustment

#15 Post by Jerry3904 »

That's quite a simplification, well done.

Thanks again.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
AVLinux
Posts: 3153
Joined: Wed Jul 15, 2020 1:15 am

Re: conky vertical spacing adjustment

#16 Post by AVLinux »

Very nice simple elegant Conky!

If I may venture an opinion about MX-25 Conky review I love MX to bits but the Conky thing is so overblown I now avoid it completely and ship a few Conkii and a simple Editor.. MX's default Conky is very attractive and I think it's nice to ship a working Conky for that extra polish but beyond that I think additional Conkys should be in Package Management (or perhaps a git repo) for those who want them. Most Users who are enthusiastic about pimping their system are going to mod and edit them anyway and use one or two..

Just my unsolicited $0.02

User avatar
Jerry3904
Administrator
Posts: 23465
Joined: Wed Jul 19, 2006 6:13 am

Re: conky vertical spacing adjustment

#17 Post by Jerry3904 »

Thanks for the opinion, we'll think about that for sure.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Post Reply

Return to “Software / Configuration”