You are not logged in.

#976 2012-04-17 19:11:21

Awebb
Member
Registered: 2010-05-06
Posts: 6,602

Re: conky configs and screenshots!

Sector11 wrote:

I call it:  Hugs are hugs, and out of 3, this is a 5 Star HUG if I've ever seen one!
I want that hug!

*hugs* It was just a matter of time until I find you here, huh?

Offline

#977 2012-04-19 23:53:33

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: conky configs and screenshots!

I just added the following line in my conkyrc (which is here on a previous page):

${color3}CPU temp: ${color1}$alignr${execi 10 sensors | grep ^temp1 | tail -n 1 |awk '{print $2}'}

I'm not getting the cpu temp. I think it must be the motherboard.

To test I have been running glxgears in full screen on one of my desktops. When viewed via Sensors this has gradually bought the cpu temps up from the 30's to the low 50's C.

The output from the above conkyrc line during the same time has been gradually moving around back & forth in the space between ~34 C. & ~40 C.

I don't know how to set it to my i5 quad core?

Any suggestions will certainly be appreciated.

Here is the output from Sensors:

handy ~  $  sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +52.0°C  (high = +82.0°C, crit = +102.0°C)
Core 0:         +52.0°C  (high = +82.0°C, crit = +102.0°C)
Core 1:         +51.0°C  (high = +82.0°C, crit = +102.0°C)

<---- snip ---->

If I could use the output from "Physical id 0:" to feed my conky display I think that would be very cool.  8-)  (No pun intended!)


[edit:] OK, I've been shown that it is as simple as this:

sensors | grep ^"Physical id 0:" | awk '{print $4}'

How do I detect just what "Physical id 0:" is?

Using that info' I could check "Core 0:", & "Core 1:". I cannot check Cores 2 & 3 though? Is that due to the way that the i5 is made - somehow having 2 prime cores that each share something with the 2 sub-cores that they carry?

Last edited by handy (2012-04-20 01:44:49)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#978 2012-04-20 01:37:52

JeSuisNerd
Member
From: /home/egon
Registered: 2012-03-06
Posts: 30

Re: conky configs and screenshots!

It's taken me many hours of tweaking and some fixes after moving it from my late Ubuntu system, buy I present my current conky config.
This assumes that you have todo.sh and acpi installed.  All other scripts it uses are located in ~/scripts.

Screenshot

.conkyrc  (uses Bitstream Vera Sans Mono and Ubuntu fonts)

The rather sizeable conky_widgets.lua I've pieced together.  Uses Londonali1010's wrapper script, clockwise rings, my own counterclockwise rings fix, and rectangular graphs by wlourf.
A handy dandy design choice I've made is that the network graphs don't go in the same direction--the up traffic graph progresses upwards, the down speed graph goes down.

getip.sh

baddery.sh gives one of four different statuses based on the output of acpi -b: the time remaining if the battery is charging or discharging, "fully charged," or "unknown status" in the case that acpi reports an unknown status.

The following two files are in ~/.todo and define the colors that are used by the integrated todo.sh output:

config
config-conky

I don't need to have a small conky to fit my needs, but I did do my best to make it look clean.
I also wanted to find a way to depart from the rectangular standard style without going too crazy with the formatting.

Last edited by JeSuisNerd (2012-04-23 23:35:32)

Offline

#979 2012-04-20 02:20:15

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

.

Last edited by Sector11 (2012-05-01 13:12:41)

Offline

#980 2012-04-20 02:21:56

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

Awebb wrote:
Sector11 wrote:

I call it:  Hugs are hugs, and out of 3, this is a 5 Star HUG if I've ever seen one!
I want that hug!

*hugs* It was just a matter of time until I find you here, huh?

Yup, I'm in conky threads all over the place.
That's why I need my SR-11 lol

Last edited by Sector11 (2012-04-20 02:28:16)

Offline

#981 2012-04-20 02:43:02

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

.

Last edited by Sector11 (2012-05-01 13:12:15)

Offline

#982 2012-04-20 03:24:31

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: conky configs and screenshots!

@Sector11: Thanks for your valuable & information rich (as usual) post . smile

I removed the caret (^) & it works fine so I've deleted them all. Who needs extra stuff to add to the confusion?

[edit:] I've leaned the following re the caret:

The caret anchors the search to the start of the string (and "$" will anchor to the end)

So it looks like the caret helps to make searches more efficient. Not that it would make all that much difference in this particular situation though. wink

Last edited by handy (2012-04-20 22:21:22)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#983 2012-04-20 14:52:02

fog
Member
From: greece
Registered: 2012-04-19
Posts: 5
Website

Re: conky configs and screenshots!

My current conky:

KiUUZ.png

.conkyrc: http://pastebin.com/KSi8mHyH
conky_grey.lua: http://pastebin.com/psZUwZS1

Conky addicted for many years. Some older screenshots:

Macbook/Ubuntu 2010:

0nMzns.jpg

Macbook/Ubuntu 2010:

6aG0fs.jpg

Desktop/Ubuntu 2009:

GJDa9s.jpg

Netbook/Fuduntu 2012:

j9TVUs.png

Last edited by fog (2012-04-20 14:54:13)


I’m not antisocial, I’m just not user friendly.

Offline

#984 2012-04-21 19:12:50

mrpeachy
Member
Registered: 2011-12-31
Posts: 4

Re: conky configs and screenshots!

Sector11 wrote:
xorgx3 wrote:

No, weather script is mrbean (http://crunchbanglinux.org/forums/topic … r-in-conky), with simple modifications smile

I'm glad that you like this smile

hahahahahahah 'mrbean' I like that, mrpeachy would probably get a kick out of it as well.

Your weather layout has to be once of the cleanest, easiest to read layouts I have seen in a long time.  Very well done.  That v9000 weather script is really a super script.

He is also doing some great stuff with his "interactive" conky as well.

this is not me:
http://www.youtube.com/watch?v=etUq95XKGiw
big_smile

Offline

#985 2012-04-22 06:15:07

kleitonkk
Member
From: Brazil
Registered: 2012-04-22
Posts: 10

Re: conky configs and screenshots!

JeSuisNerd wrote:

It's taken me many hours of tweaking and some fixes after moving it from my late Ubuntu system, buy I present my current conky config.
This assumes that you have todo.sh and acpi installed.  All other scripts it uses are located in ~/scripts.

Hello JeSuisNerd all right?

I'm trying to follow your setup but I am getting the following output

k[~/.todo]$ Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
....

I checked the line indicated but do not know where to modify it could help me?

Line:
if flagOK>0 then
        --abort script if error in one of the tables
        print ("ERROR : Check the graph_setting table")
        return
    end


Thank you.

Offline

#986 2012-04-23 00:57:43

JeSuisNerd
Member
From: /home/egon
Registered: 2012-03-06
Posts: 30

Re: conky configs and screenshots!

kleitonkk wrote:

Hello JeSuisNerd all right?

I'm trying to follow your setup but I am getting the following output

k[~/.todo]$ Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
Conky: llua_do_call: function conky_widgets execution failed: /home/k/.scripts/conky_widgets.lua:587: attempt to compare number with nil
....

I checked the line indicated but do not know where to modify it could help me?

Line:
if flagOK>0 then
        --abort script if error in one of the tables
        print ("ERROR : Check the graph_setting table")
        return
    end


Thank you.

Hmm.  That's already in the widget wrapper script from Londonali1010, so it's not my code and I've never had a problem with it.

It looks like your problem should be fixed if line 568 (flagOK=0) is moved before the if statement on 565 (if updates<=1 then).  This will ensure that flagOK is being initialized.  The resulting segment should look like...

flagOK=0
if updates<=1 then    
    set_settings()
	    
    for i in pairs(graph_settings) do
        if graph_settings[i].width==nil then graph_settings[i].width=100 end
        if graph_settings[i].nb_values==nil then  
            graph_settings[i].nb_values= graph_settings[i].width
        end
        .....

Offline

#987 2012-04-23 01:31:57

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

.

Last edited by Sector11 (2012-05-01 13:11:30)

Offline

#988 2012-04-23 03:53:56

rlasalle15
Member
From: Providence, RI-- USA
Registered: 2012-04-21
Posts: 3

Re: conky configs and screenshots!

Hey guys...wondering if anyone had a good conky config for Intel/Nvidia Optimus GPU.

Thanks!

Offline

#989 2012-05-19 05:36:04

n1x4
Member
From: Chernobyl
Registered: 2012-02-17
Posts: 149
Website

Re: conky configs and screenshots!

t-con.png


||github||

Offline

#990 2012-05-23 11:31:17

Nesousx
Member
Registered: 2012-03-27
Posts: 46
Website

Re: conky configs and screenshots!

Sector11 wrote:
Nesousx wrote:

Hi  all,

I am trying to set up some "specific" conky config, but I can't find a way to do it. I wish to display a small country flag depending on my IP.  What I am trying now, is to run a script in cron that grabs the source from the following page : http://aruljohn.com/details.php. Then it checks for specific string "lu.gif"; "us.guf" or "fr.gif", since my IP can be one of those 3 possibilities.

I don't do any script writing but if your IP's are static why not use ${if_match} and your own images/icons:

${if_match "${addr eth0}"=="000.000.000.00"}${image ~/Conky/images/lu.png -p 0,0 -s 30x10}${else}\
${if_match "${addr eth0}"=="111.111.111.11"}${image ~/Conky/images/us.png -p 0,0 -s 30x10}${else}\
${if_match "${addr eth0}"=="222.222.222.22"}${image ~/Conky/images/fr.png -p 0,0 -s 30x10}${else}\
${image ~/Conky/images/UN.png -p 0,0 -s 10x10}${endif}${endif}${endif}

UN.png would be an unknown IP.

Grab some really nice flag icons
http://www.famfamfam.com/lab/icons/flags/  (very small though)
or
http://www.veryicon.com/icons/flag/

I grabbed my country code here but hated the flag:

wget -O $HOME/IP_C.txt "http://www.phptutorial.info/iptocountry/"

http://t.imgbox.com/aaq7GmuO.jpg

Just an opinion but I would be more inclined to search for my "country" on the net and then based on the results use an archived image on my HDD.  You could wrap that whole ${if_match} code inside an ${if_up} command:

if_up
 	(interface)
 	if INTERFACE exists and is up, display everything between $if_up and the matching $endif
${if_up wlan0\
  ${if_match "${addr eth0}"=="000.000.000.00"}${image ~/Conky/images/lu.png -p 0,0 -s 30x10}${else}\
  ${if_match "${addr eth0}"=="111.111.111.11"}${image ~/Conky/images/us.png -p 0,0 -s 30x10}${else}\
  ${if_match "${addr eth0}"=="222.222.222.22"}${image ~/Conky/images/fr.png -p 0,0 -s 30x10}${else}\
  ${image ~/Conky/images/UN.png -p 0,0 -s 10x10}${endif}${endif}${endif}}\
${else}${image ~/Conky/images/NOT.png -p 0,0 -s 10x10}${endif}

NOT.png is "not connected"

Great workaround, thanks a lot!

Offline

#991 2012-05-29 11:58:35

unluckyfool
Member
Registered: 2011-08-29
Posts: 17

Re: conky configs and screenshots!

The panel at the top is infact conky, I am using a script located below to get the status from cmus.

Preview:
tZHp0dg

Conkyrc:
http://pastebin.com/zkaJ8uVw

The script for cmus is located here:
http://pastebin.com/hkQ6kx2A

Offline

#992 2012-06-01 15:05:00

Nihility
Member
Registered: 2011-12-29
Posts: 2

Re: conky configs and screenshots!

@ unluckyfool

nice, it would be perfect if it has the artist and not only the song title

Offline

#993 2012-06-01 23:37:26

pithdillinja
Member
From: Arizona
Registered: 2012-03-22
Posts: 3

Re: conky configs and screenshots!

Here's mine, it's quite simple and is basically an extension of the original configuration. Uses the terminus font(arch package: terminus-font). Reads music status from MPD, and the battery bar goes from green to red with all the intermediate colors! big_smile (no special scripts required for it). Also, the time section on the bottom requires the font titled AvantGarde CE.

conky_6-1-12.png

alignment tr
background no
border_width 1
stippled_borders 1 
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color black
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
font Terminus:size=8
xftfont Terminus:size=8
gap_x 5
gap_y 5
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window_transparent yes
own_window yes
own_window_class Conky
own_window_type normal
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale yes
show_graph_range yes
mpd_host localhost
mpd_port 6600
double_buffer yes


TEXT
${font}${scroll 42 $nodename - $sysname $kernel on $machine }
$hr
${color lightblue}Uptime:$color $uptime
${color lightblue}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color lightblue}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color lightblue}CPU Usage:$color $cpu% ${cpubar 4}
${color lightblue}Processes:$color $processes  ${color lightblue}Running:$color $running_processes
#$hr
${color lightblue}File systems: ${stippled_hr}
 /root 	$color${fs_used /}/${fs_size /} ${fs_bar 4 /} ${color lightblue}
 /home 	$color${fs_used /home}/${fs_size /home} ${fs_bar 4 /home}
${color lightblue}Networking: ${stippled_hr}
 Up:$color ${upspeed wlan0} ${color lightblue} - Down:$color ${downspeed wlan0}
 ${wireless_essid wlan0} ${wireless_bitrate wlan0} ${wireless_link_qual_perc wlan0}% ${color grey}${wireless_link_bar 4 wlan0}
 ${color lightblue}wlan0 ip addr: ${color}${addr wlan0}
$hr
${color grey}Name              PID   CPU%   MEM%
${color lightblue} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightblue} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightblue} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightblue} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color lightblue} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${color lightblue} ${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}
${color}$hr
${alignc}${color}${scroll 42 2 ${mpd_smart}}
${alignc}${color lightblue}${mpd_status} - ${mpd_elapsed} / ${mpd_length}
${color lightblue}${mpd_bar 4}
#${color}${stippled_hr}
${color}Battery is ${battery BAT0}. 
#the next line is a battery bar color script. 100% green, 70% light green, etc.
${if_match ${battery_percent BAT0} < 100}${color green}${endif}${if_match ${battery_percent BAT0} < 70}${color lightgreen}${endif}${if_match ${battery_percent BAT0} < 50}${color yellow}${endif}${if_match ${battery_percent BAT0} < 35}${color orange}${endif}${if_match ${battery_percent BAT0} < 15}${color red}${blink BATTERY WARNING ${battery_percent BAT0}%}${endif}${battery_bar 4 BAT0}
${color}${battery_time BAT0} remaining.
${color lightblue}kernel.org - ${kernel}${stippled_hr}
${color}${scroll 42 2 ${rss http://www.kernel.org/kdist/rss.xml 10 item_titles 3 2}}
${color lightblue}Most Recent Arch Packages ${stippled_hr}
${color}${rss http://www.archlinux.org/feeds/packages/ 10 item_titles 10 1}
${color lightblue}Slashdot Ticker${stippled_hr}
${scroll 42 8 ${color}${rss http://slashdot.org/slashdot.rss 5 item_titles 5 2}}
${alignc}${font AvantGarde CE:size=12}${color grey}${time %T, %A  %D}

Offline

#994 2012-06-06 10:00:34

atrocmh
Member
Registered: 2011-08-01
Posts: 11

Re: conky configs and screenshots!

Hi all
these are my best conkys
if u like my work let me know (-;
2012_06_06_1338976482_1280x800_scrot.jpg

Offline

#995 2012-06-06 14:34:10

micoka7
Member
Registered: 2012-02-09
Posts: 28

Re: conky configs and screenshots!

atrocmh wrote:

Hi all
these are my best conkys
if u like my work let me know (-;
http://s14.postimage.org/khlqg3ljx/2012_06_06_1338976482_1280x800_scrot.jpg

that's what a desktop should look like! awesome work, mate!

Offline

#996 2012-06-07 09:49:04

daneel971
Member
Registered: 2008-03-28
Posts: 197

Re: conky configs and screenshots!

atrocmh wrote:

if u like my work let me know

We do smile
Mind sharing the config?

Offline

#997 2012-06-10 04:38:49

atrocmh
Member
Registered: 2011-08-01
Posts: 11

Re: conky configs and screenshots!

not at all, ive changed a few things and i dont use wallpapers now, here is the new screenshot
2012_06_10_1339301561_1280x800_scrot.jpg
conky as part of the panel

background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 3
gap_y 78

#minimum_size 480 1
#maximum_width 304

own_window yes
own_window_type override
own_window_transparent yes

#own_window_class Conky
#own_window_argb_visual yes
#own_window_argb_value 100

own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment tl

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

override_utf8_locale yes
use_xft yes
xftfont Sans:size=7
xftalpha 1
uppercase no

default_color C07C00
color0 white

TEXT
${battery_bar 10,33}
${voffset -6}${color0}${alignc}BAT${color}
#
${fs_bar 10,33 /}
${voffset -6}${color0}${alignc}/${color}
#
#${color0}${alignc}HOME${color}
#${fs_bar 20,33 /home}
#${color0}${alignc}BOOT${color}
#${fs_bar 20,33 /boot}
#
${cpugraph cpu1 20,33}
${voffset -20}${color0}${alignc}CPU1${color}
#
${cpugraph cpu2 20,33}
${voffset -20}${color0}${alignc}CPU2${color}
${voffset -6}
${memgraph 20,33}
${voffset -20}${color0}${alignc}MEM${color}
#
${voffset 4}${swapbar 10,33}
${voffset -6}${color0}${alignc}SWAP${color}
#
${upspeedgraph eth0 20,33}
${voffset -30}${upspeedgraph wlan0 20,33}
${voffset -20}${color0}${alignc}UP${color}
#
${downspeedgraph eth0 20,33}
${voffset -30}${downspeedgraph wlan0 20,33}
${voffset -20}${color0}${alignc}DOWN${color}
${voffset -6}
${diskiograph_read 20,33}
${voffset -20}${color0}${alignc}READ${color}
#
${diskiograph_write 20,33}
${voffset -20}${color0}${alignc}WRITE${color}

conky on the left

background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 66
gap_y 15

minimum_size 600 1
maximum_width 600

own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

alignment tl

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont caviar dreams:size=8
#xftalpha 0.5
uppercase no

default_color gray

TEXT  
${color FF7E00}   Process Tree${color}
${exec echo " " && pstree -n | sed -n '1p;2p;3p;4p;5p;6p;7p;8p;9p;10p;11p;12p;13p;14p;15p;16p;17p;18p;19p;20p;21p;22p;23p;24p;25p;26p;27p;28p;29p;30p;31p;32p;33p;34p;35p;36p;37p;38p;39p;40p;41p;42p;43p;44p;45p;46p;47p;48p;49p;50p;51p;52p;53p;54p;55p;56p;57p'}

conky on the right

background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 15
gap_y 0

minimum_size 350 750
maximum_width 304

own_window yes
own_window_type override
own_window_transparent yes

#own_window_class Conky
#own_window_argb_visual yes
#own_window_argb_value 100

own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment tr

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
uppercase no

default_color white
color1 ffffff
color2 4D4D4D
color3 gray
color4 white
color5 white

lua_load /home/***put your lua directory here!!!***
lua_draw_hook_post main

TEXT
${alignr}${kernel}
${alignr}$uptime_short
${alignr}${battery}


$color3${font sans:size=30}$alignc${time %H:%M}$font$color
$alignc${time %d %b %Y}
$alignc${time %A}

${voffset 10}
${goto 45}${cpugraph 80,260 222222 00B2FF}
${voffset -96}${goto 57}${color5}CPU${color4}
${goto 45}${top name 1}$alignr${top cpu 1}%${color3}
${goto 45}${top name 2}$alignr${top cpu 2}%
${goto 45}${top name 3}$alignr${top cpu 3}%
${goto 45}${top name 4}$alignr${top cpu 4}%
${goto 45}${top name 5}$alignr${top cpu 5}%
${goto 45}${top name 5}$alignr${top cpu 6}%
${goto 45}${cpugraph cpu1 20,130 222222 00B2FF}$alignr${cpugraph cpu2 20,130 222222 00B2FF}
${voffset -20}${goto 90}   Core 1 - ${cpu cpu1}% $alignr ${cpu cpu2}% - Core 2  
${goto 45}${processes} processes 

${voffset 28}
${goto 45}${memgraph 80,260 222222 00C62C}
${voffset -96}${goto 57}${color5}MEM${color4}
${goto 45}${top_mem name 1}$alignr${top_mem mem 1}%${color3}
${goto 45}${top_mem name 2}$alignr${top_mem mem 2}%
${goto 45}${top_mem name 3}$alignr${top_mem mem 3}%
${goto 45}${top_mem name 4}$alignr${top_mem mem 4}%
${goto 45}${top_mem name 5}$alignr${top_mem mem 5}%
${goto 45}${top_mem name 6}$alignr${top_mem mem 6}%

${voffset 25}
${goto 45}${diskiograph 50,260 222222 DB6F00}
${voffset -65}${goto 57}${color5}DISKS${color3}
${goto 45}/home	used: $alignr${fs_used /home}
${goto 45}/          used:$alignr${fs_used /}
#${goto 45}HDD	 temp: $alignr ${hddtemp /dev/sda}°C

${goto 45}${diskiograph_read 20,130 222222 DB6F00}$alignr${diskiograph_write 20,130 222222 DB6F00}
${voffset -20}${goto 45}   read - ${diskio_read}% $alignr ${diskio_write} - write  

${voffset 22}
${goto 57}${color5}Wired LAN (${addr eth0})${color3}
${goto 45}....Up${alignr}${upspeedgraph eth0 10,200 222222 AF00FF}
${goto 45}....Down${alignr}${downspeedgraph eth0 10,200 222222 C61300}
${voffset -25}${alignr}${upspeed eth0}
${alignr}${downspeed eth0}

${voffset 22}
${goto 57}${color5}Wireless LAN (${addr wlan0})${color3}
${goto 45}....Up${alignr}${upspeedgraph wlan0 10,200 222222 AF00FF}
${goto 45}....Down${alignr}${downspeedgraph wlan0 10,200 222222 C61300}
${voffset -25}${alignr}${upspeed wlan0}
${alignr}${downspeed wlan0}

the lua part

--==============================================================================
--                                 conky_grey.lua
--
--  author  : SLK
--  version : v2011062101
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================

require 'cairo'

--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=155,                         y=90,
    graph_radius=66,
    graph_thickness=5,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xFF6900,      graph_fg_alpha=0.5,
    txt_radius=22,
    txt_weight=0,                  txt_size=0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1,
    graduation_radius=27,
    graduation_thickness=5,        graduation_mark_thickness=0,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=155,                         y=90,
    graph_radius=73,
    graph_thickness=5,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x005DFF,      graph_fg_alpha=0.5,
    txt_radius=34,
    txt_weight=0,                  txt_size=0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1,
    graduation_radius=59,
    graduation_thickness=7,        graduation_mark_thickness=3,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=155,                         y=90,
    graph_radius=80,
    graph_thickness=5 ,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00FF38,      graph_fg_alpha=0.5,
    txt_radius=0,
    txt_weight=0,                  txt_size=0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=2,        graduation_mark_thickness=0,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    },
}

--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu1',                  max_value=100,
    x=40,                          y=162,
    graph_radius=34,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x0D00FF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=2,        graduation_mark_thickness=0,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu2',                  max_value=100,
    x=40,                          y=162,
    graph_radius=22,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00DEFF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=22,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='memperc',                arg='',                      max_value=100,
    x=40,                          y=342,
    graph_radius=34,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x005C15,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=35,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=24,
    graduation_thickness=8,        graduation_mark_thickness=0,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='fs_used_perc',           arg='/',                     max_value=100,
    x=40,                          y=482,
    graph_radius=34,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xDB6F00,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='fs_used_perc',           arg='/home/',                max_value=100,
    x=40,                          y=482,
    graph_radius=22,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xFFEF00,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=22,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='downspeedf',           arg='eth0',                max_value=100,
    x=40,                          y=608,
    graph_radius=34,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xC61300,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='upspeedf',           arg='eth0',                max_value=100,
    x=40,                          y=608,
    graph_radius=22,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xFF3CC2,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=22,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='swapperc',           arg='',                max_value=100,
    x=40,                          y=342,
    graph_radius=22,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00FF38,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=22,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='downspeedf',           arg='wlan0',                max_value=100,
    x=40,                          y=695,
    graph_radius=34,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xC61300,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.5,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.6,
},
{
    name='upspeedf',           arg='wlan0',                max_value=100,
    x=40,                          y=695,
    graph_radius=22,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0xFF3CC2,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=22,
    txt_weight=0,                  txt_size=10,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.5,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.6,
},
}
-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = value % (max_value + 1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end
    
    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end
    
    for i in pairs(gauge) do
        load_gauge_rings(display, gauge[i])
    end
end
function pie_rings (xc, yc, r)

    pat = cairo_pattern_create_radial (xc, yc, 0.2*r, xc,  yc, r);
    cairo_pattern_add_color_stop_rgba (pat, 0.1, 1, 1, 1, 0);
    cairo_pattern_add_color_stop_rgba (pat, 1.0, 1, 1, 1, 0.3);
    cairo_set_source (cr, pat);
    cairo_arc (cr, xc, yc, r, 0, 2 * math.pi);
    cairo_fill (cr);
    cairo_pattern_destroy (pat);


    cairo_set_font_size (cr, 10)
    cairo_select_font_face (cr, "LCDMono",
                CAIRO_FONT_SLANT_NORMAL,
                CAIRO_FONT_WEIGHT_NORMAL)    
    cairo_set_line_width (cr, 2.0)

    -- Show total mem usage
    local str1 = conky_parse(string.format('${mem}'))
    local str2 = string.match(str1, "(%d+)")
    local str3 = string.match(str1, "(%a+)")

    cairo_set_source_rgba(cr, 1, 1, 1, 1)
    cairo_move_to (cr, xc-9, yc-1)
    cairo_show_text (cr, str2)
    cairo_move_to (cr, xc-9, yc+9)
    cairo_show_text (cr, str3)
    cairo_stroke(cr)

    -- Get top mem usage
    local str1 = conky_parse(string.format('${mem}'))
    local mem = tonumber(string.match(str1, "(%d+)"))
    local str1 = conky_parse(string.format('${memperc}'))
    local mempct = tonumber(string.match(str1, "(%d+)"))
    
    -- Draw pie
    local angle = -90
    local angle2 = 0
    local tro = 4        -- Text rotational offset (degrees)
    local maxprocesses = 7
    local maxstrlen = 8

    for process = 1, maxprocesses do

        cairo_save(cr)
    
        -- Get top process memory usage
        local str2 = conky_parse(string.format('${top_mem mem %i}', tonumber(process)))
        local mem_process = tonumber(str2)
        local procpct = mem_process / mempct
        angle2 = angle + (procpct*360)

        if angle2 > 260 then
            cairo_restore(cr)
            break
        end    

        -- Get top process name
        local str2 = conky_parse(string.format('${top_mem name %i} ', tonumber(process)))
        local index = string.find(str2,' ')
        
        if (index == nil) then
            cairo_restore(cr)
            break
        elseif (index > maxstrlen) then
            str2 = string.sub(str2, 0, maxstrlen)
        end

        -- Draw pie outline
        cairo_set_source_rgba(cr, 1, 1, 1, 0.2)        
        cairo_arc_negative (cr, xc, yc, 0.2*r, angle2*(math.pi/180), angle*(math.pi/180));            
        cairo_arc (cr, xc, yc, r, angle*(math.pi/180), angle2*(math.pi/180));    
--        cairo_close_path(cr)
        cairo_stroke(cr)

        -- Draw text
        cairo_set_source_rgba(cr, 1, 1, 1, 1)    
        cairo_move_to(cr, xc, yc)
        cairo_rotate(cr, (angle2-((angle2-angle)/2)+tro)*(math.pi/180))
--        cairo_show_text (cr, '    '..(procpct*100))
        if (index > maxstrlen) then
            cairo_show_text (cr, '      '..str2..'..')
        else
            cairo_show_text (cr, '      '..str2)
        end        

        angle = angle2 + 3

        cairo_stroke(cr)
        cairo_restore(cr)
    end

    if (angle < 264) then
        angle2 = 267
        cairo_set_source_rgba(cr, 1, 1, 1, 0.2)    
        cairo_arc_negative (cr, xc, yc, 0.2*r, angle2*(math.pi/180), angle*(math.pi/180));
        cairo_arc (cr, xc, yc, r, angle*(math.pi/180), angle2*(math.pi/180));    
--        cairo_close_path(cr)
        cairo_stroke(cr)
        
        if ((angle2 - angle) > 20) then
            cairo_set_source_rgba(cr, 1, 1, 1, 0.5)    
            cairo_move_to(cr, xc, yc)
            cairo_rotate(cr, (angle2-((angle2-angle)/2)+tro+2)*(math.pi/180))
            cairo_show_text (cr, '      '..'other')
            cairo_stroke(cr)
        end
    end
end
--[[ END PIE WIDGET ]]
-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    if conky_window == nil then 
        return
    end

    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)
    
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
    
    if update_num > 5 then
        go_clock_rings(display)
        go_gauge_rings(display)
    end
    
    cairo_surface_destroy(cs)
    cairo_destroy(display)
end

if any problems let me know

Offline

#998 2012-06-11 18:28:46

samrat94
Member
Registered: 2011-01-07
Posts: 29

Re: conky configs and screenshots!

@vaidotas203- hey, could you share your conkyrc please?

Offline

#999 2012-06-13 21:23:55

eightbitraptor
Member
From: Cheadle Hulme, UK
Registered: 2012-05-23
Posts: 8
Website

Re: conky configs and screenshots!

unluckyfool wrote:

The panel at the top is infact conky, I am using a script located below to get the status from cmus.

Preview:
http://ompldr.org/tZHp0dg

slightly off topic, but nice Black Rock Shooter wall, good choice

could I get a link?

Offline

#1000 2012-06-15 00:02:32

thorn
Member
Registered: 2012-05-09
Posts: 6

Re: conky configs and screenshots!

this is mine, tho the black dottet  line is from xfce4-screenshooter that is a bit broken or something. smile
rightnow im working on a "now playing" script for spotify.
the wlan0/eth0 was/is for my laptop when i dont have it plugged in to monitors.

image:
TwNM6.png

code:

# .conkyrc by thorn <thorn@p0int3r.se> 2012-06-15
# originaly by fabsh <fabsh@lamerk.org>)
# Based on ideas and code from the CunchBang Linux forums at http://crunchbanglinux.org
# v. 1.0

# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 4

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

own_window yes
own_window_transparent no
#own_window_type override
own_window_type desktop
#own_window_type normal #use this if you want a nice shadow to appear around conky

# If own_window is yes, these window manager hints may be used
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 180 1040
#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 grey
own_window_colour grey

# 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 5
gap_y 5

# 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

# hdd_temp variables
hddtemp_host localhost
hddtemp_port 7634

TEXT
${color #08C}DATE ${color}${hr 2}
${alignc 19}${font Arial Black:size=18}${time %H:%M}${font}
${voffset 2}${alignc}${time %A, %d %B %Y}

${color #08C}SYSTEM ${color}${hr 2}
${alignc 24}${font Arial Black:size=14}${nodename}${font}
#${alignc 4}Dell Vostro V130
${voffset 2}${font Arial Black:style=Bold:size=12}#!${font} CrunchBang Linux ${alignr}08.10.01
${font OpenLogos:size=18}${color #08C}A${color}${font} Kernel: ${alignr}${kernel}
${font StyleBats:size=16}A${font} CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}A${font} CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
${font StyleBats:size=16}A${font} CPU3: ${cpu cpu3}% ${alignr}${cpubar cpu3 8,60}
${font StyleBats:size=16}A${font} CPU4: ${cpu cpu4}% ${alignr}${cpubar cpu4 8,60}
${font StyleBats:size=16}A${font} CPU5: ${cpu cpu5}% ${alignr}${cpubar cpu5 8,60}
${font StyleBats:size=16}A${font} CPU6: ${cpu cpu6}% ${alignr}${cpubar cpu6 8,60}
${font StyleBats:size=16}A${font} CPU7: ${cpu cpu7}% ${alignr}${cpubar cpu7 8,60}
${font StyleBats:size=16}A${font} CPU8: ${cpu cpu8}% ${alignr}${cpubar cpu8 8,60}
${font StyleBats:size=16}g${font} RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}j${font} SWAP: $swapperc% ${alignr}${swapbar 8,60}
${font StyleBats:size=16}q${font} Uptime: ${alignr}${uptime_short}

${voffset -10}${color #08C}DISK ${color}${hr 2}
${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}root:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}home:
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}

${voffset -10}${color #08C}TEMPERATURE ${color}${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}p${font} HDD /dev/sda: ${alignr}${hddtemp /dev/sda}℃
${voffset 4}${font PizzaDude Bullets:size=14}p${font} HDD /dev/sdb: ${alignr}${hddtemp /dev/sdb}℃
${voffset 4}${font PizzaDude Bullets:size=14}p${font} HDD /dev/sdc: ${alignr}${hddtemp /dev/sdc}℃
${voffset 4}${font PizzaDude Bullets:size=14}p${font} HDD /dev/sdd: ${alignr}${hddtemp /dev/sdd}℃

${voffset -10}${color #08C}WIRED LAN ${color}${hr 2}
${if_existing /proc/net/route eth0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up: ${upspeed eth0}${alignr}${upspeedgraph eth0 8,60 black black}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed eth0}${alignr}${downspeedgraph eth0 8,60 black black}
${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup eth0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown eth0}
${else}
${voffset -6}${font PizzaDude Bullets:size=14}E${font} eth0 disabled
${endif}

${voffset -10}${color #08C}WIRELESS WLAN ${color}${hr 2}
${if_existing /proc/net/route wlan0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up: ${upspeed wlan0}${alignr}${upspeedgraph wlan0 8,60 black black}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed wlan0}${alignr}${downspeedgraph wlan0 8,60 black black}
${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown wlan0}
${else}
${voffset -6}${font PizzaDude Bullets:size=14}E${font} wlan0 disabled
${endif}

#${voffset -10}${color #08C}SPOTIFY ${color}${hr 2}
#${voffset 4}${execpi 5 /home/thorn/Dropbox/Coding/Conky/spotify.rb 1
${voffset -10}${color #08C}CALENDAR ${color}${hr 2}
${voffset 4}${font DejaVuSansMono:size=9}${execpi 60 DJS=`date +%_d`; cal -m | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color #08C}'"$DJS"'$color'/}

Last edited by thorn (2012-06-15 00:04:14)

Offline

Board footer

Powered by FluxBB