TEXT
S Y S T E M    I N F O
${hr}
Host:$alignr$nodename
Uptime:$alignr$uptime_short
CPU:$alignr${cpu cpu0}% ${cpubar cpu0 6,50}
RAM:$alignr$memperc% ${membar 6,50}
Swap:$alignr$swapperc% ${swapbar 6,50}
Disk:$alignr${fs_used_perc /home}% ${fs_bar 6,50 /home}

N E T W O R K    I N F O
${hr}
IP address:$alignr${addr wlan0}
MAC address:$alignr${wireless_ap wlan0}
ESSID:$alignr${wireless_essid wlan0}
$alignr${voffset -4}${offset -3}${wireless_link_bar 2,33 wlan0}
${upspeedgraph wlan0}
${color 858687}${voffset -21}Download$alignr${offset -3}${upspeed wlan0}${color}
${downspeedgraph wlan0}
${color 858687}${voffset -21}Upload$alignr${offset -3}${downspeed wlan0}${color}

#######################################
# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10

# Window specifications #
gap_x 1020
gap_y 840
minimum_size 238 80
maximum_width 238
own_window yes
own_window_type desktop # other options are: override/normal/desktop/panel
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
#alignment middle_middle
#own_window_argb_visual yes
#own_window_argb_value 0

# Graphics settings #
draw_shades no
default_shade_color AAAAAA
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
xftalpha 0
xftfont Droid Sans:size=10
text_buffer_size 256
override_utf8_locale yes
override_utf8_locale yes
imlib_cache_size 0

# Color scheme #
default_color FFFFFF
color1 A49379
color2 FFFFFF
color3 8B795E
color5 913030

TEXT
# Various images #
${if_existing /proc/net/route eth0}${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=472135&u=c" -o ~/.cache/weather.xml}
${image ~/.conky/conky-weather/mini/fav-color.png -p 5,4 -s 228x105}\
${image ~/.conky/conky-weather/mini/border.png -p 5,4 -s 228x105}\
${image ~/.conky/conky-weather/mini/separator-v.png -p 80,15 -s 1x83}\
${image ~/.conky/conky-weather/mini/separator-v.png -p 157,15 -s 1x83}\
\
# The name of the days #
\
${color1}${voffset -3}${alignc 77}SUN
${color1}${voffset -14}${alignc}MOON${color}
${color1}${voffset -14}${alignc -77}HUM${color}
\
# The temperatures #
\
${color2}${voffset 51}${alignc 77}${execi 300 grep "yweather:astronomy" ~/.cache/weather.xml | grep -o "sunrise=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${color}
${voffset -14}${color2}${alignc}${execi 300 grep "yweather:astronomy" ~/.cache/weather.xml | grep -o "sunset=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${color}
${voffset -14}${color2}${alignc -77}${execi 300 grep "yweather:atmosphere" ~/.cache/weather.xml | grep -o "humidity=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} %${color}
\
# The icons of the forecast and condition #
\
${image ~/.conky/conky-weather/icons/32.png -p 22,30 -s 48x48}\
${image ~/.conky/conky-weather/icons/31.png -p 96,30 -s 48x48}\
${image ~/.conky/conky-weather/icons/50.png -p 172,30 -s 48x48}\
${color1}${voffset 12}${alignc -55}${font cure:size=7}-lu: ${execi 300 grep "lastBuildDate" ~/.cache/weather.xml | cut -c 16-40}${else}${color5}${font cure:size=7}${goto 20}weather/err: eth0 not present ...check the connection${endif}${color}${font}
######################################
round clocks and more
conkyrc:
#SETTINGS
background yes
update_interval 2.5
#update_interval 0.5
double_buffer yes
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2 
#text_buffer_size 2048
#imlib_cache_size 0
override_utf8_locale yes
total_run_times 0
temperature_unit celsius

#WINDOW
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_class conky
#on_bottom no
#own_window_title rings + text widgets

minimum_size 460 800
maximum_width 460

alignment top_right

gap_x 20
gap_y 20

border_inner_margin 0
border_outer_margin 0

#STYLES
draw_shades no
draw_outline yes
draw_borders no
draw_graph_borders no
default_graph_size 15 40

#COLORS
#default_color red
default_shade_color blue
default_outline_color black
color0 F5F5F5 
color1 E6E6E6 
color2 D6D6D6 
color3 C7C7C7  
color4 B8B8B8    
color5 A8A8A8  
color6 999999
color7 808080
color8 000000

#FONT
use_xft yes
xftfont ubuntu :size=7
xftalpha 0.5
uppercase no
font ubuntu :size=7

#LUA
lua_load ~/.conky/clock_rings.lua
lua_draw_hook_post main

# │ ─ ┌ ┬ ┐ └ ┴ ┘ ├ ┼ ┤ ║ ═ ╔ ╦ ╗ ╚ ╩ ╝ ╠ ╬ ╣  ↑ ↓ → ← ↔ ► ◄ ▲ ▼ « »
# ░  ▒  ▓ ☺ ☻ ♥ ♦ ♣ ♠  • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼ ¼ ½ ¾ ® ©

TEXT
#
############  RELOGIO
#
${voffset 80}
${goto 125}${font :size=12}${time %A}${color4}${voffset -16}${font :size=26}${time %e}${color1}
${goto 165}${color2}${voffset -20}${font :size=9}${time %b}${voffset -2} ${color3}${font :size=16}${time %Y}${font}
${goto 146}${color2}${voffset 26}${font :size=12}${time %H}:${time %M}:${time %S}
#
############  SISTEMA
#
${voffset -160}${font :size=7,weight:bold}${color5}${alignr}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'}
${alignr}${color6}${machine} CPU - ${freq_g 1} / ${freq_g 1} GHz

${alignr}${color5}${alignr}${sysname} ${nodename} 
${alignr}Ligado a ${color6}: ${uptime}

${alignr}${color5}${execpi 300 lsb_release -d | cut -c 14-50}
${alignr}${color6}Kernel ${kernel}

${alignr}${color5}Temperatura(RJ) ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ temperature temperature 30}°C
${alignr}${color5}Umidade: ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ humidity}%
${alignr}${color5}Vento: ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ wind_speed} mph
${alignr}${color5}Pressao: ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ pressure} hPa

${alignr}${color5}Desktops: ${desktop_number}
${alignr}${color6}Usando o ${desktop}º - ${desktop_name}

${alignr}${color5}Versão do Conky ${alignr}${conky_version}

#
############  CPU
#
${goto 50}${color2}${voffset 44}${font :size=10,weight:bold}CPU
${goto 34}${color2}${voffset -34}${font :size=8}${cpu cpu0}%
${goto 84}${color4}${voffset -42}${cpugraph cpu0 40,212 808080 000000 -t}
${goto 84}${color4}${voffset -6}${cpubar cpu1 11,53}${cpubar cpu2 11,53}${cpubar cpu3 11,53}${cpubar cpu4 11,53}
${goto 106}${color 9B6666}${voffset -14}${font :size=7,weight:bold}${hwmon 1 temp 1}ºC ${offset 36}${hwmon 2 temp 2}ºC ${offset 36}${hwmon 3 temp 3}ºC ${offset 36}${hwmon 4 temp 4}ºC ${font}
#
${voffset -65}
${goto 302}${font :size=6,weight:bold}${color1}MAX CPU ${alignr}%       PID
${goto 302}${font :size=6,weight:normal}${color1}${top name 1}${goto 234}${alignr}${top cpu 1}    ${top pid 1}
${goto 302}${color2}${top name 2}${goto 234}${alignr}${top cpu 2}    ${top pid 2}
${goto 302}${color3}${top name 3}${goto 234}${alignr}${top cpu 3}    ${top pid 3}
${goto 302}${color4}${top name 4}${goto 234}${alignr}${top cpu 4}    ${top pid 4}
${goto 302}${color5}${top name 5}${goto 234}${alignr}${top cpu 5}    ${top pid 5}
${goto 302}${font :size=6,weight:bold}${color6}♦EXECUTANDO:   ${running_PROCESSES}${font}
#
${color}${font :size=7,weight:bold}${if_existing /sys/class/hwmon/hwmon0/temp2_input}
${voffset -15}${goto 84}${color2}ACPI ${color 9B6666}${acpitemp}ºC ${goto 146}${color2}CPU ${if_match ${hwmon 0 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 0 temp 1}ºC ${color2}${goto 202}MB ${color 9B6666}${hwmon 0 temp 2}ºC ${color2}${goto 252}GPU ${if_match ${hwmon 1 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 1 temp 1}ºC${color}${else}
${voffset -15}${goto 84}${color2}ACPI ${color 9B6666}${acpitemp}ºC ${goto 146}${color2}CPU ${if_match ${hwmon 1 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 1 temp 1}ºC ${color2}${goto 202}MB ${color 9B6666}${hwmon 1 temp 2}ºC ${color2}${goto 252}GPU ${if_match ${hwmon 0 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 0 temp 1}ºC${color}${endif}
#
############  MEM
#
${goto 46}${color2}${voffset 53}${font :size=10,weight:bold}MEM
${goto 34}${color2}${voffset -34}${font :size=8}${memperc}%
${goto 84}${color4}${voffset -42}${memgraph cpu0 40,212 808080 000000 -t}
${goto 84}${color4}${voffset -6}${membar 10,212}
${goto 174}${voffset -14}${font :size=7,weight:bold}${color0}${mem}${color} 
#
${voffset -65}
${goto 302}${font :size=6,weight:bold}${color1}MAX MEM ${alignr}%       PID
${goto 302}${font :size=6,weight:normal}${color1}${top_mem name 1}${goto 234}${alignr}${top_mem mem 1}    ${top_mem pid 1}
${goto 302}${color2}${top_mem name 2}${goto 234}${alignr}${top_mem mem 2}    ${top_mem pid 2}
${goto 302}${color3}${top_mem name 3}${goto 234}${alignr}${top_mem mem 3}    ${top_mem pid 3}
${goto 302}${color4}${top_mem name 4}${goto 234}${alignr}${top_mem mem 4}    ${top_mem pid 4}
${goto 302}${color5}${top_mem name 5}${goto 234}${alignr}${top_mem mem 5}    ${top_mem pid 5}
${goto 302}${font :size=6,weight:bold}${color6}♦PROCESSOS:   ${processes}${font}
#
${goto 84}${voffset -6}${font :size=7,weight:bold}${color2}TOT ${color4}$memmax ${color2}${goto 158}BFR ${color4}${buffers}${goto 234}${color2}CCH ${color4}${cached}${color}                
#
############  HDD
#
${goto 48}${color2}${voffset 50}${font :size=10,weight:bold}HDD
${goto 34}${color2}${voffset -30}${font :size=8}${fs_used_perc /}%
${goto 84}${color4}${voffset -44}${diskiograph 30,212 808080 000000 -t}
${goto 84}${color4}${voffset -9}${diskiograph_read 10,106 808080 000000 -t}${diskiograph_write 10,106 808080 000000 -t}
${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}RD ${color4}${diskio_read}${goto 198}${color2}WR ${color4}${diskio_write}
${goto 84}${color4}${voffset -1}${fs_bar 10,212 /}
${goto 174}${voffset -6}${font :size=7,weight:bold}${color0}${fs_used}${color} 
#
${goto 84}${voffset 4}${font :size=7,weight:bold}${color2}TOT ${color4}${fs_size}${goto 194}${color2}I/O MAX ${color4}${diskio} 
#
${voffset -78}
${goto 302}${font :size=6,weight:bold}${color1}Dev ${goto 324}WR ${goto 360}RD${goto 396}PROT ${alignr}GRAF
${goto 302}${color2}${font :size=6,weight:bold}sda${font :size=6}${goto 324}${diskio_write sda}${goto 360}${diskio_read sda}${goto 396}${disk_protect sda}${goto 421}${diskiograph sda 9,40 808080 000000 -t}
${goto 302}${color3}${font :size=6,weight:bold}sdb${font :size=6}${goto 324}${diskio_write sdb}${goto 360}${diskio_read sdb}${goto 396}${disk_protect sdb}${goto 421}${diskiograph sdb 9,40 808080 000000 -t}
${goto 302}${color4}${font :size=6,weight:bold}sdc${font :size=6}${goto 324}${diskio_write sdc}${goto 360}${diskio_read sdc}${goto 396}${disk_protect sdc}${goto 421}${diskiograph sdc 9,40 808080 000000 -t}
${goto 302}${color5}${font :size=6,weight:bold}sdd${font :size=6}${goto 324}${diskio_write sdd}${goto 360}${diskio_read sdd}${goto 396}${disk_protect sdd}${goto 421}${diskiograph sdd 9,40 808080 000000 -t}
${goto 302}${color6}${font :size=6,weight:bold}sde${font :size=6}${goto 324}${diskio_write sde}${goto 360}${diskio_read sde}${goto 396}${disk_protect sde}${goto 421}${diskiograph sde 9,40 808080 000000 -t}
${goto 302}${color6}${font :size=6,weight:bold}sdf${font :size=6}${goto 324}${diskio_write sdf}${goto 360}${diskio_read sdf}${goto 396}${disk_protect sdf}${goto 421}${diskiograph sdf 9,40 808080 000000 -t}
#
############  BAT
#
${goto 52}${color2}${voffset 180}${font :size=10,weight:bold}BAT
${goto 32}${color2}${voffset -34}${font :size=8}${if_existing /sys/class/power_supply/BAT0}${battery_percent BAT0}%$endif${if_existing /sys/class/power_supply/BAT1}${battery_percent BAT1}%$endif
${goto 84}${color4}${voffset -40}
${goto 84}${color4}${voffset 34}${if_existing /sys/class/power_supply/BAT0}${battery_bar 10,212 BAT0}$endif${if_existing /sys/class/power_supply/BAT1}${battery_bar 10,212 BAT1}$endif
#
############  NET
#
${voffset -184}${goto 302}${color1}${font :size=6,weight:bold}Open Ports:${font :size=5} ${tcp_portmon 1 65535 count}  ${font :size=6,weight:bold}Public IP: ${font ubuntu condensed:size=6}${execi 1800 wget -q -O - http://ip.tupeux.com | tail }
${font :size=6,weight:bold}${color0}${goto 302}Local IP ${goto 380}Local srvc${goto 440}Port${color7}${font ubuntu condensed:size=6,weight:normal}
${goto 302}${tcp_portmon 1 65535 lip 0}${goto 380}${tcp_portmon 1 65535 lservice 0}${goto 440}${tcp_portmon 1 65535 lport 0}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 0}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 1}${goto 380}${tcp_portmon 1 65535 lservice 1}${goto 440}${tcp_portmon 1 65535 lport 1}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 1}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 2}${goto 380}${tcp_portmon 1 65535 lservice 2}${goto 440}${tcp_portmon 1 65535 lport 2}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 2}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 3}${goto 380}${tcp_portmon 1 65535 lservice 3}${goto 440}${tcp_portmon 1 65535 lport 3}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 3}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 4}${goto 380}${tcp_portmon 1 65535 lservice 4}${goto 440}${tcp_portmon 1 65535 lport 4}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 4}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 5}${goto 380}${tcp_portmon 1 65535 lservice 5}${goto 440}${tcp_portmon 1 65535 lport 5}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 5}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 6}${goto 380}${tcp_portmon 1 65535 lservice 6}${goto 440}${tcp_portmon 1 65535 lport 6}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 6}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 7}${goto 380}${tcp_portmon 1 65535 lservice 7}${goto 440}${tcp_portmon 1 65535 lport 7}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 7}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 8}${goto 380}${tcp_portmon 1 65535 lservice 8}${goto 440}${tcp_portmon 1 65535 lport 8}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 8}}${color7}
${font :size=6,weight:bold}${color0}${goto 302}Remote IP${goto 380}Rmt srvc${goto 440}Port${color7}${font ubuntu condensed:size=6,weight:normal}
${goto 302}${tcp_portmon 1 65535 rip 0}${goto 380}${tcp_portmon 1 65535 rservice 0}${goto 440}${tcp_portmon 1 65535 rport 0}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 0}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 1}${goto 380}${tcp_portmon 1 65535 rservice 1}${goto 440}${tcp_portmon 1 65535 rport 1}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 1}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 2}${goto 380}${tcp_portmon 1 65535 rservice 2}${goto 440}${tcp_portmon 1 65535 rport 2}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 2}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 3}${goto 380}${tcp_portmon 1 65535 rservice 3}${goto 440}${tcp_portmon 1 65535 rport 3}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 3}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 4}${goto 380}${tcp_portmon 1 65535 rservice 4}${goto 440}${tcp_portmon 1 65535 rport 4}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 4}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 5}${goto 380}${tcp_portmon 1 65535 rservice 5}${goto 440}${tcp_portmon 1 65535 rport 5}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 5}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 6}${goto 380}${tcp_portmon 1 65535 rservice 6}${goto 440}${tcp_portmon 1 65535 rport 6}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 6}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 7}${goto 380}${tcp_portmon 1 65535 rservice 7}${goto 440}${tcp_portmon 1 65535 rport 7}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 7}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 8}${goto 380}${tcp_portmon 1 65535 rservice 8}${goto 440}${tcp_portmon 1 65535 rport 8}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 8}}${color7}
###########
${if_existing /proc/net/route ppp0}${goto 52}${color2}${voffset -148}${font :size=10,weight:bold}NET
${goto 34}${color2}${voffset -32}${font :size=8} 3G
${goto 84}${color4}${voffset -43}${upspeedgraph ppp0 40,106 808080 000000 -t}${downspeedgraph ppp0 40,106 808080 000000 -t}
${goto 84}${voffset -6}${battery_bar 10,212 BAT1}
${goto 91}${voffset -27}${font :size=7,weight:bold}${color2}UP ${color4}${upspeed ppp0}${goto 198}${color2}DL ${color4}${downspeed ppp0}
${goto 190}${color4}${voffset -44}${wireless_link_bar 42,1}
${goto 84}${voffset 10}${font :size=7,weight:bold}${color2}TOT ${color4}${totalup ppp0}${goto 194}${color2}TOT ${color4}${totaldown ppp0}
${goto 84}${color2}IP ${color4}${addr ppp0}${goto 194}${color2}GATE ${color4}${gw_ip ppp0}
 ${goto 84}${voffset -5}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${upspeedgraph " $1 " 25,106 808080 000000 -t}${goto 190}${downspeedgraph " $1 " 25,106 808080 000000 -t}${goto 190}${wireless_link_bar 26,1}"}'}
 ${goto 91}${voffset -18}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "UP ${color4}${upspeed " $1 "}${color2}${goto 198}DL ${color4}${downspeed " $1 "}${goto 84}${voffset 9}${wireless_link_bar 10,212}"}'}
 ${goto 84}${voffset 7}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "TOT ${color4}${totalup " $1 "}${goto 194}${color2}${color2}TOT ${color4}${totaldown " $1 "}${font :size=8}${goto 36}${voffset -30}${color2}" $1 ""}'}
 ${goto 36}${voffset -34}${font :size=7,weight:bold}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${image ~/.conky/wifix.png -p 27,525 -s 40x40}${voffset 59}${goto 84}IP ${color4}${addr " $1 "}${goto 194}${color2}GATE ${color4}${gw_ip}"}'}${else}
###########
${goto 52}${color2}${voffset -156}${font :size=10,weight:bold}NET 
${goto 30}${voffset -32}${font :size=8}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'}
${goto 84}${color4}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${voffset -43}${upspeedgraph " $1 " 40,106 808080 000000 -t}${downspeedgraph " $1 " 40,106 808080 000000 -t}${goto 190}${wireless_link_bar 42,1}"}'}
${goto 84}${voffset -8}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${wireless_link_bar 10,212 " $1 "}${color0}${goto 186}${font :size=7,weight:bold}${voffset -1}${wireless_link_qual_perc " $1 "}%"}'}
${goto 84}${voffset -14}${color4}${wireless_link_bar 10,212}
${goto 91}${voffset -19}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "UP ${color4}${upspeed " $1 "}${goto 198}${color2}DL ${color4}${downspeed " $1 "}"}'}
${goto 84}${voffset 17}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "TOT ${color4}${totalup " $1 "}${goto 194}${color2}TOT ${color4}${totaldown " $1 "}"}'}

${goto 84}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "HOST ${color4}${wireless_essid " $1 "}${goto 194}${color2}${color4}${wireless_ap " $1 "}"}'}
${goto 84}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "MAXspd ${color4}${wireless_bitrate " $1 "}${goto 194}${color2}TYPE ${color4}${wireless_mode " $1 "}"}'}
${goto 84}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "IP ${color4}${addr " $1 "}${goto 194}${color2}GATE ${color4}${gw_ip}"}'}${endif}

## and luas##


Marenbraga
    Member
    Registered: 2013-11-14
    Posts: 40

Re: Conky v1.9 Thread
Sector11 wrote:

    Marenbraga wrote:

        MY CONKY !!!

    mrpeachy wrote:

        ^ could you include a screenshot also  smile

    Oh, I'll bet it's going to the  Conky Archive!  cool

smile thanks friend big_smile
desktop

ops, new code... improved!

#SETTINGS
background yes
update_interval 2.5
#update_interval 0.5
double_buffer yes
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2 
#text_buffer_size 2048
#imlib_cache_size 0
override_utf8_locale yes
total_run_times 0
temperature_unit celsius

#WINDOW
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_class conky
#on_bottom no
#own_window_title rings + text widgets

minimum_size 460 800
maximum_width 460

alignment top_right

gap_x 20
gap_y 20

border_inner_margin 0
border_outer_margin 0

#STYLES
draw_shades no
draw_outline yes
draw_borders no
draw_graph_borders no
default_graph_size 15 40

#COLORS
#default_color red
default_shade_color blue
default_outline_color black
color0 F5F5F5 
color1 E6E6E6 
color2 D6D6D6 
color3 C7C7C7  
color4 B8B8B8    
color5 A8A8A8  
color6 999999
color7 808080
color8 000000

#FONT
use_xft yes
xftfont ubuntu :size=7
xftalpha 0.5
uppercase no
font ubuntu :size=7

#LUA
lua_load ~/.conky/clock_rings.lua
lua_draw_hook_post main

# │ ─ ┌ ┬ ┐ └ ┴ ┘ ├ ┼ ┤ ║ ═ ╔ ╦ ╗ ╚ ╩ ╝ ╠ ╬ ╣  ↑ ↓ → ← ↔ ► ◄ ▲ ▼ « »
# ░  ▒  ▓ ☺ ☻ ♥ ♦ ♣ ♠  • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼ ¼ ½ ¾ ® ©

TEXT
#
############  RELOGIO
#
${voffset 80}
${goto 125}${font :size=12}${time %A}${color4}${voffset -16}${font :size=26}${time %e}${color1}
${goto 165}${color2}${voffset -20}${font :size=9}${time %b}${voffset -2} ${color3}${font :size=16}${time %Y}${font}
${goto 146}${color2}${voffset 26}${font :size=12}${time %H}:${time %M}:${time %S}
#
############  SISTEMA
#
${voffset -160}${font :size=7,weight:bold}${color5}${alignr}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'}
${alignr}${color6}${machine} CPU - ${freq_g 1} / ${freq_g 1} GHz

${alignr}${color5}${alignr}${sysname} ${nodename} 
${alignr}Ligado a ${color6}: ${uptime}

${alignr}${color5}${execpi 300 lsb_release -d | cut -c 14-50}
${alignr}${color6}Kernel ${kernel}

${alignr}${color5}Temperatura(RJ) ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ temperature temperature 30}°C
${alignr}${color5}Umidade: ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ humidity}%
${alignr}${color5}Vento: ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ wind_speed} mph
${alignr}${color5}Pressao: ${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ pressure} hPa

${alignr}${color5}Desktops: ${desktop_number}
${alignr}${color6}Usando o ${desktop}º - ${desktop_name}

${alignr}${color5}Versão do Conky ${alignr}${conky_version}

#
############  CPU
#
${goto 50}${color2}${voffset 44}${font :size=10,weight:bold}CPU
${goto 34}${color2}${voffset -34}${font :size=8}${cpu cpu0}%
${goto 84}${color4}${voffset -42}${cpugraph cpu0 40,212 808080 000000 -t}
${goto 84}${color4}${voffset -6}${cpubar cpu1 11,53}${cpubar cpu2 11,53}${cpubar cpu3 11,53}${cpubar cpu4 11,53}
${goto 106}${color 9B6666}${voffset -14}${font :size=7,weight:bold}${hwmon 1 temp 1}ºC ${offset 36}${hwmon 2 temp 2}ºC ${offset 36}${hwmon 3 temp 3}ºC ${offset 36}${hwmon 4 temp 4}ºC ${font}
#
${voffset -65}
${goto 302}${font :size=6,weight:bold}${color1}MAX CPU ${alignr}%       PID
${goto 302}${font :size=6,weight:normal}${color1}${top name 1}${goto 234}${alignr}${top cpu 1}    ${top pid 1}
${goto 302}${color2}${top name 2}${goto 234}${alignr}${top cpu 2}    ${top pid 2}
${goto 302}${color3}${top name 3}${goto 234}${alignr}${top cpu 3}    ${top pid 3}
${goto 302}${color4}${top name 4}${goto 234}${alignr}${top cpu 4}    ${top pid 4}
${goto 302}${color5}${top name 5}${goto 234}${alignr}${top cpu 5}    ${top pid 5}
${goto 302}${font :size=6,weight:bold}${color6}♦EXECUTANDO:   ${running_PROCESSES}${font}
#
${color}${font :size=7,weight:bold}${if_existing /sys/class/hwmon/hwmon0/temp2_input}
${voffset -15}${goto 84}${color2}ACPI ${color 9B6666}${acpitemp}ºC ${goto 146}${color2}CPU ${if_match ${hwmon 0 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 0 temp 1}ºC ${color2}${goto 202}MB ${color 9B6666}${hwmon 0 temp 2}ºC ${color2}${goto 252}GPU ${if_match ${hwmon 1 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 1 temp 1}ºC${color}${else}
${voffset -15}${goto 84}${color2}ACPI ${color 9B6666}${acpitemp}ºC ${goto 146}${color2}CPU ${if_match ${hwmon 1 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 1 temp 1}ºC ${color2}${goto 202}MB ${color 9B6666}${hwmon 1 temp 2}ºC ${color2}${goto 252}GPU ${if_match ${hwmon 0 temp 1} <60}${color 9B6666}${else}${color red}${endif}${hwmon 0 temp 1}ºC${color}${endif}
#
############  MEM
#
${goto 46}${color2}${voffset 53}${font :size=10,weight:bold}MEM
${goto 34}${color2}${voffset -34}${font :size=8}${memperc}%
${goto 84}${color4}${voffset -42}${memgraph cpu0 40,212 808080 000000 -t}
${goto 84}${color4}${voffset -6}${membar 10,212}
${goto 174}${voffset -14}${font :size=7,weight:bold}${color0}${mem}${color} 
#
${voffset -65}
${goto 302}${font :size=6,weight:bold}${color1}MAX MEM ${alignr}%       PID
${goto 302}${font :size=6,weight:normal}${color1}${top_mem name 1}${goto 234}${alignr}${top_mem mem 1}    ${top_mem pid 1}
${goto 302}${color2}${top_mem name 2}${goto 234}${alignr}${top_mem mem 2}    ${top_mem pid 2}
${goto 302}${color3}${top_mem name 3}${goto 234}${alignr}${top_mem mem 3}    ${top_mem pid 3}
${goto 302}${color4}${top_mem name 4}${goto 234}${alignr}${top_mem mem 4}    ${top_mem pid 4}
${goto 302}${color5}${top_mem name 5}${goto 234}${alignr}${top_mem mem 5}    ${top_mem pid 5}
${goto 302}${font :size=6,weight:bold}${color6}♦PROCESSOS:   ${processes}${font}
#
${goto 84}${voffset -6}${font :size=7,weight:bold}${color2}TOT ${color4}$memmax ${color2}${goto 158}BFR ${color4}${buffers}${goto 234}${color2}CCH ${color4}${cached}${color}                
#
############  HDD
#
${goto 48}${color2}${voffset 50}${font :size=10,weight:bold}HDD
${goto 34}${color2}${voffset -30}${font :size=8}${fs_used_perc /}%
${goto 84}${color4}${voffset -44}${diskiograph 30,212 808080 000000 -t}
${goto 84}${color4}${voffset -9}${diskiograph_read 10,106 808080 000000 -t}${diskiograph_write 10,106 808080 000000 -t}
${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}RD ${color4}${diskio_read}${goto 198}${color2}WR ${color4}${diskio_write}
${goto 84}${color4}${voffset -1}${fs_bar 10,212 /}
${goto 174}${voffset -6}${font :size=7,weight:bold}${color0}${fs_used}${color} 
#
${goto 84}${voffset 4}${font :size=7,weight:bold}${color2}TOT ${color4}${fs_size}${goto 194}${color2}I/O MAX ${color4}${diskio} 
#
${voffset -78}
${goto 302}${font :size=6,weight:bold}${color1}Dev ${goto 324}WR ${goto 360}RD${goto 396}PROT ${alignr}GRAF
${goto 302}${color2}${font :size=6,weight:bold}sda${font :size=6}${goto 324}${diskio_write sda}${goto 360}${diskio_read sda}${goto 396}${disk_protect sda}${goto 421}${diskiograph sda 9,40 808080 000000 -t}
${goto 302}${color3}${font :size=6,weight:bold}sdb${font :size=6}${goto 324}${diskio_write sdb}${goto 360}${diskio_read sdb}${goto 396}${disk_protect sdb}${goto 421}${diskiograph sdb 9,40 808080 000000 -t}
${goto 302}${color4}${font :size=6,weight:bold}sdc${font :size=6}${goto 324}${diskio_write sdc}${goto 360}${diskio_read sdc}${goto 396}${disk_protect sdc}${goto 421}${diskiograph sdc 9,40 808080 000000 -t}
${goto 302}${color5}${font :size=6,weight:bold}sdd${font :size=6}${goto 324}${diskio_write sdd}${goto 360}${diskio_read sdd}${goto 396}${disk_protect sdd}${goto 421}${diskiograph sdd 9,40 808080 000000 -t}
${goto 302}${color6}${font :size=6,weight:bold}sde${font :size=6}${goto 324}${diskio_write sde}${goto 360}${diskio_read sde}${goto 396}${disk_protect sde}${goto 421}${diskiograph sde 9,40 808080 000000 -t}
${goto 302}${color6}${font :size=6,weight:bold}sdf${font :size=6}${goto 324}${diskio_write sdf}${goto 360}${diskio_read sdf}${goto 396}${disk_protect sdf}${goto 421}${diskiograph sdf 9,40 808080 000000 -t}
#
############  BAT
#
${goto 52}${color2}${voffset 180}${font :size=10,weight:bold}BAT
${goto 32}${color2}${voffset -34}${font :size=8}${if_existing /sys/class/power_supply/BAT0}${battery_percent BAT0}%$endif${if_existing /sys/class/power_supply/BAT1}${battery_percent BAT1}%$endif
${goto 84}${color4}${voffset -40}
${goto 84}${color4}${voffset 34}${if_existing /sys/class/power_supply/BAT0}${battery_bar 10,212 BAT0}$endif${if_existing /sys/class/power_supply/BAT1}${battery_bar 10,212 BAT1}$endif
#
############  NET
#
${voffset -184}${goto 302}${color1}${font :size=6,weight:bold}Open Ports:${font :size=5} ${tcp_portmon 1 65535 count}  ${font :size=6,weight:bold}Public IP: ${font ubuntu condensed:size=6}${execi 1800 wget -q -O - http://ip.tupeux.com | tail }
${font :size=6,weight:bold}${color0}${goto 302}Local IP ${goto 380}Local srvc${goto 440}Port${color7}${font ubuntu condensed:size=6,weight:normal}
${goto 302}${tcp_portmon 1 65535 lip 0}${goto 380}${tcp_portmon 1 65535 lservice 0}${goto 440}${tcp_portmon 1 65535 lport 0}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 0}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 1}${goto 380}${tcp_portmon 1 65535 lservice 1}${goto 440}${tcp_portmon 1 65535 lport 1}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 1}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 2}${goto 380}${tcp_portmon 1 65535 lservice 2}${goto 440}${tcp_portmon 1 65535 lport 2}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 2}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 3}${goto 380}${tcp_portmon 1 65535 lservice 3}${goto 440}${tcp_portmon 1 65535 lport 3}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 3}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 4}${goto 380}${tcp_portmon 1 65535 lservice 4}${goto 440}${tcp_portmon 1 65535 lport 4}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 4}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 5}${goto 380}${tcp_portmon 1 65535 lservice 5}${goto 440}${tcp_portmon 1 65535 lport 5}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 5}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 6}${goto 380}${tcp_portmon 1 65535 lservice 6}${goto 440}${tcp_portmon 1 65535 lport 6}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 6}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 7}${goto 380}${tcp_portmon 1 65535 lservice 7}${goto 440}${tcp_portmon 1 65535 lport 7}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 7}}${color7}
${goto 302}${tcp_portmon 1 65535 lip 8}${goto 380}${tcp_portmon 1 65535 lservice 8}${goto 440}${tcp_portmon 1 65535 lport 8}${goto 302}${color0}${blink ${tcp_portmon 1 65535 lhost 8}}${color7}
${font :size=6,weight:bold}${color0}${goto 302}Remote IP${goto 380}Rmt srvc${goto 440}Port${color7}${font ubuntu condensed:size=6,weight:normal}
${goto 302}${tcp_portmon 1 65535 rip 0}${goto 380}${tcp_portmon 1 65535 rservice 0}${goto 440}${tcp_portmon 1 65535 rport 0}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 0}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 1}${goto 380}${tcp_portmon 1 65535 rservice 1}${goto 440}${tcp_portmon 1 65535 rport 1}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 1}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 2}${goto 380}${tcp_portmon 1 65535 rservice 2}${goto 440}${tcp_portmon 1 65535 rport 2}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 2}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 3}${goto 380}${tcp_portmon 1 65535 rservice 3}${goto 440}${tcp_portmon 1 65535 rport 3}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 3}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 4}${goto 380}${tcp_portmon 1 65535 rservice 4}${goto 440}${tcp_portmon 1 65535 rport 4}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 4}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 5}${goto 380}${tcp_portmon 1 65535 rservice 5}${goto 440}${tcp_portmon 1 65535 rport 5}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 5}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 6}${goto 380}${tcp_portmon 1 65535 rservice 6}${goto 440}${tcp_portmon 1 65535 rport 6}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 6}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 7}${goto 380}${tcp_portmon 1 65535 rservice 7}${goto 440}${tcp_portmon 1 65535 rport 7}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 7}}${color7}
${goto 302}${tcp_portmon 1 65535 rip 8}${goto 380}${tcp_portmon 1 65535 rservice 8}${goto 440}${tcp_portmon 1 65535 rport 8}${goto 302}${color0}${blink ${tcp_portmon 1 65535 rhost 8}}${color7}
###########
${if_existing /proc/net/route ppp0}${goto 52}${color2}${voffset -148}${font :size=10,weight:bold}NET
${goto 34}${color2}${voffset -32}${font :size=8} 3G
${goto 84}${color4}${voffset -43}${upspeedgraph ppp0 40,106 808080 000000 -t}${downspeedgraph ppp0 40,106 808080 000000 -t}
${goto 84}${voffset -6}${battery_bar 10,212 BAT1}
${goto 91}${voffset -27}${font :size=7,weight:bold}${color2}UP ${color4}${upspeed ppp0}${goto 198}${color2}DL ${color4}${downspeed ppp0}
${goto 190}${color4}${voffset -44}${wireless_link_bar 42,1}
${goto 84}${voffset 10}${font :size=7,weight:bold}${color2}TOT ${color4}${totalup ppp0}${goto 194}${color2}TOT ${color4}${totaldown ppp0}
${goto 84}${color2}IP ${color4}${addr ppp0}${goto 194}${color2}GATE ${color4}${gw_ip ppp0}
 ${goto 84}${voffset -5}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${upspeedgraph " $1 " 25,106 808080 000000 -t}${goto 190}${downspeedgraph " $1 " 25,106 808080 000000 -t}${goto 190}${wireless_link_bar 26,1}"}'}
 ${goto 91}${voffset -18}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "UP ${color4}${upspeed " $1 "}${color2}${goto 198}DL ${color4}${downspeed " $1 "}${goto 84}${voffset 9}${wireless_link_bar 10,212}"}'}
 ${goto 84}${voffset 7}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "TOT ${color4}${totalup " $1 "}${goto 194}${color2}${color2}TOT ${color4}${totaldown " $1 "}${font :size=8}${goto 36}${voffset -30}${color2}" $1 ""}'}
 ${goto 36}${voffset -34}${font :size=7,weight:bold}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${image ~/.conky/wifix.png -p 27,525 -s 40x40}${voffset 59}${goto 84}IP ${color4}${addr " $1 "}${goto 194}${color2}GATE ${color4}${gw_ip}"}'}${else}
###########
${goto 52}${color2}${voffset -156}${font :size=10,weight:bold}NET 
${goto 30}${voffset -32}${font :size=8}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'}
${goto 84}${color4}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${voffset -43}${upspeedgraph " $1 " 40,106 808080 000000 -t}${downspeedgraph " $1 " 40,106 808080 000000 -t}${goto 190}${wireless_link_bar 42,1}"}'}
${goto 84}${voffset -8}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${wireless_link_bar 10,212 " $1 "}${color0}${goto 186}${font :size=7,weight:bold}${voffset -1}${wireless_link_qual_perc " $1 "}%"}'}
${goto 84}${voffset -14}${color4}${wireless_link_bar 10,212}
${goto 91}${voffset -19}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "UP ${color4}${upspeed " $1 "}${goto 198}${color2}DL ${color4}${downspeed " $1 "}"}'}
${goto 84}${voffset 17}${font :size=7,weight:bold}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "TOT ${color4}${totalup " $1 "}${goto 194}${color2}TOT ${color4}${totaldown " $1 "}"}'}

${goto 84}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "HOST ${color4}${wireless_essid " $1 "}${goto 194}${color2}${color4}${wireless_ap " $1 "}"}'}
${goto 84}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "MAXspd ${color4}${wireless_bitrate " $1 "}${goto 194}${color2}TYPE ${color4}${wireless_mode " $1 "}"}'}
${goto 84}${color2}${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "IP ${color4}${addr " $1 "}${goto 194}${color2}GATE ${color4}${gw_ip}"}'}${endif}

--==============================================================================
--                                 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=180,                         y=120,
    graph_radius=93,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.0,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.3,
    txt_radius=106,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.6,
    graduation_radius=93,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=180,                         y=120,
    graph_radius=97,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.3,
    txt_radius=106,
    txt_weight=0,                  txt_size=9.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.6,
    graduation_radius=97,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=180,                         y=120,
    graph_radius=90,
    graph_thickness=5,
    graph_unit_angle=6,            graph_unit_thickness=2,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.0,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.2,
    txt_radius=106,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    graduation_radius=0,
    graduation_thickness=0,        graduation_mark_thickness=0,
    graduation_unit_angle=0,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.0,
    },

}

--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu0',                  max_value=100,
    x=44,                          y=250,
    graph_radius=30,
    graph_thickness=9,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=42,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    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=44,                          y=330,
    graph_radius=30,
    graph_thickness=9,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=42,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    graduation_radius=30,
    graduation_thickness=9,        graduation_mark_thickness=4,
    graduation_unit_angle=18,
    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=44,                          y=410,
    graph_radius=32,
    graph_thickness=4,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=44,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.5,
    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=7.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='fs_used_perc',           arg='/home/',                max_value=100,
    x=44,                          y=410,
    graph_radius=27,
    graph_thickness=4,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=38,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.5,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='-/home',
    caption_weight=1,              caption_size=7.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
 },
 {
    name='downspeedf',                arg='ppp0',                      max_value=100,
    x=44,                          y=490,
    graph_radius=32,
    graph_thickness=4,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=42,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    graduation_radius=32,
    graduation_thickness=4,        graduation_mark_thickness=2,
    graduation_unit_angle=8,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='-down',
    caption_weight=1,              caption_size=7.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
 {
    name='upspeedf',                arg='ppp0',                      max_value=100,
    x=44,                          y=490,
    graph_radius=27,
    graph_thickness=4,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=36,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    graduation_radius=27,
    graduation_thickness=4,        graduation_mark_thickness=2,
    graduation_unit_angle=8,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='-up',
    caption_weight=1,              caption_size=7.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},

{
    name='battery_percent',                    arg='BAT1',                  max_value=100,
    x=44,                          y=610,
    graph_radius=30,
    graph_thickness=9,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0x666666,      graph_bg_alpha=0.1,
    graph_fg_colour=0xAFAFAF,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=42,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    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,
},

}

-------------------------------------------------------------------------------
--                                                                 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

-------------------------------------------------------------------------------
--                                                                         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


######################################



