LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, Archlinux
Posts: 262
Blog Entries: 2

Rep: Reputation: 49
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):
Click image for larger version

Name:	conky2.png
Views:	582
Size:	38.7 KB
ID:	9015
And this happens when I use a text with a larger font.
Click image for larger version

Name:	conky1.png
Views:	615
Size:	63.1 KB
ID:	9014
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,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
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, Archlinux
Posts: 262

Original Poster
Blog Entries: 2

Rep: Reputation: 49
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



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 / openSUSE 3 02-08-2009 08:38 AM
conky xft fonts ahh_dee Linux - Software 1 10-30-2005 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration