Nux!


Home » Stella » Howtos, tips & tricks » How to install & customize conky. (A simple guide on how to install & customize system monitoring utility conky.)
How to install & customize conky. [message #672] Sun, 18 November 2012 10:36 Go to next message
Haker Defo is currently offline  Haker Defo
Messages: 30
Registered: October 2012
Location: India
Member

(1) Basic Info: Conky is a lightweight system monitoring utility. It is different from other monitoring gadgets & widgets as it doesn't consume much resources & it is insanely customizable. It is available for almost all the Linux variants.
(2) Conky Settings: All the conky settings are done by a simple text file called "conkyrc". This is the file that controls the look & behavior of conky. For the sake of simplicity & understanding it can be divided in two parts (1) Configuration (2) Variables. Configuration part determines the look of conky like it's size, position, color, font, transparency etc. The second part Variables determines the data to be monitored & displayed. This data can be CPU frequency, Usage of RAM, CPU, HDD, network speed etc. This two parts are divide by a single line "TEXT". Configuration part is placed above the line "TEXT" & the Variables pat below it. Now the complete list of variables & configuration options is beyond the scope of this article but worry not! Conky team has put-up a very good documentation of them here,
Configuration: http://conky.sourceforge.net/config_settings.html
Variables: http://conky.sourceforge.net/variables.html
(3) Installation & First Look: Installation of conky is very simple. Open your terminal & type "yum install conky" without quotes, hit enter. Also install fortune by doing "yum install fortune-mod" Now to start conky, in your terminal type "conky" without quotes obviously & hit enter. You will have a conky running on your desktop & in it's default avatar it looks something like this,
http://twitpic.com/bdwy13
Nothing special i hear you say but hang on! the beauty of conky lies in it's infinite configurability.
(4) Customization: Now comes the interesting part! To customize our conky we will need a few extra files. To make life easier & get you started I've attached 3 files that you need to download to your user directory. First download the attached "weather.sh" file & open it in your text editor. You will have to replace the "INXX0383" part with your location code. To get your location code go to edg3.co.uk/snippets/weather-location-codes/ & search the code of your location. If you are in U.S. You can simply put in you zip code. If you want to see temperature in °F, replace the 'c' in "p=INXX0383&u=c" with 'f' and also replace 'C' in "/C<BR\" with 'F'. Now you will have to make "weather.sh" file executable. Back to terminal & type "chmod +x /home/yourname/weather.sh" & hit enter. Download the attached "silentping.sh" & make it executable as above. Now download the attached "conkyrc" file to your user directory and open it in your text editor. Here you will have to make certain changes according to your system. First if you have a multicore CPU then go to "CPU Info" section of conkyrc & according to the number of your cpu cores just add ${cpu cpu1}% ${cpu cpu2}% ${cpu cpu3}% ${cpu cpu4}%. I have made the conkyrc to monitor root partition usage if you want to monitor the usage of other file systems and partitions go to the "HDD Info" section and according to your needs you can add "${fs_size /boot} ${fs_used /boot}%"
"${fs_size /home} ${fs_used /home}%" "${fs_size /usr} ${fs_used /usr}%" If your network interface is other than eth0 than go to "network Info" and replace eth0 with your interface like eth1 for cable, wlan0 or wifi0 for wireless and ppp0 or ttyusb0 for mobile. In availability subsection under "Network Info" replace the 'hakerdefo' in "${texeci 10 /home/hakerdefo/silentping.sh 173.194.35.144 "up" "down"}${if_existing /home/hakerdefo/.status/173.194.35.144.up}${color 7FFF00}+++$else${color red}---$endif" with your username. Go to "Weather Info" section & replace 'Maroli' with the name of your location. You can add the extra variables according to your system & needs, Change the colors and fonts according to your taste. As i told you earlier only limitatio is your imagination. Now save this file to your home directory & rename it ".conkyrc" . This name change will make it hidden so if you want to modify it in future you'll have to tick 'show hidden files' or 'Ctrl+H'. In your terminal type "conky" hit enter & voila you should have a better looking & a bit more informative conky running on your desktop & it should look like this,
http://twitpic.com/be9277
(5) What Next: There are endless possibilities! You can use the lua scripting that is inbuilt in conky and google is your best friend here. Read on, Tweak settings and don't forget to share your conky pics in the screenshots section of stella forums. Cheers!
  • Attachment: weather.sh
    (Size: 0.15KB, Downloaded 420 times)
  • Attachment: silentping.sh
    (Size: 0.39KB, Downloaded 397 times)
  • Attachment: conkyrc
    (Size: 3.14KB, Downloaded 432 times)
Re: How to install & customize conky. [message #673 is a reply to message #672] Sun, 18 November 2012 10:52 Go to previous messageGo to next message
Haker Defo is currently offline  Haker Defo
Messages: 30
Registered: October 2012
Location: India
Member

There is a typo in the link to get your weather location code! Link is not working! Silly of me! sorry for that! Here is the correct link to get your weather location code http://edg3.co.uk/snippets/weather-location-codes/
And another clarification replace 'yourname' in "chmod +x /home/yourname/weather.sh" with your stella or centos username. And make sure you have saved all three files in your user directory. You will also have to replace 'hakerdefo' in "${color 7FFF00}${execi 300 /home/hakerdefo/weather.sh}" which is under Weather Info section in conkyrc file with your stella username. Sorry again for above mistakes! Cheers!

[Updated on: Sun, 18 November 2012 11:11]

Report message to a moderator

Re: How to install & customize conky. [message #674 is a reply to message #673] Sun, 18 November 2012 14:06 Go to previous messageGo to next message
symbianflo is currently offline  symbianflo
Messages: 176
Registered: January 2012
Location: italy
Senior Member

Thanks for this tutorial .
Re: How to install & customize conky. [message #675 is a reply to message #672] Sun, 18 November 2012 18:11 Go to previous messageGo to next message
Haker Defo is currently offline  Haker Defo
Messages: 30
Registered: October 2012
Location: India
Member

Some more info on the files that i've attached in the tutorial. I've included a conkyrc file that i've prepared because i believe that it is easy for a new user to modify it according to his-her computer specs and requirement than to build a conkyrc file from scratch. You can make the primary changes as described in the tutorial and get your conky running and after that you can read in detail the functions of all the variables and configurations from the official documentation, I've already included the links to them in the tutorial. And after that you can add-remove-modify-hack the conkyrc file and make many new configs. Weather.sh is a simple script that downloads the weather data from yahoo weather and make it conky ready. The other script silentping.sh pings the google.com and if all is okay you'll have green ++++ in conky and if the connection fails it displays ---- in red colour. Here are a couple of more links that can be useful, (1) cloford.com/resources/colours/500col.htm provides nearly 500 hex codes of colours and (2) www.dafont.com/ provides all kinds of fonts that can be used in conky configs. Cheers!

[Updated on: Sun, 18 November 2012 18:21]

Report message to a moderator

Re: How to install & customize conky. [message #676 is a reply to message #674] Sun, 18 November 2012 18:33 Go to previous messageGo to next message
Haker Defo is currently offline  Haker Defo
Messages: 30
Registered: October 2012
Location: India
Member

Cheers!!!
Re: How to install & customize conky. [message #677 is a reply to message #672] Sun, 18 November 2012 22:12 Go to previous messageGo to next message
nux is currently offline  nux
Messages: 1659
Registered: January 2012
Senior Member
Administrator

Thanks a lot!

To make it more readable you can select text and mark it as "code" (the {;;;} icon).
Re: How to install & customize conky. [message #678 is a reply to message #677] Mon, 19 November 2012 08:44 Go to previous messageGo to next message
Haker Defo is currently offline  Haker Defo
Messages: 30
Registered: October 2012
Location: India
Member

Thanks for the suggestion! I'll keep it in mind! Cheers!
Re: How to install & customize conky. [message #681 is a reply to message #672] Sat, 24 November 2012 08:48 Go to previous messageGo to next message
Haker Defo is currently offline  Haker Defo
Messages: 30
Registered: October 2012
Location: India
Member

A cool trick to add Stella logo in conky!!! Go to Stella home page and download the Stella logo to your Pictures directory, Open your .conkyrc in gedit and just add the following code,
${alignc}${image /home/username/Pictures/Stella_logo.png -p 35,20 -s 199x49}
Replace 'username' with your stella username and you'll have a cool Stella logo in your conky looking like this,
http://imageshack.us/a/img833/3801/conkywithstellalogo.th.png
If you want the Stella logo at the top like in the image just add the above code right after "TEXT" in your .conkyrc & if you want to place it somewhere else you will have to tweak the alignment part according to your config. Cheers!!!

[Updated on: Sat, 24 November 2012 08:50]

Report message to a moderator

Re: How to install & customize conky. [message #682 is a reply to message #681] Sat, 24 November 2012 10:54 Go to previous messageGo to next message
nux is currently offline  nux
Messages: 1659
Registered: January 2012
Senior Member
Administrator

Wow, nice. Not a user of conky, but that thing looks pretty neat. Cheers Smile
Re: How to install & customize conky. [message #683 is a reply to message #672] Sat, 24 November 2012 13:36 Go to previous message
symbianflo is currently offline  symbianflo
Messages: 176
Registered: January 2012
Location: italy
Senior Member

wow niceeeeeeeeeeee
Previous Topic: Sopcat
Next Topic: Live USB Key
Goto Forum:
  


Current Time: Thu Sep 19 16:14:16 BST 2019

Total time taken to generate the page: 0.03207 seconds