LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-05-2012, 02:54 AM   #1
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian
Posts: 146
Blog Entries: 1

Rep: Reputation: 12
Conky offsets shades with different sized fonts


Hi everybody, Conky changes the shades if a different sized font is added. I'm using Conky 1.8 on Debian Squeeze. This is what the shades normally look like (and I prefer):
conky2.png
And this happens when I use a text with a larger font.
conky1.png
I have now also tried it with a simple plain text, and the problem persists. This is the conkyrc file I use. To be sure, I had removed all redundant formatting. The last couple of lines make the difference.
Code:
alignment top_right
background yes
border_width 1
cpu_avg_samples 3
default_color green
default_outline_color white
default_shade_color black
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades yes
use_xft yes
xftfont DejaVu Sans Mono:size=8
# X font when Xft is disabled, you can pick one with program xfontsel

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 15
gap_y 15
minimum_size 220 5
net_avg_samples 2

# Subtract file system buffers from used memory?
no_buffers no

out_to_console no
out_to_stderr no
#?
extra_newline no

own_window yes
#X window class. Sort of a title.
own_window_class Conky
own_window_type desktop
own_window_transparent yes
# If own_window is yes, these window manager hints may be used
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

stippled_borders 0
update_interval 5.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range yes

TEXT
${font}${color goldenrod}Hostname: $nodename
${color goldenrod}Linux Kernel: $kernel
${color goldenrod}CPU Details:  $machine, $freq(MHz)
${color}CPU History:  ${color darkgreen}${cpugraph 30,0 404040 5577ff}
${color}CPU Usage:${color magenta2} $cpu% ${cpubar 11,0}
RAM Usage: $mem ($memperc%) ${membar 11,0}
Available RAM: $memmax
$stippled_hr
$alignc Processes:$color $processes  ${color grey}Running:$color $running_processes
$alignc${color}(top 5 sorted by CPU usage)
${color goldenrod} NAME              PID    CPU%   MEM%
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}

$alignc(top 5 sorted by MEM usage)
${color goldenrod} NAME              PID    CPU%   MEM%
${color} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${top_mem name 5} ${top_mem pid 5} ${top_mem cpu 5} ${top_mem mem 5}
$stippled_hr
$aligncSystem Uptime:${color DarkOrange1} $uptime
# http://sethjust.com/2009/08/03/a-useful-calendar-in-conky/
${hr 2}
${font DejaVu Sans Mono : size=16}${color white}${execpi 7200 DJS=`date +%_d`; cal | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color orange}'"$DJS"'${color white}$alignc'/}
I have tried using offset and voffset, but the shades move along with the output. Is this shade offset a bug or a feature? Can I revert to the normal (1 or 2 pixels wide) offset of the shades? Any advice welcome. I have searched the net, but if you know a good resource for Conky info, that's welcome too. Thanks for reading.
 
Old 02-05-2012, 04:56 AM   #2
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,027

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
One small mistake here line 75
Code:
Conky: unknown variable aligncsystem
Need space between $alignc and System
Code:
$alignc System Uptime:${color DarkOrange1} $uptime
The last line is what is causing the problem with the shades,
Code:
${font DejaVu Sans Mono : size=16}${color white}${execpi 7200 DJS=`date +%_d`; cal | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color orange}'"$DJS"'${color white}$alignc'/}
And as the autor said:
Quote:
...actually getting the date highlighted is somewhat hard, and all of the articles I found suggested methods that broke in various situations...
I would just disable the shades.

Regards
 
Old 02-05-2012, 07:01 AM   #3
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian
Posts: 146
Blog Entries: 1

Original Poster
Rep: Reputation: 12
Not there yet...

Thank you for taking a serious look at my conkyrc. There could be a couple of small mistakes in the files I post, however I am very sure it is the changing of the size of the font alone that causes trouble.
[Update]
I realized Conky outputs the shadows after it has outputted the foreground. The linear way in which Conky works thus requires the font to be reset at the end of the output.
Adding ${font} at the end of the file solved the issue.

Last edited by Weapon S; 02-13-2012 at 02:07 AM. Reason: Problem solved
 
  


Reply

Tags
conky


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using different fonts in conky jahobjafwar General 3 11-02-2010 12:56 AM
LXer: Conky Colors Makes Your Conky Beautiful In Seconds (Version 3.20 Released) LXer Syndicated Linux News 0 08-01-2010 11:21 AM
Incorrectly sized fonts on WindowMaker startup Tino27 Linux - General 0 05-21-2009 01:29 PM
Why can't OpenSuse have normal sized fonts like Ubuntu and not microscopic ones? doublepow Suse/Novell 3 02-08-2009 08:38 AM
conky xft fonts ahh_dee Linux - Software 1 10-30-2005 06:34 AM


All times are GMT -5. The time now is 09:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration