SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#7401 2014-04-22 09:27:23

The-Valk
New Member
Registered: 2014-04-21
Posts: 9

Re: Conky v1.9 Thread

Sector11 wrote:

Again, it's still working.
http://s20.postimg.org/6m33ybf61/2014_04_21_20_05_42_1920x1080_Sector11.jpg
Is this what you expect it to look like?

Yes.
I think Ubuntu have changed the way they handle networks.
One of the give aways might be that the nameserver returns 127.0.1.1 and not the DNS servers.
Perhaps I will have to wait for conky to catch up?

Offline

Help fund CrunchBang, donate to the project!

#7402 2014-04-22 12:35:43

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread

@The-Valk.

I replicated your problem of showing 0 for transfer speeds and totals - but not the nameserver issue you have.

I removed the nameserver line from your conkyrc and it seems to work as needed. Give that a try.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#7403 2014-04-22 13:08:58

The-Valk
New Member
Registered: 2014-04-21
Posts: 9

Re: Conky v1.9 Thread

@PackRat

Thanks for the suggestion.
I commented out the nameserver line but still get 0B returned to ${downspeed eth0} etc.

Offline

#7404 2014-04-22 18:10:30

The-Valk
New Member
Registered: 2014-04-21
Posts: 9

Re: Conky v1.9 Thread

I just had this reply to my post in the Ubuntu forums.

Originally Posted by glennvan
If you do a lspci in a command prompt, and your network card shows up like this:

02:00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 08)

You won't be getting any traffic values until kernel 3.15 is released. The data logging part of the driver code was not included and is being put back in the 3.15 kernel. I would love to give the link as to where I read that, but I don't have/remember where I saw it...

My Ethernet controller does indeed show as

06:00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)

So, I wait for the new kernel it seems.
Thanks to all who offered help in this forum. It is indeed a friendly place.

Offline

#7405 2014-04-22 18:45:56

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

The-Valk wrote:

So, I wait for the new kernel it seems.
Thanks to all who offered help in this forum. It is indeed a friendly place.

Good to hear!

Don't be a stranger, you're already a member ... post a screenshot, and some code.  You'll end up in mrpeachy's Conky archive - links to complete working setups.

This is a multi-distro conky thread.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7406 2014-04-22 20:29:42

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

Re: Conky v1.9 Thread

MY CONKY !!!

.conkyrc

#SETTINGS
background yes
update_interval 2.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 10
gap_y 10

border_inner_margin 0
border_outer_margin 0

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

#COLORS
#default_color red
default_shade_color 2E1616
default_outline_color 2E1616
color0 FFFFFF 
color1 DDDDDD
color2 AAAAAA
color3 888888
color4 666666
color5 3D3D3D
color6 2B2B2B
color8 red

#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 60}
${goto 195}${color4}${font :size=26}${time %e}${color1}${offset -90}${font :size=12}${time %A}
${goto 175}${color2}${voffset -2}${font :size=9}${time %b}${voffset -2} ${color3}${font :size=16}${time %Y}${font}
${goto 156}${color2}${voffset 30}${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 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -t}
${goto 84}${color4}${voffset -6}${membar 10,212}
${goto 174}${voffset -14}${font :size=7,weight:bold}${color2}${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 FFFFFF 2B2B2B -t}
${goto 84}${color4}${voffset -9}${diskiograph_read 10,106 FFFFFF 2B2B2B -t}${diskiograph_write 10,106 FFFFFF 2B2B2B -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}${color2}${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 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -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 ubuntu condensed:size=6,weight:bold}Open Ports: ${tcp_portmon 1 65535 count}  Public IP: ${execi 1800 wget -q -O - http://ip.tupeux.com | tail }
${font :size=6,weight:bold}${color1}${goto 302}Local IP ${goto 380}Local srvc${goto 440}Port${color5}${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${font :size=6,weight:bold}${color1}${goto 302}Remote IP${goto 380}Rmt srvc${goto 440}Port${color5}${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
${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}}${color5}
###########
${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 FFFFFF 2B2B2B -t}${downspeedgraph ppp0 40,106 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -t}${goto 190}${downspeedgraph " $1 " 25,106 FFFFFF 2B2B2B -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 FFFFFF 2B2B2B -t}${downspeedgraph " $1 " 40,106 FFFFFF 2B2B2B -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 "}${color2}${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}

MY LUA!
clock_rings.lua

--==============================================================================
--                                 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=190,                         y=114,
    graph_radius=83,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.3,
    txt_radius=96,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.6,
    graduation_radius=83,
    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=190,                         y=114,
    graph_radius=87,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.3,
    txt_radius=96,
    txt_weight=0,                  txt_size=9.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.6,
    graduation_radius=87,
    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=190,                         y=114,
    graph_radius=80,
    graph_thickness=5,
    graph_unit_angle=6,            graph_unit_thickness=2,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.2,
    txt_radius=96,
    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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      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

Thanks all for the help big_smile

Offline

#7407 2014-04-22 20:33:33

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

^ could you include a screenshot also  smile

Offline

#7408 2014-04-22 20:39:44

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

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


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7409 2014-04-24 03:58:30

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

Offline

#7410 2014-04-24 06:03:04

HELPME
#! Junkie
From: the holley land
Registered: 2013-11-15
Posts: 256
Website

Re: Conky v1.9 Thread

how do I show the gpu performance like cpubar or the percent one?
I have integral graphics core

Offline

#7411 2014-04-24 06:16:24

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

Do you know what your graphics chipset is exactly? 
Try

lspci | grep VGA

Lm-sensors can monitor ati graphics cards i think and nvidia has software to moniter their cards... Not sure you are going to have much luck with integrated graphics

Offline

#7412 2014-04-24 08:00:11

torch2424
ban
Registered: 2014-04-24
Posts: 2

Re: Conky v1.9 Thread

Hey guys, As a huge fan of conky myself, I just recently made a conky-like system monitor for android, I created a thread for it, I'd appreciate it, if you would check it out!

http://crunchbang.org/forums/viewtopic. … 80#p374280

Thanks!

Offline

#7413 2014-04-24 14:23:16

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Marenbraga wrote:

ops, new code... improved!

Boa, Obrigado.
Nice, Thank you.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7414 2014-04-24 15:51:36

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

Re: Conky v1.9 Thread

torch2424 wrote:

Hey guys, As a huge fan of conky myself, I just recently made a conky-like system monitor for android, I created a thread for it, I'd appreciate it, if you would check it out!

http://crunchbang.org/forums/viewtopic. … 80#p374280

Thanks!

wow... cool! i'm an entusiastic fan too, nice job.

Offline

#7415 2014-04-24 15:56:50

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

Re: Conky v1.9 Thread

guys,

Can anyone give me a hand? I do not know how to make a bar that starts by default at 100 percent. Does anyone know how to do?

Offline

#7416 2014-04-24 16:33:42

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

^what is the bar for?
would be possible with lua/cairo of course

also your conky is up in the archive
http://crunchbang.org/forums/viewtopic.php?id=33811  big_smile

Last edited by mrpeachy (2014-04-24 16:34:29)

Offline

#7417 2014-04-24 17:02:45

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

^ According to conky documentation not possible, that I see.  However in LUA that might be possible.

A curious question.  If starting at 100 does it go up or down from there?

Hopefully mrpeachy or another lua guru will pop in.

EDIT: SEE, I'm too late.  lol  lol  lol

Last edited by Sector11 (2014-04-24 17:03:43)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7418 2014-04-24 17:29:19

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

Re: Conky v1.9 Thread

mrpeachy wrote:

^what is the bar for?
would be possible with lua/cairo of course

also your conky is up in the archive
http://crunchbang.org/forums/viewtopic.php?id=33811  big_smile

Hi mrpeachy,
I plan to use a bar only as decoration, but I need it filled because of the background color.
Any suggestions?

Offline

#7419 2014-04-24 17:31:57

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

Re: Conky v1.9 Thread

Sector11 wrote:

^ According to conky documentation not possible, that I see.  However in LUA that might be possible.

A curious question.  If starting at 100 does it go up or down from there?

Hopefully mrpeachy or another lua guru will pop in.

EDIT: SEE, I'm too late.  lol  lol  lol


No, sector11,
the bar is only decorative, but need her full, no decrease or increase the value.

Offline

#7420 2014-04-24 18:38:54

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ Marenbraga

OH ... OK ... Use: ${membar} with a height no greater than 1 and a width of 0, along with a creative use of font size.

You could even give it zebra stripes:

${alignc}${membar 1,30} use membar ${membar 1,30}
${font :size=1}${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}${font}

${font :size=1}${color}${membar 1,0}
${membar 1,0}
${membar 1,0}${color 000000}
${membar 1,0}
${membar 1,0}${color}
${membar 1,0}
${membar 1,0}${color 000000}
${membar 1,0}
${membar 1,0}${color}
${membar 1,0}
${membar 1,0}${color 000000}
${membar 1,0}
${membar 1,0}${color}
${membar 1,0}
${membar 1,0}${font}

${membar 0,100}
${membar 0,0}

${membar 1,100}
${membar 1,0}

${membar 2,100}
${membar 2,0}

2014_04_24_15_38_08_300x683_Sector11.jpg


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7421 2014-04-24 20:20:19

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: Conky v1.9 Thread

Another way to do it:
1. Above the TEXT area, set a default bar size, e.g. "default_bar_size 50 7" is 50 pixels long, 7 pixels high.
2. Where you want the solid bar, use ${execbar echo 100}

Offline

#7422 2014-04-24 20:33:30

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

pvsage wrote:

Another way to do it:
1. Above the TEXT area, set a default bar size, e.g. "default_bar_size 50 7" is 50 pixels long, 7 pixels high.
2. Where you want the solid bar, use ${execbar echo 100}

Ohhhhhhhh yea!!!   Good one!!!!  smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7423 2014-04-24 21:56:13

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

Re: Conky v1.9 Thread

Sector11 wrote:

@ Marenbraga

OH ... OK ... Use: ${membar} with a height no greater than 1 and a width of 0, along with a creative use of font size.

You could even give it zebra stripes:

${alignc}${membar 1,30} use membar ${membar 1,30}
${font :size=1}${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}
${membar 1,0}${font}

${font :size=1}${color}${membar 1,0}
${membar 1,0}
${membar 1,0}${color 000000}
${membar 1,0}
${membar 1,0}${color}
${membar 1,0}
${membar 1,0}${color 000000}
${membar 1,0}
${membar 1,0}${color}
${membar 1,0}
${membar 1,0}${color 000000}
${membar 1,0}
${membar 1,0}${color}
${membar 1,0}
${membar 1,0}${font}

${membar 0,100}
${membar 0,0}

${membar 1,100}
${membar 1,0}

${membar 2,100}
${membar 2,0}

http://s20.postimg.org/uvu93ujk9/2014_04_24_15_38_08_300x683_Sector11.jpg

WOW... do you have the conky's code from that photo?

Offline

#7424 2014-04-24 22:01:17

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

Re: Conky v1.9 Thread

Sector11 wrote:
pvsage wrote:

Another way to do it:
1. Above the TEXT area, set a default bar size, e.g. "default_bar_size 50 7" is 50 pixels long, 7 pixels high.
2. Where you want the solid bar, use ${execbar echo 100}

Ohhhhhhhh yea!!!   Good one!!!!  smile

Thanks a lot, friends!
valeu big_smile

Offline

Be excellent to each other!

#7425 2014-04-24 22:09:47

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

And being a CAALI    (Conky Addict And Loving It) I had to play with it.

default_bar_size 50 7
TEXT
${alignc}${membar 1,30} use execbar ${membar 1,30}
20  ${execbar echo 20}
40  ${execbar echo 40}
60  ${execbar echo 60}
80  ${execbar echo 80}
100 ${execbar echo 100}

2014_04_24_18_21_55_300x795_Sector11.jpg

... and then with no default size - the width of the conky

## default_bar_size 50 7
TEXT
${alignc}${membar 1,30} use execbar ${membar 1,30}
20  ${execbar echo 20}
40  ${execbar echo 40}
60  ${execbar echo 60}
80  ${execbar echo 80}
100 ${execbar echo 100}

2014_04_24_18_22_50_300x795_Sector11.jpg
Of course for that kind of width (which totally blows what I did with the membar out of the water) --> ${hr 7} does the same ...

Complete with text in a bar:

default_bar_size 0 12
TEXT
${alignc}${membar 1,30} use execbar ${membar 1,30}
20  ${execbar echo 20}
40  ${execbar echo 40}${goto 150}${voffset -1}${color5}pvsage's idea${color}${voffset 1}
60  ${execbar echo 60}
80  ${execbar echo 80}
100 ${execbar echo 100}${goto 50}${voffset -1}${color 000000}pvsage's idea${color}${voffset 1}
${hr 10}${goto 20}${voffset 2}${color 000000}and great one too!${color}${voffset -2}

2014_04_24_19_04_39_300x809_Sector11.jpg

Now that's a keeper pvsage, Thank you!

Already I have ideas forming in my head ....


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo