Create a custum conky setup
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.
Thanks for the Info
The solution to display weather again is very simple – check this site:
http://ubuntuforums.org/showthread.php?t=784053
The solution to display weather again is very simple – check this site:
http://ubuntuforums.org/showthread.php?t=784053
Thanks, but the solution there doesn’t apply here.
Your blog is interesting!
Keep up the good work!
Thank for the guide, it helped me out a lot. Nice site, with helpful info 🙂
Thanks.
Where do you get the colour names from?
i.e. dimgray darkslategray
“To get a list of colors, open this file in a browser or text editor: file:///usr/share/X11/rgb.txt”
cannot find file:///usr/share/X11/rgb.txt, i believe it’s a bug, not conky’s, but the fix is too complicated for me.
Same problem for me, though list of X11 colors can be found on wikipedia at http://en.wikipedia.org/wiki/X11_color_names
You just have to remove the spaces from the names.
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.
Nice, but:
Conky: ~/.conkyrc1: 30: no such configuration: ‘text_buffer_size’
Conky: unknown variable fs_type
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.
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.
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
@ 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}
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.
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
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.
Where can I download/install the additional fonts (openlogos & weather) ?
Thanks,
I don’t check this website anymore lately, but I still use my own guides like this when I reinstall my OS.
@ zmdwmw52:
try dafont.com
It’s the biggest one of it’s kind.
I believe I linked to the fonts in the article, too lazy to check.
Depending on the OS you are using, you might need to drop them in different directories.
In Ubuntu, and similar, it’s /home/user/.fonts
.fonts is a hidden folder, press “ctrl+h” in your file browser to see it.
Thanks for the reply. Yes, they were there on http://www.dafont.com, from where I downloaded them. However, to maintain continuity, I installed (i.e. copied over after ‘sudo’ from Terminal) the fonts to the /usr/share/fonts/truetype/ttf_others (created the last directory), because the Windows TT fonts are also there.
I haven’t yet tried out the script & fonts mentioned in your article, am using an older script.
Do you still use the same Conky script (if you use Conky, that is) ?
Hi, I got a problem, when I use this config my memory usage in conky shows 1.91Gib / 2.0Gib when System monitor shows usage at 450Mib only
Fixed 🙂 to proper show memory usage use:
no_buffers yes
Thanks for this conky (before I used also your xD)
Thanks for making such an awesome setup. I’m using a slightly modified version of it, but I’m having trouble getting the font for the system info changed. I’m using WenQuanYi Zen Hei, but I can only seem to get it to work with everything but the system info section. Here’s the code for that section :
${font}
${font Freebooter:bold:size=10}${color red2}SYSTEM ${color white} ${hr 2}
${font WenQuanYi Zen Hei:bold:size=8}${color DimGray}$sysname $kernel $alignr $machine
Intel Pentium Celeron $alignr${freq_g cpu0}Ghz
Uptime $alignr${uptime}
File System $alignr${fs_type}
Can anyone see what I’m doing wrong?
Pardon that last comment, after changing wallpapers, I’ve determined that the perceived differences in the font, were just that. I think the varying contrast caused it to look different.
Nicely done !
I’ve put together another conky tutorial myself, including how to get download status progress bars from rTorrent (with the execpi directive).
Your input would be appreciated !
http://www.sakana.fr/blog/2009/10/11/conky-integrating-rtorrent-downloads-monitoring/
Stéphane
I love this configuration but I can’t seem to get the clock, network status or weather working. If you could please help me that would be awesome! thanks
This setup is amazing, i was wondering if you could please tell me how to add wireless to this?
Thanks for the script tips. I’ve been going from scratch and this helped me add some really nice stuff.
Uuugggghhh, I have been working on this for the past 3 hours! I can’t find were to put/find my .conkyrc file. I have tried editing my .conf file, but to no avail. Conky just starts showing the same old default screen, even if my .conf files have not no text in them. HELP!
Thanks,
Gary
You should put your .conkyrc at home folder, for running it simply tipe conky on terminal or Alt+F2. But you can also put the .conkyrc anywhere and fur running it you need to modify the command to be like this conky -c /path/to/your/.conkyrc.
Hope it helps.
everything works great for me except weather, went to suggested site and downloaded installed (through deb) the files. weather will display correctly when using the suggested examples in conkyforecast directory, but won’t display correctly in conky when run through your script for me. where do you put the conkyForecast scripts I don’t see where conky calls the scripts to execute.
thanks in advance
everything works great except weather for me. I have downloaded and installed the weather related link stuff and it will display using the example scripts he included. when i try your setup all I get is a huge 33 C symbol and all the other lines have smaller versions. where do you place the .py scripts so they can gather information for display in conky?
thanks in advance
my problem was when I copied and pasted your code off this page. My browser and editor somehow managed to put em-dashes in the code instead of double-dashes. Python was having trouble reading them and would not catch the information request and download it. My only problem is display of temperature right now its showing 68A (with a hat over the A) oF (the degree symbol is correct, i don’t know how to show it here).
thanks in advance
Reblogged this on zhuyuejin.
I have followed your tutorial – it is very good. I’m having trouble with your script, it doesn’t appear so i’m adding lines a few at a tim eto a test scritp I have created. In your fist few lines you have ${font openlogos:size=20 – I’m guessing there is an image file somewhere called openlogo. What sort of image files can you have (e.g. jpeg) and where is this image located – in the same directory as the script?
Much appreciated with your mini tutorial. It gives me a sense of direction to modify my conky. Good work !!!!
I am curious to find out what blog system you are using?
I’m experiencing some minor security issues with my latest website and I would like to find something more secure. Do you have any solutions?
great guide……………with litle more polishing it can act as one point solution to all conky problems………please rply me to my email i got really important query i want to get it solved and i didnt find my answers anywher thanx
Reblogged this on From the Panopticon and commented:
Modding your conky! 🙂
Nice tutorial..Thank you
where is the rc file for this? I can not get the time to work.
thnaks you for helps
What’s up, constantly i used to check blog posts here in the early hours in the daylight, because i love to find out more and more. Fredericka, http://katrina.idsno.net/~mbgjw/gallery/?level=picture&id=2330&hl=
Hey there would you mind letting me know which web host you’re using? I’ve
loaded your blog in 3 completely different browsers and I must say
this blog loads a lot faster then most. Can you recommend a
good web hosting provider at a reasonable price? Kudos, I appreciate it!
An interesting discussion is worth comment. There’s no doubt that that you need to publish more about this issue, it may not be a taboo matter but usually people don’t speak about these issues.
To the next! Many thanks!!
I’m extremely impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a nice blog like this one nowadays.
These are actually fantastic ideas in regarding
blogging. You have touched some good things here.
Any way keep up wrinting.
Hi there, this weekend is good in favor of me, because this occasion i am reading this impressive educational article here
at my home.
I have a question I have a conky config I would like to add a calendar to, currently it shows weather, I would like to know what I would have to do to do this. Here is a link to what my current config looks like and also the config I use is transparent http://fav.me/d74cplf
Hi there, its nice piece of writing regarding media print,
we all be familiar with media is a enormous
source of data.
Way cool! Some extremely valid points! I appreciate you penning this write-up and
also the rest of the sute is also very good.
Post writing is also a fun, if youu be acquainted
with after that you can write otherwise it is difficult to write.
I think what you typed made a great deal of sense. But,
think about this, what if you composed a catchier title?
I ain’t saying your information is not good, however what
if you addeed a post title that grabbed people’s attention?
I mean Create a custum conky stup | Linux Owns is kindea plain.
You could look at Yahoo’s front page and note
how they create news headlines to grqb people to click. You might try adding a video or a pic or two
to grrab people interested about what you’ve written.
Just my opinion, it might bring your poss a littyle bit more interesting.
Investors often analyze any company’s financial statements over a period of occasion rather than counting on one declaration which is seriously just a bio of the corporation’s operations Generally, lender withdraws the amount out of your account with
the help of a postdated cheque
When seeking new details about this, it is quite common to not understand where to start. Thank the paradises I found this blog site! I would bet that this website gets its’ reasonable quantity of traffic due to the fact that of the accurate nature of its’ sunject matter. On the very same note, I ‘d lilke to extand my individual thankfulness to the posts’ author for sharing their competence.
I pay a visit each day a few web pages and sites to read content, except this
webpage gives feature based content.
is there a way to add a hyperlink to conky? So I would always have a bookmark link there? know what I mean?
Very good info. Lucky me I discovered your blog by accident (stumbleupon). I’ve book-marked it for later!|
This piece of writing provides clear idea for the new people of blogging, that really how to do running a blog.|
When someone writes an article he/she maintains the image of a user in his/her mind that how a user can understand it. So that’s why this piece of writing is amazing. Thanks!|