You are not logged in.

#1 2010-08-09 17:09:25

marfig
Member
From: Portugal
Registered: 2010-07-30
Posts: 189
Website

[SOLVED] Correctly positioning conky elements with ${offset)

Hi all,

I'm adapting the Oneliner conky configuration shown in the wiki. Everything is working great, except for one problem.

I want to increase the offset that separates the date element from the rest of the elements to its right. However, when I try to set it to an offset of 200 or greater, The text at the far right starts dissapearing. As if the conky window didn't extend all the way horizontally across my screen. I can see this exact problem if I set own_window_type to panel. Now that I see the borders, it's clear the conky window is shorter than my windows screen. Problem is I tried a lot of the configuration settings in the conky website and I can't seem to be able to increase the window size.

And here's my .conkyrc:
(it's the offset 150, after the date element, that I can't seem to be able to increase much further)

double_buffer yes
draw_graph_borders yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
#own_window_type background
update_interval 1.0
show_graph_scale no
show_graph_range no


# set to true if you want Conky to be forked in the background
background true
# background no

# X font when Xft is disabled, you can pick one with program xfontsel artwiz package?
#font 5x8
font 6x9
#font 6x10
#font 6x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Use Xft?
use_xft no

# Set conky on the bottom of all other applications
# on_bottom no

# Xft font when Xft is enabled
xftfont Mono:size=6

# Text alpha when using Xft
xftalpha 0.8

# Print everything to stdout?
# out_to_console no

# MPD host/port
# mpd_host localhost
# mpd_port 6600
# mpd_password tinker_bell

# Print everything to console?
# out_to_console no

# mail spool
# mail_spool $MAIL

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
#own_window yes
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use pseudo transparency with own_window?
own_window_transparent yes

# If own_window_transparent is set to no, you can set the background colour here
# own_window_colour grey

# Minimum size of text area
#minimum_size 285 5

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_inner_margin 4
border_outer_margin 0

# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color black

# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment none

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 1
gap_y 1

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase yes

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

# stuff after 'TEXT' will be formatted on screen
TEXT
$${image /usr/share/archlinux/logos/archlinux-150x46-dark.png -p 1,10}{color #3e7182}${time %a %D %k:%M}${offset 150}${color #62868B}cpu: ${freq_g}Ghz ${cpubar 4,50} ($cpu) top:${color #8FC4C2} ${top name 1}${offset -35}${color #62868B}${top cpu 1}${color #3e7182} | ${color #62868B}ram:${color #62868B} ${membar 4,50} hog: ${color #8FC4C2}${top_mem name 1}${offset -35}${color #62868B}${top_mem mem 1}${color #3e7182} | ${color #62868B}network:${color #8FC4C2} ${upspeed eth0} ${color #62868B}up, ${color #8FC4C2}${downspeed eth0} ${color #62868B}down, ${totaldown eth0}

Last edited by marfig (2010-08-10 01:29:13)


I probably made this post longer than it should only because I lack the time to make it shorter.
- Paraphrased from Blaise Pascal

Offline

#2 2010-08-09 21:20:29

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] Correctly positioning conky elements with ${offset)

If you set your minimum_size and maximum_width variables you can make it any size that you want.

So, lets say that you are using a 1280x1024 screensize.

You can set your minimum_size to be 1200.  If you don't provide a second option, you are specifying the width.
Then, if you set your maximum_width to be 1280,  or, if you want a 1 pixel gap on either side 1278,  then your conky will not go off the sides of the screen, and if you use any align option, then it will stay within that specified width.

P.S.  The reason that it doesn't go all the way across your screen right now, is because there is not enough information being displayed to warrant anything larger.
HTH

Last edited by Knute (2010-08-09 21:22:17)


Knute

Offline

#3 2010-08-10 01:28:21

marfig
Member
From: Portugal
Registered: 2010-07-30
Posts: 189
Website

Re: [SOLVED] Correctly positioning conky elements with ${offset)

Fantastic. It worked. I was missing that combination of both settings.

Thanks Knute. smile


I probably made this post longer than it should only because I lack the time to make it shorter.
- Paraphrased from Blaise Pascal

Offline

Board footer

Powered by FluxBB