You are not logged in.

#1 2011-02-22 21:38:14

shadyabhi
Member
From: Bangalore
Registered: 2010-05-23
Posts: 262
Website

Fixed length field in conky

Please note the "Net: 271B " in the second line on conky. This screenshot was taken when internet was almost idle.
When the internet speed increases to something like 250Kbps, the while second line shifs by 1 or 2 pixels, resulting into the movement of the whole second line.

How can I avoid that?

Screenshot:-

http://img830.imageshack.us/i/conkyissue.png/


My .conkyrc file:-

#avoid flicker
double_buffer yes

#own window to run simultanious 2 or more conkys
own_window  yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorate,sticky,skip_taskbar,skip_pager

#borders
draw_borders no
border_margin 1

#shades
draw_shades yes

# Stippled borders?
stippled_borders 8

# border margins
border_margin 40

# border width
border_width 1

#position
gap_x 0
gap_y 0
alignment top_left

#behaviour
update_interval 1

#colour
default_color  8f8f8f
#default_shade_color 000000
own_window_colour 262626

#font
use_xft yes
xftalpha 0.8
xftfont bauhaus:pixelsize=10
override_utf8_locale yes

#to prevent window from moving
use_spacer yes
minimum_size 1268 0


#mpd
mpd_host localhost
mpd_port 6600

TEXT
Cpu: ${color e0e0e0}${font} ${freq}Mhz ${cpu}% ${cpubar 7,50}  | ${color} Temp: ${execi 60 ~/thermal} | ${color} Mem: ${color e0e0e0}${font}${mem} ${membar 7,50} | ${color} Root: ${color e0e0e0}${font}${fs_free /} ${color} | ${color} Email: ${color e0e0e0}${execi 300 ~/gmail} | ${color} Mpd:  ${color e0e0e0}${font}${mpd_smart} | ${color} Up: ${color e0e0e0}${font}${uptime_short}${color} | ${color} ${execi 5 ~/battery}  
Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color}  ${totaldown eth0} downloaded  | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}

Offline

#2 2011-02-23 03:07:02

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Fixed length field in conky

Use "use_spacer right" and make sure you use a monospace font for Conky.

If that doesn't help, then I would add a goto statement before the totaldown to move it sufficiently to the right so it won't get moved.

Offline

#3 2011-02-23 07:54:27

shadyabhi
Member
From: Bangalore
Registered: 2010-05-23
Posts: 262
Website

Re: Fixed length field in conky

I tried adding

xftfont Monospace:size=7
use_spacer right

but no success.

I cant understand that adding goto statement part. Can you please explain what to add to the .conkyrc file

Last edited by shadyabhi (2011-02-23 08:08:27)

Offline

#4 2011-02-23 15:41:44

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Fixed length field in conky

For example, in the last line, use this:

Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color}  ${goto 150}${totaldown eth0} downloaded  | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}

Tweak the value of the goto if necessary.

Offline

#5 2011-02-23 15:52:56

shadyabhi
Member
From: Bangalore
Registered: 2010-05-23
Posts: 262
Website

Re: Fixed length field in conky

anonymous_user wrote:

For example, in the last line, use this:

Net: ${color e0e0e0}${font}${downspeed eth0} Kb/s ${color}  ${goto 150}${totaldown eth0} downloaded  | ${color} ${color e0e0e0}${upspeed eth0} Kb/s ${color} ${totalup eth0} uploaded${color}

Tweak the value of the goto if necessary.

cool. that did the job...

Thanks

Offline

Board footer

Powered by FluxBB