h1

How to Fix Conky Flickering, Borders, and Drop Shadows

15 April, 2009

Conky is an awesome little program that displays a wide variety of system stats and is both lightweight and highly customizable.

I love Conky a lot, but it is known to have a bit of a temperament and if your script doesn’t contain some very specific commands it will fight with your window manager (compiz, metacity, etc) and nautilus, causing a wide variety of oddities, including but not limited to strange borders, flickering, disappearing desktop icons, and drop shadows where no drop shadows should be.

This quick how-to will explain how to fix these problems. It assumes that you have a basic working knowledge of how to edit the .conkyrc (aka conky config) file and how to restart conky. I’ve also included a copy of my personal .conkyrc for comparison or for your use should you wish.

There are two main causes of Conky malfunctions, conky conflicting with the window manager and conky conflicting with nautilus. You may have one or both, but luckily the solutions are quite easy.

If conky is repeatedly flickering, that means that it’s conflicting with nautilus. Add this string to the top section of your conky config to fix it:
# Use double buffering (reduces flicker)
double_buffer yes

If strange borders are appearing around conky, the desktop icons disappear, or conky casts a drop shadow, it means that conky is conflicting with your window manager. Add this string to the top section of your conky config to fix it:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

You should also go through your config page and make sure none of these options are already present and set to different values. If so, delete them so only the ones above remain. Save the config file and restart conky!

I’ve found in 99% of cases, this fixes it. However, if you continue to have trouble, consult the conky man file for more troubleshooting tips. Conky also has it’s own irc channel on freenode, #conky, populated by people who are significantly more knowledgeable than me.

Now, here’s my conky config file, for your enjoyment.

# Use Xft?
use_xft yes
xftfont Gentium:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1
# 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_transparent yes
own_window_type override
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker)
double_buffer yes
# Minimum size of text area
minimum_size 180 0
#maximum_width 200
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 5
# border width
border_width 1
# Default colors and also border colors
default_color white
#default_shade_color black
#default_outline_color white
own_window_colour white
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 35
gap_y 50
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# 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 yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
TEXT
${font Unnamed Melody:size=16}S${color B8A0C8}tatus${color}${font}
Operating System: ${alignr}Ubuntu 8.10
Kernel: ${alignr}${kernel}
CPU1: ${alignr}${cpubar cpu1 8,60}
CPU2: ${alignr}${cpubar cpu2 8,60}
RAM: ${alignr}${membar 8,60}
SWAP: ${alignr}${swapbar 8,60}
HDD: ${alignr}${fs_bar 8,60 /home}
Battery: ${alignr}${battery_bar 8,60 BAT0}
Temp: ${alignr}${acpitemp}°C
Uptime: ${alignr}${uptime}
${font Unnamed Melody:size=16}T${color B8A0C8}op${color} P${color B8A0C8}rocesses${color}${font}
1. ${top_mem name 1} ${alignr}${top_mem mem 1}
2. ${top_mem name 2} ${alignr}${top_mem mem 2}
3. ${top_mem name 3} ${alignr}${top_mem mem 3}
4. ${top_mem name 4} ${alignr}${top_mem mem 4}
5. ${top_mem name 5} ${alignr}${top_mem mem 5}
${font Unnamed Melody:size=16}N${color B8A0C8}etwork${color}${font}
${if_existing /proc/net/route wlan0}
Up: ${alignr}${upspeedgraph wlan0 8,60 8434A4 A672CF}
Down: ${alignr}${downspeedgraph wlan0 8,60 8434A4 A672CF}
Upload: ${alignr}${totalup wlan0}
Download: ${alignr}${totaldown wlan0}
Signal: ${wireless_link_qual eth1}% ${alignr}${wireless_link_bar 8,60 eth1}
Local Ip: ${alignr}${addr wlan0}
${else}${if_existing /proc/net/route eth0}
Up: ${alignr}${upspeedgraph eth0 8,60 8434A4 A672CF}
Down: ${alignr}${downspeedgraph eth0 8,60 8434A4 A672CF}
Upload: ${alignr}${totalup eth0}
Download: ${alignr}${totaldown eth0}
Local Ip: ${alignr}${addr eth0}
${endif}${else}${if_existing /proc/net/route eth1}
Up: ${alignr}${upspeedgraph eth1 8,60 8434A4 A672CF}
Down: ${alignr}${downspeedgraph eth1 8,60 8434A4 A672CF}
Upload: ${alignr}${totalup eth1}
Download: ${alignr}${totaldown eth1}
Local Ip: ${alignr}${addr eth1}
${endif}${else}
Network Unavailable
${endif}
${font Unnamed Melody:size=16}W${color B8A0C8}eather${color}${font}
Station: ${alignr}Auke Bay, AK
Current: ${alignr}${execi 600 conkyForecast --datatype=CC --location=USAK0024 --imperial --night}
Temp/Chill: ${alignr}${execi 600 conkyForecast --datatype=HT --location=USAK0024 --imperial --night}/${execi 600 conkyForecast --datatype=LT --location=USAK0024 --imperial --night}
Wind: ${alignr}${execi 600 conkyForecast --datatype=WD --location=USAK0024 --imperial --night --hideunits} ${execi 600 conkyForecast --datatype=WS --location=USAK0024 --imperial --night}
Sun: ${alignr}${execi 600 conkyForecast --datatype=SR --location=USAK0024 --imperial --night}-${execi 600 conkyForecast --datatype=SS --location=USAK0024 --imperial --night}
Forecast:
${voffset 0}${alignc 43}${execpi 600 conkyForecast --location=USAK0116 --datatype=DW --startday=1 --shortweekday --imperial --night} ${alignc 8}${execpi 600 conkyForecast --location=USAK0116 --datatype=DW --startday=2 --shortweekday --imperial --night} ${alignc -29}${execpi 600 conkyForecast --location=USAK0116 --datatype=DW --startday=3 --shortweekday --imperial --night} ${alignc -64}${execpi 600 conkyForecast --location=USAK0116 --datatype=DW --startday=4 --shortweekday --imperial --night}
${voffset 0}${alignc 75}${font ConkyWeather:size=28}${color BEA3EF}${execpi 600 conkyForecast --location=USAK0116 --datatype=WF --startday=1 --endday=4 --spaces=1 --imperial --night}${color}${font}
${voffset 0}${font Gentium:size=7}${alignc 48}${execpi 600 conkyForecast --location=USAK0116 --datatype=HT --startday=1 --hideunits --centeredwidth=3 --imperial --night}/${execpi 600 conkyForecast --location=USAK0116 --datatype=LT --startday=1 --hideunits --centeredwidth=3 --imperial --night} ${alignc -14}${execpi 600 conkyForecast --location=USAK0116 --datatype=HT --startday=2 --hideunits --centeredwidth=3 --imperial --night}/${execpi 600 conkyForecast --location=USAK0116 --datatype=LT --startday=2 --hideunits --centeredwidth=3 --imperial --night} ${alignc -40}${execpi 600 conkyForecast --location=USAK0116 --datatype=HT --startday=3 --hideunits --centeredwidth=3 --imperial --night}/${execpi 600 conkyForecast --location=USAK0116 --datatype=LT --startday=3 --hideunits --centeredwidth=3 --imperial --night} ${alignr 6}${execpi 600 conkyForecast --location=USAK0116 --datatype=HT --startday=4 --hideunits --centeredwidth=3 --imperial --night}/${execpi 600 conkyForecast --location=USAK0116 --datatype=LT --startday=4 --hideunits --centeredwidth=3 --imperial --night}${font}
${font Unnamed Melody:size=16}N${color B8A0C8}ow${color} P${color B8A0C8}laying${color}${font}
Title: ${alignr}${exec conkyRhythmbox --datatype=TI}
Artist: ${alignr}${exec conkyRhythmbox --datatype=AR}
Album: ${alignr}${exec conkyRhythmbox --datatype=AL}

If you want it exactly as is, you’ll need to download a few things:

Font: Unnamed Melody
Font: Gentium
Script: Conky Weather
Script: Conky Rythymbox

Make sure to follow the instructions carefully for the conky weather script, it’s a little fickle to set up.
Happy Clicking!

conky3

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: