I’ve wrote about conky before here, but this time I’ll explain how I got the extra’s (gmail, weather, audio) to work with it.
There are some other guides for that, but they tend to be hard to follow and only cover 1 extra feature.
I’ll try to make it as simple as possible so everyone can use it.
updated: 22/08/08
The tutorial is going to based on my recent conky setup. It looks like this:
1. Install conky.
Look at my previous post for that.
2. Basics
Note: you are going to have to restart conky a lot. I suggest you put a terminal on a hotkey (f12) and use the command “killall conky” to kill conky and “conky” to start it again.
I presume you have followed the link in point 1 and have an empty .conkyrc before you.
Past this in the empty file.
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 5
maximum_width 400
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color gray
default_shade_color red
default_outline_color green
alignment top_right
gap_x 10
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale no
use_spacer yes
This will take care of the place conky is put on the desktop, the width it has, …
Take a good look at those lines.
maximum_width 400 -> changing the number to 200 will result in a smaller conky file, increasing to 500 will cause conky to be wider.
alignment top_right -> this tells conky to be at the top right of the screen.
If you put bottom_left, conky will be on the bottom left, if you put top_center, it will be in the middle of the screen, …
gap_x 10 -> increasing this number or decrease it to have a wider/smaller gap on the x axis of the screen
gap_y 10 -> increasing this number or decrease it to have a wider/smaller gap on the y axis of the screen
default_color gray -> this seems pretty obvious, replace gray with another color.
To get a list of colors, open this file in a browser or text editor: file:///usr/share/X11/rgb.txt
Conky will be able to use 99% of those colors.
A list of all those things and what they do can be found here.
3. Adding things to conky
If you know run conky, you will not see anything.
You are going to need to add things to it.
Under the previously pasted text, put this
TEXT
Now, everything under TEXT will be visable on your desktop.
To add plain text, just type something. It will appear on your desktop.
You’ll find a list of variables here.
If you find a variable you would like to use, put them in your file like this:
$variable
An example would be
$membar
This will give you a bar with the amount of ram memory is used on your pc.
Other variables need to be put like this
${cpu cpu0}
This will become more logical once you take a peek at my conkyrc file and compare it to the screenshot.
–
Changes are you’ll want to have different colors in you conky file. Remember the previous list of colors? You can use those.
Before something you want to have a certain color, put this
${color DimGray}
Example:
${color white}This is my ${color red} conky ${color white}file
“This is my file” would be white and “conky” would be red.
Everything that will come after “file” would be white also, unless you specify another color.
–
It’s also possible to use different fonts.
Take a look at this:
${font Arial:bold:size=10}${color Tan1}PROCESSORS ${color DarkSlateGray}${hr 2}
You see you can specify a font using ${font fontname}. The bold:size=10 should also be obvious.
The ${hr 2} puts a horizontal line on the screen with a width of 2.
That line looks like this:
![]()
If you are wondering how people put symbols (like the linux pinguin or weather symbols) in their conky file, those are just fonts.
I suggest you go to dafont.com and look at some fonts with symbols (openlogos for example will give you all the linux/open source symbols).
–
Another thing to know before you start modifying a conky file you found online, or mine, is offsets.
They are a way to force something to be put higher or lower on the desktop.
You use ${voffset 50} to put somthing “50″ lower, or use ${voffset -50} to put something 50 higher.
This is usefull in quite some cases. You’ll see that this is used all the time in my conkyrc file.
–
Aligning something in conky is also needed all the time.
$alignr
Will align your text to right, $alignc will put it in the center.
You can also use ${alignc 20}
This will put something in the center, but 20 points of to the right.
The ${align 20} to gether with ${voffset 50} is used to put text next to eachother.
–
I suggest that at this time, you’ll take a look at my conkyrc file and start modifying it.
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 5
maximum_width 400
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color gray
default_shade_color red
default_outline_color green
alignment top_right
gap_x 10
gap_y 10
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer yes
text_buffer_size 256TEXT
${font openlogos:size=20}U${font Arial:size=20}${color Tan1}GNU${color Ivory}LINUX${font openlogos:size=20}t
${voffset -90}
${color DimGray}
${font}
${font Arial:bold:size=10}${color Tan1}SYSTEM ${color DarkSlateGray} ${hr 2}
$font${color DimGray}$sysname $kernel $alignr $machine
Intel Pentium D $alignr${freq_g cpu0}Ghz
Uptime $alignr${uptime}
File System $alignr${fs_type}${font Arial:bold:size=10}${color Tan1}PROCESSORS ${color DarkSlateGray}${hr 2}
$font${color DimGray}CPU1 ${cpu cpu1}% ${cpubar cpu1}
CPU2 ${cpu cpu2}% ${cpubar cpu2}${font Arial:bold:size=10}${color Tan1}MEMORY ${color DarkSlateGray}${hr 2}
$font${color DimGray}MEM $alignc $mem / $memmax $alignr $memperc%
$membar${font Arial:bold:size=10}${color Tan1}HDD ${color DarkSlateGray}${hr 2}
$font${color DimGray}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}%
${fs_bar /home}
/disk $alignc ${fs_used /media/disk} / ${fs_size /media/disk} $alignr ${fs_free_perc /media/disk}%
${fs_bar /media/disk}
/disk-1 $alignc ${fs_used /media/disk-1} / ${fs_size /media/disk-1} $alignr ${fs_free_perc /media/disk-1}%
${fs_bar /media/disk-1}${font Arial:bold:size=10}${color Tan1}TOP PROCESSES ${color DarkSlateGray}${hr 2}
${color DimGray}$font${top_mem name 2}${alignr}${top mem 2} %
$font${top_mem name 3}${alignr}${top mem 3} %
$font${top_mem name 4}${alignr}${top mem 4} %
$font${top_mem name 5}${alignr}${top mem 5} %${font Arial:bold:size=10}${color Tan2}NETWORK ${color DarkSlateGray}${hr 2}
$font${color DimGray}IP on eth0 $alignr ${addr eth0}Down $alignr ${downspeed eth0} kb/s
Up $alignr ${upspeed eth0} kb/sDownloaded: $alignr ${totaldown eth0}
Uploaded: $alignr ${totalup eth0}${font Arial:bold:size=10}${color Tan2}WEATHER ${color DarkSlateGray}${hr 2}
${font}${color DimGray}${voffset -25}${font Weather:size=45}${execi 1800 conkyForecast –location=BEXX0008 –datatype=WF}
${alignc 22}${voffset -60}${font Arial:bold:size=10}${color DimGray}${execi 1800 conkyForecast –location=BEXX0008 –datatype=HT}
$font${voffset -55}${alignr}${color DimGray}Wind: ${execi 1800 conkyForecast –location=BEXX0008 –datatype=WS}
${alignr}${color DimGray}Humidity: ${execi 1800 conkyForecast –location=BEXX0008 –datatype=HM}
${alignr}${color DimGray}Precipitation: ${execi 1800 conkyForecast –location=BEXX0008 –datatype=PC}${color DimGray}Sunrise: $alignr${execi 1800 conkyForecast –location=BEXX0008 –datatype=SR}${alignr}
Sunset: $alignr${execi 1800 conkyForecast –location=BEXX0008 –datatype=SS}$color${font Arial:bold:size=10}${color Tan2}MUSIC ${color DarkSlateGray}${hr 2}
${color DimGray}$font${if_running mpd}
$mpd_smart
$mpd_album
Bitrate $mpd_bitrate kbits/s
$mpd_status $mpd_elapsed/$mpd_length${font Arial:bold:size=10}${color Tan2}TIME ${color DarkSlateGray}${hr 2}
${color DarkSlateGray} ${font :size=30}$alignc${time %H:%Mh}
${voffset -30}${font :bold:size=10}$alignc${time %d %b. %Y}
${font :bold:size=8}$alignc${time %A}
$endif
4. Get your external ip adress
To have conky display your external ip adress, use
${execi 3600 wget -O – http://whatismyip.org/ | tail}
I use it like this
External IP$alignr${execi 3600 wget -O – http://whatismyip.org/ | tail}
This looks like this:

5. Audio info
If you took a look at the variables page I linked to before, you’ll see that conky has build in support for audacious, mpd (music player deamon) and xmms2.
You saw how to use those if you took a look at my conkyrc file posted above this.
But you can use other also, a few examples:
Rythmbox:
${exec rhythmbox-client –print-playing –no-start}
Note: it is – - (without the space) instead of –, I can’t help it, WordPress does this automatically.
Exaile:
${execi 10 exaile –get-title} – ${execi 10 exaile –get-artist}
Note: it is – - (without the space) instead of –, I can’t help it, WordPress does this automatically.
6. Weather info
You’ll noticed I had weather info displayed on my screen and it didn’t work on you computer.
This is because it’s using scripts to work.
Take a look here for that.
7. Gmail support
It’s also possible for conky to display gmail info, take a look here for that.
Edit: info about starting conky on start up, or manually can be found in the link of point 1 of this guide.







27 Comments
April 6, 2008 at 7:39 pm
[...] Update: I wrote a how-to on how to add weatherforecasting, audio info and gmail support in conky here. [...]
April 8, 2008 at 3:28 pm
Thanks for the Info
May 12, 2008 at 6:57 pm
The solution to display weather again is very simple – check this site:
http://ubuntuforums.org/showthread.php?t=784053
May 12, 2008 at 6:59 pm
The solution to display weather again is very simple – check this site:
http://ubuntuforums.org/showthread.php?t=784053
July 9, 2008 at 3:01 pm
Thanks, but the solution there doesn’t apply here.
July 9, 2008 at 3:26 pm
[...] Install and customizing instructions can be found here. [...]
August 7, 2008 at 7:20 pm
[...] similar to what you want, and then modify that. I started by using the guide that Linux Owns posted here, and expanding from [...]
August 14, 2008 at 11:04 am
Your blog is interesting!
Keep up the good work!
August 22, 2008 at 10:46 am
[...] The post can be found here. [...]
August 22, 2008 at 5:10 pm
[...] just discovered this wonderful conky tutorial at Linux Owns. I am planning on writing up a tutorial combining this one [...]
September 23, 2008 at 7:14 pm
Thank for the guide, it helped me out a lot. Nice site, with helpful info
September 24, 2008 at 12:18 pm
Thanks.
October 13, 2008 at 8:50 pm
Where do you get the colour names from?
i.e. dimgray darkslategray
October 14, 2008 at 9:40 am
“To get a list of colors, open this file in a browser or text editor: file:///usr/share/X11/rgb.txt”
October 17, 2008 at 12:57 pm
To restart conky while you try new sets in .conkyrc do in a terminal:
killall -SIGUSR1 conky
after each change in .conkyrc ,
it will restart conky whit the new settings.
November 4, 2008 at 9:43 pm
Nice, but:
Conky: ~/.conkyrc1: 30: no such configuration: ‘text_buffer_size’
Conky: unknown variable fs_type
November 5, 2008 at 9:45 am
Maybe they changed some variables in the new conky version.
I don’t know.
If fs_type doesn’t work, either look in the conky site for the new way to do it or just type “ext3″ or “reiserfs” yourself.
January 7, 2009 at 11:16 pm
Mine errors out as it says that I only have one CPU, and I don’t where to change the conckyrc file to get it working. Any help would be appreciated, thanks.
January 19, 2009 at 6:42 pm
[...] Create a custum conky setup [...]
January 30, 2009 at 8:57 am
Hi,
i was wondering if the “xftalpha 0.1″ actually makes the text semi-transparent? I’ve tried using different fonts with different setup options in conky and the text always stays stubbornly opaque.
Is there any options you need to modify to make sure that the alpha of the xft text actually works?
I’m using the latest Ubuntu, Intrepid Ibex.
Cheers
NM
February 2, 2009 at 11:02 am
@ Mohan:
Change this:
${font Arial:bold:size=10}${color Tan1}PROCESSORS ${color DarkSlateGray}${hr 2}
$font${color DimGray}CPU1 ${cpu cpu1}% ${cpubar cpu1}
CPU2 ${cpu cpu2}% ${cpubar cpu2}
To this:
${font Arial:bold:size=10}${color Tan1}PROCESSORS ${color DarkSlateGray}${hr 2}
$font${color DimGray}CPU1 ${cpu cpu1}% ${cpubar cpu1}
March 18, 2009 at 10:54 pm
[...] and i played around with some of them, like trying to show the weather like they’ve done here but i had some difficulties getting to work [...]
March 26, 2009 at 11:12 pm
[...] посте Create a custum conky setup описан процесс установки и настройки мощной [...]
May 10, 2009 at 6:35 pm
Thanks Ive been trying to understand conky for a few days
every1 has their conkyrc files uploaded but customizing them is difficult and requires too much other stuff xslt etc
This is really a good guide and has clearly shown how to customize the conkyrc files and whats even better is your conkyrc file works straightaway not much customization needed which is good for beginners.
May 10, 2009 at 10:18 pm
The setting is set to transparent in the conkyrc but its not transparent
Ontop of that ive been using the compiz wallpaper plugin
Bad mix I think im going to have to lose some eye candy
May 21, 2009 at 12:34 am
Thank you for showing exactly how to do this! You can make a script to reset conky:
#!/bin/bash
killall conky
conky
and then make it executable in properties. Easy for me and other newbies.
May 25, 2009 at 1:06 am
[...] followed a pretty solid guide found here. I have to get conky to detect my internet activity from my wireless card (right now it’s [...]