conky vertical spacing adjustment

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

conky vertical spacing adjustment

#1 Post by Jerry3904 »

I like the Flair conkies very much, but 1) have no need of a big clock since there is always one on the toolbar/panel, and 2) want a battery indicator. I have got that pretty well accomplished (though there appears to be no available icon so I just used the info one), but can't quite get the vertical spacing of the icons and text correct and am looking for a bit of help.

Code: Select all

 conky.config = {
-- By Jesse_Avalos , See me on Eye Candy Linux_  on Google +
	background = true,
	use_xft = true,
	font = 'Roboto:size=9',
	xftalpha = 0.8,
	update_interval = 1,
	total_run_times = 0,
	own_window = true,
own_window_transparent = false,
--#############################################
-- Compositing tips:
-- Conky can play strangely when used with
-- different compositors. I have found the
-- following to work well, but your mileage
-- may vary. Comment/uncomment to suit.
--#############################################
--# no compositor
--own_window_type override
--own_window_argb_visual no

--# xcompmgr
--own_window_type override
--own_window_argb_visual yes

--# cairo-compmgr
	own_window_type = 'normal',
own_window_argb_visual = false,
--#############################################
	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_left',
minimum_width = 200, minimum_height = 200,
	maximum_width = 900,
gap_x = -250,
gap_y = 70,
alignment = 'top_left',
	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_argb_value 0
--own_window_colour 000000
--own_window_colour 000000
own_window_argb_value = 0,
own_window_colour = '000000',


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


};

-- 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 350,27 -s 3x180}${color0}
#${offset 400}${voffset 30}${font GeosansLight:size=15}$acpitemp'C
${offset 400}${voffset 1}${font GeosansLight:size=15}${if_existing /sys/class/thermal/thermal_zone0/temp}${eval ${acpitemp}}${endif}°C
${offset 400}${voffset 4}${cpu cpu0}% / 100%
${offset 400}${voffset 4}$mem / $memmax${font GeosansLight:size=15}
####Battery
${offset 400}${voffset 10}${if_existing /sys/class/power_supply/BAT0/status}${battery_percent BAT0}% bat${endif}\
${if_existing /sys/class/power_supply/BAT1/status}${battery_percent BAT1}% bat${endif}\
####
${if_up $template0}
${offset 400}${voffset 5}${upspeed $template0} kb/s / ${totalup $template0}
${offset 400}${voffset 5}${downspeed $template0} kb/s / ${totaldown $template0}${color}${else}\
${if_up $template1}
${offset 400}${voffset 5}${upspeed $template1} kb/s / ${totalup $template1}
${offset 400}${voffset 5}${downspeed $template1} kb/s / ${totaldown $template1}${color}${else}\
${if_up $template2}
${offset 400}${voffset 5}${upspeed $template2} kb/s / ${totalup $template2}
${offset 400}${voffset 5}${downspeed $template2} kb/s / ${totaldown $template2}${color}${else}\
${offset 400}${voffset 5}${upspeed $template3} kb/s / ${totalup $template3}
${offset 400}${voffset 5}${downspeed $template3} kb/s / ${totaldown $template3}${color}\
${endif}${endif}${endif}

${color0}${goto 373}${voffset -192}${font Dingytwo:size=17}M$font 
${goto 373}${voffset 7}${font Dingytwo:size=17}7$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}O$font
${goto 373}${voffset 1}${font Dingytwo:size=17}8$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}5$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}4$font${color}
]];
Image
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

fluxboxplus
Posts: 13
Joined: Tue Feb 25, 2025 7:42 am

Re: conky vertical spacing adjustment

#2 Post by fluxboxplus »

Hi Jerry,

i gave it a shot i think i got it right now but i am by no means a conky specialist :).

it looks like that atm: https://i.postimg.cc/26Y2XsRm/Desktop4-001.png

Code: Select all

 conky.config = {
-- By Jesse_Avalos , See me on Eye Candy Linux_  on Google +
	background = true,
	use_xft = true,
	font = 'Roboto:size=9',
	xftalpha = 0.8,
	update_interval = 1,
	total_run_times = 0,
	own_window = true,
own_window_transparent = false,
--#############################################
-- Compositing tips:
-- Conky can play strangely when used with
-- different compositors. I have found the
-- following to work well, but your mileage
-- may vary. Comment/uncomment to suit.
--#############################################
--# no compositor
--own_window_type override
--own_window_argb_visual no

--# xcompmgr
--own_window_type override
--own_window_argb_visual yes

--# cairo-compmgr
	own_window_type = 'normal',
own_window_argb_visual = false,
--#############################################
	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_left',
minimum_width = 200, minimum_height = 200,
	maximum_width = 900,
gap_x = -250,
gap_y = 70,
alignment = 'top_left',
	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_argb_value 0
--own_window_colour 000000
--own_window_colour 000000
own_window_argb_value = 0,
own_window_colour = '000000',


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


};

-- 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 350,27 -s 3x180}${color0}
#${offset 400}${voffset 30}${font GeosansLight:size=15}$acpitemp'C
${offset 400}${voffset 1}${font GeosansLight:size=15}${if_existing /sys/class/thermal/thermal_zone0/temp}${eval ${acpitemp}}${endif}°C
${offset 400}${voffset 4}${cpu cpu0}% / 100%
${offset 400}${voffset 4}$mem / $memmax${font GeosansLight:size=15}
####Battery
${offset 400}${voffset 4}${if_existing /sys/class/power_supply/BAT0/status}${battery_percent BAT0}% bat${endif}\
${if_existing /sys/class/power_supply/BAT1/status}${battery_percent BAT1}% bat${endif}\
####
${if_up $template0}
${offset 400}${voffset 5}${upspeed $template0} kb/s / ${totalup $template0}
${offset 400}${voffset 5}${downspeed $template0} kb/s / ${totaldown $template0}${color}${else}\
${if_up $template1}
${offset 400}${voffset 5}${upspeed $template1} kb/s / ${totalup $template1}
${offset 400}${voffset 5}${downspeed $template1} kb/s / ${totaldown $template1}${color}${else}\
${if_up $template2}
${offset 400}${voffset 5}${upspeed $template2} kb/s / ${totalup $template2}
${offset 400}${voffset 5}${downspeed $template2} kb/s / ${totaldown $template2}${color}${else}\
${offset 400}${voffset 5}${upspeed $template3} kb/s / ${totalup $template3}
${offset 400}${voffset 5}${downspeed $template3} kb/s / ${totaldown $template3}${color}\
${endif}${endif}${endif}

${color0}${goto 373}${voffset -189}${font Dingytwo:size=17}M$font 
${goto 373}${voffset 2}${font Dingytwo:size=17}7$font 
${goto 373}${voffset 2}${font Dingytwo:size=17}O$font
${goto 373}${voffset 2}${font Dingytwo:size=17}8$font 
${goto 373}${voffset 3}${font Dingytwo:size=17}5$font 
${goto 373}${voffset 2}${font Dingytwo:size=17}4$font${color}
]];


User avatar
siamhie
Global Moderator
Posts: 3714
Joined: Fri Aug 20, 2021 5:45 pm

Re: conky vertical spacing adjustment

#3 Post by siamhie »

Will this work?
quickshot_250301.jpg

If so, these are the changes I made.

conky.text section

Change the white line size so that it matches closer to the icons.

from this

Code: Select all

${image ./images/whiteline.png -p 350,27 -s 3x180}${color0}
to this

Code: Select all

${image ./images/whiteline.png -p 350,27 -s 3x170}${color0}
Icon alignment section. I found a battery icon for you to use instead of the information icon.

from this

Code: Select all

${color0}${goto 373}${voffset -192}${font Dingytwo:size=17}M$font 
${goto 373}${voffset 7}${font Dingytwo:size=17}7$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}O$font
${goto 373}${voffset 1}${font Dingytwo:size=17}8$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}5$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}4$font${color}
to this

Code: Select all

${color0}${goto 373}${voffset -188}${font Dingytwo:size=17}M$font 
${goto 373}${voffset 2}${font Dingytwo:size=17}7$font 
${goto 373}${voffset 1}${font Dingytwo:size=17}O$font
${goto 373}${voffset 2}${font Dingytwo:size=17}U$font 
${goto 373}${voffset 3}${font Dingytwo:size=17}5$font 
${goto 373}${voffset 2}${font Dingytwo:size=17}4$font${color}
You do not have the required permissions to view the files attached to this post.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

fluxboxplus
Posts: 13
Joined: Tue Feb 25, 2025 7:42 am

Re: conky vertical spacing adjustment

#4 Post by fluxboxplus »

own_window_argb_visual = true

would be a good idea too for compositing desktops else you would get ugly semi transparent effects (boxes while desktop switching etc).

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

Re: conky vertical spacing adjustment

#5 Post by Jerry3904 »

Good stuff, people--thanks. Can't test until tomorrow but it looks like the right direction 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

User avatar
siamhie
Global Moderator
Posts: 3714
Joined: Fri Aug 20, 2021 5:45 pm

Re: conky vertical spacing adjustment

#6 Post by siamhie »

fluxboxplus wrote: Sat Mar 01, 2025 11:35 am own_window_argb_visual = true

would be a good idea too for compositing desktops else you would get ugly semi transparent effects (boxes while desktop switching etc).

MXFB doesn't come with a compositor enabled by default. The user has to enable it in the startup file.

http://ifxgroup.net/conky.htm#own_window_argb_visual
own_window_argb_visual

Boolean answer to use alpha-red-green-blue ARGB visual display? ARGB can be used for real alpha layer transparency.
A composite manager is required for real transparency. This option does not work as desired, in most cases, in conjunction
with "own_window_type override". [YES or NO]

own_window_argb_visual no
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

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

Re: conky vertical spacing adjustment

#7 Post by Jerry3904 »

MXFB doesn't come with a compositor enabled by default. The user has to enable it in the startup file.
I just use MX Tweak, being a lazy bastard...
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
siamhie
Global Moderator
Posts: 3714
Joined: Fri Aug 20, 2021 5:45 pm

Re: conky vertical spacing adjustment

#8 Post by siamhie »

Jerry3904 wrote: Sat Mar 01, 2025 12:35 pm
MXFB doesn't come with a compositor enabled by default. The user has to enable it in the startup file.
I just use MX Tweak, being a lazy bastard...
Don't you mean MX Conky? I don't see how to enable compositing in MX Tweak.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

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

Re: conky vertical spacing adjustment

#9 Post by Jerry3904 »

Took a look--the battery icon change is great! Not sure yet about the line length, I had actually intended it to be a bit longer that the icon row but will think about it some more.

Open still from my OP is the vertical spacing of the text to the right of the icons. On close inspection it can be seen that the top 3 lines are not quite in line with the icons, whereas the bottom 3 are. I tried making little adjustments on the {voffset} values but it kept getting worse. It'd be great if anyone can figure out how to fix that.
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
siamhie
Global Moderator
Posts: 3714
Joined: Fri Aug 20, 2021 5:45 pm

Re: conky vertical spacing adjustment

#10 Post by siamhie »

Jerry3904 wrote: Sat Mar 01, 2025 2:02 pm Took a look--the battery icon change is great! Not sure yet about the line length, I had actually intended it to be a bit longer that the icon row but will think about it some more.
Then change it.
I only selected 150 to keep everything lined with the icons. (my OCD)

Code: Select all

${image ./images/whiteline.png -p 350,27 -s 3x150}
The first set of number represents the location. (-p position) starting from the top left corner of the screen).

Code: Select all

-p 350,27
The second set of numbers represent the size. (width/length)

Code: Select all

-s 3x150

Just change the values back to the original (-s 3x180)

Code: Select all

${image ./images/whiteline.png -p 350,27 -s 3x180}${color0}
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

Post Reply

Return to “Software / Configuration”