Conky ring widget from ConkyHardcore

Craig_Dem
  13 years ago
  16

This tutorial will show you how to get rings on your desktop via conky using lua and cairo. A picture of my desktop can be found here: http://imgur.com/oukFc.png

How to use the ring conky widgets from ConkyHardcore

The conky ring widgets are rings that are generated onto the screen via lua and cairo from within conky. They can be used to show memory usage, Cpu usage, battery power and Filesystem use.

Terms used:

  • $ - This means that the following line should be inputed into a terminal.
  • ~/ - This is a shortcut to your home directory. E.g if a file was in /home/craig/scripts/myscript.lua, it could also be written as ~/scripts/myscript.lua
  • Single Core, Dual Core and Quad core is the amount of cores your processor has. Most modern Processors are dual or quad. 
  • & - Tells the computer to background a task
  • && - Tells the computer to do this task before proceeding.

Requirements:

  • Conky 1.7.2+ (Because 1.7.2 upwards are compiled with lua and cairo)
  • Conky takes care of all the rest of the dependancies.

Instructions:

1. Install Conky and create a .conkyrc in your home folder. Mine is here: http://tinyurl.com/my-conkyrc

2. Download my configuration of the ConkyRings lua script, save it somewhere on your computer. The version you should download differs on the amount of cores your processor has.

This will change the amount of rings generated. There will be aring for memory use and a ring for each core you have's usage. My picture shows a quad core configuration.

3. Add these lines to your .conkyrc to call the lua script. BEFORE THE TEXT PART

lua_load ~/path/to/the/lua/script/rings-cores.lua

lua_draw_hook_pre ring_stats

What this does is load the lua script. You should specify where you have stashed the file. For example, mine is in ~/bin/rings-quad-core.lua . You should modify this to be relevant to you. ~/ is a shortcut to writing home.

4. Start conky with

$ conky -c /path/to/where/your/conkyrc/is        

$ Mine is in ~/.conkyrc . This makes conky start with the configuration file .conkyrc which is placed in my home folder. If you place it anywhere else, update the link to show that. e.g conky -c ~/scripts/.conkyrc if it is in a folder called scripts in your home folder.

5. Create a script to start your conky at startup

#!/bin/bash

sleep 11 &&

conky -c ~/.conkyrc &

#!/bin/bash tells the computer you want it to do the following in bash, sleep 11 && tells the computer to wait 11 seconds (Allows for compiz to start and not cause problems), conky -c ~/.conkyrc actually starts conky.

Call it conky.sh, make it executable and then add it to your startup programs in Preferences -> Startup Applications.

Notes:

I did not create these scripts, I purely edited them for my tastes. Original files are found at: 

http://conky.linux-hardcore.com/beginners/how-did-he-do-that/by-londonali1010/ring-meters-for-conky-1-7-2/

It seems that the ConkyHardcore guys have finally tidied up the page on the script and make it a lot simpler to work out how to add them to your conky. I suggest checking that page if you want info on adding anything else to the rings.

If you need any help, I'm available normally from 4pm till 12pm (British Time) in any of the linuxmint channels. I may not be at the computer outside of those times.

All my personal conky configurations and stuff can be found in http://cogigo.com/scripts/conky/


 sleep 11 &&
conky -c ~/.conkyleft &&
conky -c ~/.conkyright &&
conky -c ~/.conkytest &
#!/bin/bash
sleep 11 &&
conky -c ~/.conkyleft &&
conky -c ~/.conkyright &&
conky -c ~/.conkytest
Comments
blueXrider 12 years ago

If you really want to see some nice work take a look here in the forums

http://forums.linuxmint.com/viewtopic.php?f=60&t=30209&p=392703&hilit=conky+sector+11#p392703


pois3 12 years ago

to much of a pain


Reves-Yosoy 13 years ago

@mintmaniac2,
Maybe that's cause your "conky.sh" isn't pointing to any ".conkyrc".
Try to rename either ".conkyleft", ".conkyright" or ".conkytest" to ".conkyrc" and save it in your /home.


hatani 13 years ago

I love that desktop, clean and informative, same as tutorial, thank you :)


mintmaniac2 13 years ago

I have copied you .conkyleft, .conkyright and .conkytest files to my home directory, and put conky.sh, debupdates.sh and the lua rings to ~/Bin. I have made conky.sh executable and when I try to run it from a terminal, I get this error message: Conky: missing text block in configuration; exiting
***** Imlib2 Developer Warning ***** :
This program is calling the Imlib call:

imlib_context_free();

With the parameter:

context

being NULL. Please fix your program.


Craig_Dem 13 years ago

@Mdyter I have updated the tutorial to provide links to a server where I have them stored.

I use avant-window-navigator (ppa:awn-testing/ppa in software sources) for my dock.

Conky with rings: http://cogigo.com/scripts/conky/conkytest

Conky on left of dock: http://cogigo.com/scripts/conky/conkyleft

Conky on right of dock: http://cogigo.com/scripts/conky/conkyright


Mdyter 13 years ago

@Craig_Dem Could you show us all your conkyrc?
i would like to experiment with it a little =)
are you using gnome-do at the bottom of the screen?or something else?
i'll try to setup the rings too
thanks)


jkw 13 years ago

The link in the tutorial links to the thumbnail.

Remove the .../th_Screenshotnewithink.png


remoulder 13 years ago

Good tutorial, but how about explaining what the ring widget is and why you might want it?