SEARCH

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

You are not logged in.

#7301 2014-04-05 17:34:14

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

Re: Conky v1.9 Thread

just finished page 260 240 and pulled out 16 24 conkies, that should do for now smile

Last edited by mrpeachy (2014-04-05 23:14:32)

Offline

Help fund CrunchBang, donate to the project!

#7302 2014-04-05 17:53:32

Dobbie03
Resident Metaller
From: New Zealand
Registered: 2009-08-15
Posts: 1,591

Re: Conky v1.9 Thread

Sector11 wrote:
Dobbie03 wrote:

EDIT:  If I change the ARGB settings to this:

own_window_argb_visual yes
own_window_argb_value 255
own_window_colour ffffff

I get this result:

http://en.zimagez.com/miniature/selection0040.png

I can't quite get the background to be 100% transparent.

Did you set "own_window_transparency" to no - or comment it out?

This 'should' give conky the 'true transparency' however the images don't work, defeating your purpose.

This is a conky problem that's been a known issue for a long time, composite managers and images ... check out what dk75 wrote about it.

own_window yes
own_window_type override
#   own_window_argb_visual yes <--- no ARGB visuals
#   own_window_argb_value 100  <--- no ARGB visuals
own_window_transparent yes
#own_window_colour black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class Conky
own_window_title ConkyTest

It's been a problem for XFCE users and the "built in" composite manager, and GNOME3 has adopted a built in composite manager (mutt) so picking up the same problems.

From what I've read there doesn't seem to be a way to turn compositor off in GNOME3. Mind you it was a quick search.
The BIG problem here is how GNOME3 now does backgrounds ... on the first layer as Krzysztof Duchnowski said in the first Discussion post in the link you gave.

The problem there is, you will get the black again as that is the "root window" - no wall paper.

OpenBox with compton has the same type of problem ... it washes out images but it can be turned off for specific 'window classes'.  If you can't do that in GNOME3 I see a problem.

And according to wikipiedia that may be the problem GNOME Shell (italics are mine)

Reception
See also: Controversy over GNOME 3

GNOME Shell has received mixed reviews: It has been criticized for a variety of reasons, mostly related to design decisions and reduced user control over the environment. For example, users in the free software community have raised concerns that the planned tight integration with Mutter will mean that users of GNOME Shell will not be able to switch to an alternative window manager without breaking their desktop. In particular, users might not be able to use Compiz with GNOME Shell while retaining access to the same types of features that older versions of GNOME allowed.[23]

Reviews have generally become more positive over time, with upcoming releases addressing many of the annoyances reported by users.[24] [25]

If I may make a few suggestions

  1. keep that conky as a backup

  2. make an exact copy to test with.

  3. get another weather conky that uses 'fonts' instead of images running with true argb transparency to have a 'working' weather conky on your desktop as you test this fully. See Teo's scripts in my sig.

In a nutshell:

  1. the washed out images are a composition manager problem within conky, mutt in GNOME3 in your case

  2. the black background is a conky problem due to pusedo-transparency using the 'root' window

I thought as much, thank you for the reply.  I will take your advice and make a new conky with fonts rather than images.

Offline

#7303 2014-04-07 13:50:57

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Conky v1.9 Thread

If mrpeachy could add this one to the archive... smile

It's a slightly tweaked version of the one shown in the December screenshots, which I have now put up on deviantArt.

Files and README in the zip you can download from there
conky-rings-th.png


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#7304 2014-04-07 18:08:08

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

Re: Conky v1.9 Thread

^ it is done
that makes 45 conkies archived so far

Offline

#7305 2014-04-07 18:17:45

#!_828
#! Tinfoil Hat
From: Ohio, U. S. of A.
Registered: 2013-09-19
Posts: 1,244

Re: Conky v1.9 Thread

@Damo, where's your Emergency Tinfoil Hat Conky Alert System beta-script?


Those who would trade essential liberty for temporary security deserve neither
Member of the (Un)Official #! Emergency Tinfoil Hat Distribution Center
Emergency Tinfoil Hat Conky Alert System development team

Offline

#7306 2014-04-07 22:43:58

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Conky v1.9 Thread

#!_828 wrote:

@Damo, where's your Emergency Tinfoil Hat Conky Alert System beta-script?

big_smile
That's not the only conky I have! Anyway, I have lined the walls with wire mesh and flattened empty SPAM cans, so I live in a Faraday cage. Should be safe enough don't you think?


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#7307 2014-04-07 23:48:03

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

Re: Conky v1.9 Thread

damo wrote:
#!_828 wrote:

@Damo, where's your Emergency Tinfoil Hat Conky Alert System beta-script?

big_smile
That's not the only conky I have! Anyway, I have lined the walls with wire mesh and flattened empty SPAM cans, so I live in a Faraday cage. Should be safe enough don't you think?

OH! Yea!!! ... If they get you I'm hitchin' a ride on a passing spaceship ... towel in hand.


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

Offline

#7308 2014-04-08 01:17:08

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

Re: Conky v1.9 Thread

question about vnstat
i only have the one connection type on this computer and the command

vnstat --dumpdb

returns the following

version;3
active;1
interface;eth0
nick;eth0
created;1396490645
updated;1396894986
totalrx;558
totaltx;55
currx;38492160
curtx;7300096
totalrxk;934
totaltxk;189
btime;1396888661
d;0;1396888685;36;6;726;985;1
d;1;1396802614;65;6;306;335;1
d;2;1396674026;143;14;683;672;1
d;3;1396587625;179;13;392;954;1
d;4;1396540703;127;12;1015;425;1
d;5;1396490645;5;0;884;914;1
d;6;0;0;0;0;0;0
d;7;0;0;0;0;0;0
d;8;0;0;0;0;0;0
d;9;0;0;0;0;0;0
d;10;0;0;0;0;0;0
d;11;0;0;0;0;0;0
d;12;0;0;0;0;0;0
d;13;0;0;0;0;0;0
d;14;0;0;0;0;0;0
d;15;0;0;0;0;0;0
d;16;0;0;0;0;0;0
d;17;0;0;0;0;0;0
d;18;0;0;0;0;0;0
d;19;0;0;0;0;0;0
d;20;0;0;0;0;0;0
d;21;0;0;0;0;0;0
d;22;0;0;0;0;0;0
d;23;0;0;0;0;0;0
d;24;0;0;0;0;0;0
d;25;0;0;0;0;0;0
d;26;0;0;0;0;0;0
d;27;0;0;0;0;0;0
d;28;0;0;0;0;0;0
d;29;0;0;0;0;0;0
m;0;1396490645;558;55;934;189;1
m;1;0;0;0;0;0;0
m;2;0;0;0;0;0;0
m;3;0;0;0;0;0;0
m;4;0;0;0;0;0;0
m;5;0;0;0;0;0;0
m;6;0;0;0;0;0;0
m;7;0;0;0;0;0;0
m;8;0;0;0;0;0;0
m;9;0;0;0;0;0;0
m;10;0;0;0;0;0;0
m;11;0;0;0;0;0;0
t;0;1396587625;179;13;392;954;1
t;1;1396674026;143;14;683;672;1
t;2;1396540703;127;12;1015;425;1
t;3;1396802614;65;6;306;335;1
t;4;1396490645;5;0;884;914;1
t;5;0;0;0;0;0;0
t;6;0;0;0;0;0;0
t;7;0;0;0;0;0;0
t;8;0;0;0;0;0;0
t;9;0;0;0;0;0;0
h;0;0;0;0
h;1;0;0;0
h;2;0;0;0
h;3;0;0;0
h;4;0;0;0
h;5;0;0;0
h;6;0;0;0
h;7;0;0;0
h;8;0;0;0
h;9;0;0;0
h;10;0;0;0
h;11;1396889975;12734;1741
h;12;1396893576;21697;4743
h;13;1396894986;3159;645
h;14;1396814375;2253;232
h;15;1396817975;2196;241
h;16;1396821575;2630;259
h;17;1396825175;4131;381
h;18;1396828776;2699;300
h;19;1396832376;2679;263
h;20;1396835046;33720;1916
h;21;0;0;0
h;22;0;0;0
h;23;0;0;0

is this the same for someone who has 2 connection types, eg uses wired and wireless on a laptop
do you have to select which database?

Offline

#7309 2014-04-08 01:33:08

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

Re: Conky v1.9 Thread

mrpeachy wrote:

question about vnstat
i only have the one connection type on this computer and the command

vnstat --dumpdb

returns the following
{snip}
is this the same for someone who has 2 connection types, eg uses wired and wireless on a laptop
do you have to select which database?

Don't quote me but I think one would be a default if you have more than one.

-i, --iface interface
    Select one specific interface and apply actions to only it.

If you have more that one you can:

vnstat -i eth0+eth1+eth3
    Display traffic summary for a merge of interfaces eth0, eth1 and eth3.

Like you I only have one:

 07 Apr 14 | 22:32:11 ~
    $ vnstat
Database updated: Mon Apr  7 22:30:49 2014

   eth0 since 26/12/13

          rx:  119.43 GB      tx:  4.70 GB      total:  124.13 GB

   monthly
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
        Mar 14      56.86 GB |     1.99 GB |    58.85 GB |  184.33 kbit/s
        Apr 14       7.40 GB |   559.61 MB |     7.95 GB |  111.25 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated      32.01 GB |     2.36 GB |    34.37 GB |

   daily
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     yesterday       1.79 GB |    68.55 MB |     1.86 GB |  180.77 kbit/s
         today       1.21 GB |    79.96 MB |     1.29 GB |  133.47 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       1.29 GB |       84 MB |     1.37 GB |
 
 07 Apr 14 | 22:32:16 ~
    $ 

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

Offline

#7310 2014-04-08 09:36:34

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

i can not download the app 'mogrify' (to convert images)? where can i find this app?

Offline

#7311 2014-04-08 09:42:03

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

Re: Conky v1.9 Thread

mogrify is part of imagemagick; as far as I know it is part of a base Waldorf install.

Offline

#7312 2014-04-08 09:54:40

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

lionhead wrote:

i can not download the app 'mogrify' (to convert images)? where can i find this app?

Hi! lionhead;
This website is very usefull for those like to use convert & imagemagick.
May be could helps you.

Offline

#7313 2014-04-08 19:13:39

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

Re: Conky v1.9 Thread

problems with conky

can anyone help? My conkyrc is in trouble, the line below will not appear on the display.
The problematic line is:
${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}▲ ${if_up ppp0}${upspeed ppp0}${endif}${if_up wlan0}${upspeed wlan0}${endif}${if_up wlan1}${upspeed wlan1}${endif}${if_up wlan2}${upspeed wlan2}${endif}${if_up wlan3}${upspeed wlan3}${endif}${if_up wlan4}${upspeed wlan4}${endif}${if_up wlan5}${upspeed wlan5}${endif}${if_up wlan6}${upspeed wlan6}${endif}${if_up wlan7}${upspeed wlan7}${endif}${if_up wlan8}${upspeed wlan8}${endif}${if_up wlan9}${upspeed wlan9}${endif}${goto 198}▼ ${if_up ppp0}${downspeed ppp0}${endif}${if_up wlan0}${downspeed wlan0}${endif}${if_up wlan1}${downspeed wlan1}${endif}${if_up wlan2}${downspeed wlan2}${endif}${if_up wlan3}${downspeed wlan3}${endif}${if_up wlan4}${downspeed wlan4}${endif}${if_up wlan5}${downspeed wlan5}${endif}${if_up wlan6}${downspeed wlan6}${endif}${if_up wlan7}${downspeed wlan7}${endif}${if_up wlan8}${downspeed wlan8}${endif}${if_up wlan9}${downspeed wlan9}${endif}

thanks all

Offline

#7314 2014-04-08 20:23:48

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

Re: Conky v1.9 Thread

Marenbraga wrote:

problems with conky

can anyone help? My conkyrc is in trouble, the line below will not appear on the display.

Welcome to #!

It would be better to see the entire conky when asking for help.

Also it's polite to use a CODE box as seen in the menu under the smilies.

Do a test ... connect with wlan1 and use this line - paste it to the end of your conky:

${color2}▲ ${if_up wlan0}${upspeed wlan0}${goto 198}▼ ${downspeed wlan0}${else}\
 ${if_up wlan1}${upspeed wlan1}${goto 198}▼ ${downspeed wlan1}${else}\
 ${if_up wlan2}${upspeed wlan2}${goto 198}▼ ${downspeed wlan2}${endif}${endif}${endif}
 you are here...

Last edited by Sector11 (2014-04-08 21:27:30)


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

Offline

#7315 2014-04-08 20:28:37

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

Re: Conky v1.9 Thread

Thanks, Sector 11, but the problem continues. I used your code, but the error persists.
The last line does not appear in the display.

: (Sniff

#==============================================================================
#                                 conkyrc
#
#  author  : TABAJARA
#  version : alfa
#  license : Distributed under the terms of GNU GPL version 2
#
#==============================================================================


#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 430 600
maximum_width 430

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 yes

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


#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 160}${color2}${voffset 30}${font :size=12}${time %H}:${time %M}:${time %S}
#
############  SISTEMA
#
${voffset -160}${font :size=7,weight:bold}${color5}${alignr}${sysname}${nodename}
${alignr}${font :size=7,weight:bold}${color6}Ligado a: ${uptime}

${alignr}${font :size=7,weight:bold}${color5}Kernel Atual
${alignr}${font :size=7,weight:bold}${color6}${kernel}

${alignr}${font :size=7,weight:bold}${color5}${machine} CPU
${alignr}${font :size=7,weight:bold}${color6}Max: ${freq}MHz

${alignr}${font :size=7,weight:bold}${color5}TEMP(RJ)
${alignr}${font :size=7,weight:bold}${color6}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ SBRJ temperature temperature 30}°C${font}

${alignr}${font :size=7,weight:bold}${color5}Desktops: (${desktop_number})
${alignr}${font :size=7,weight:bold}${color6}Em Uso:
${alignr}${font :size=7,weight:bold}${color6}${desktop_name} (${desktop})
#
############  CPU
#
${goto 48}${color2}${voffset 84}${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 76FF00 FF0000 -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 red}${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: ${alignr}${running_PROCESSES}${font}
#
${color}${font :size=7,weight:bold}${if_existing /sys/class/hwmon/hwmon0/temp2_input}
${voffset -15}${goto 84}${color2}ACPI ${color red}${acpitemp}ºC ${goto 146}${color2}CPU ${color red}${hwmon 0 temp 1}ºC ${color2}${goto 202}MB ${color red}${hwmon 0 temp 2}ºC ${color2}${goto 252}GPU ${color red}${hwmon 1 temp 1}ºC${color}${else}
${voffset -15}${goto 84}${color2}ACPI ${color red}${acpitemp}ºC ${goto 146}${color2}CPU ${color red}${hwmon 1 temp 1}ºC ${color2}${goto 202}MB ${color red}${hwmon 1 temp 2}ºC ${color2}${goto 252}GPU ${color red}${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 76FF00 FF0000 -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: $alignr$processes${font}
#
${goto 84}${voffset -6}${font :size=7,weight:bold}${color2}TOT: ${color4}$memmax ${color2}${goto 162}BFR: ${color4}${buffers} ${goto 236}${color2}CCH: ${color4}${cached}${color}                
#
############  HDD
#
${goto 46}${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 76FF00 FF0000 -t}
${goto 84}${color4}${voffset -9}${diskiograph_read 10,106 76FF00 FF0000 -t}${diskiograph_write 10,106 76FF00 FF0000 -t}
${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}RD${goto 198}WR 
${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} ${color2}${goto 162}RD: ${color4}${diskio_read} ${goto 230}${color2}WR: ${color4}${diskio_write}${color}                
#
${voffset -78}
${goto 302}${font :size=6,weight:bold}${color1}DEV ${goto 345}WR ${goto 380}RD ${alignr}GRAF
${goto 302}${color2}${font :size=6,weight:bold}sda${font :size=6}${goto 322}${diskio_write sda}${goto 358}${diskio_read sda}${alignr}${diskiograph sda 9,32 76FF00 FF0000 -t}
${goto 302}${color3}${font :size=6,weight:bold}sdb${font :size=6}${goto 322}${diskio_write sdb}${goto 358}${diskio_read sdb}${alignr}${diskiograph sdb 9,32 76FF00 FF0000 -t}
${goto 302}${color4}${font :size=6,weight:bold}sdc${font :size=6}${goto 322}${diskio_write sdc}${goto 358}${diskio_read sdc}${alignr}${diskiograph sdc 9,32 76FF00 FF0000 -t}
${goto 302}${color5}${font :size=6,weight:bold}sdd${font :size=6}${goto 322}${diskio_write sdd}${goto 358}${diskio_read sdd}${alignr}${diskiograph sdd 9,32 76FF00 FF0000 -t}
${goto 302}${color6}${font :size=6,weight:bold}sde${font :size=6}${goto 322}${diskio_write sde}${goto 358}${diskio_read sde}${alignr}${diskiograph sde 9,32 76FF00 FF0000 -t}
${goto 302}${color6}${font :size=6,weight:bold}sdf${font :size=6}${goto 322}${diskio_write sdf}${goto 358}${diskio_read sdf}${alignr}${diskiograph sdf 9,32 76FF00 FF0000 -t}
#
############  BAT
#
${goto 50}${color2}${voffset 218}${font :size=10,weight:bold}BAT
${goto 30}${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
#
############  LAN
#
${voffset -230}${font :size=6,weight:bold}${color1}
${goto 302}NET: ${gw_iface} $alignr IP: ${addr eth7}
${goto 302}GATEWAY: $alignr ${gw_ip}
${goto 302}IP ${alignr}DPORT
${goto 302}${font :size=6,weight:normal}${color2}${tcp_portmon 1 65535 rip  0} ${alignr}${tcp_portmon 1 65535 rport  0}
${goto 302}${font :size=6,weight:normal}${color2}${tcp_portmon 1 65535 rip  1} ${alignr}${tcp_portmon 1 65535 rport  1}
${goto 302}${font :size=6,weight:normal}${color2}${tcp_portmon 1 65535 rip  2} ${alignr}${tcp_portmon 1 65535 rport  2}
${goto 302}${font :size=6,weight:normal}${color3}${tcp_portmon 1 65535 rip  3} ${alignr}${tcp_portmon 1 65535 rport  3}
${goto 302}${font :size=6,weight:normal}${color3}${tcp_portmon 1 65535 rip  4} ${alignr}${tcp_portmon 1 65535 rport  4}
${goto 302}${font :size=6,weight:normal}${color3}${tcp_portmon 1 65535 rip  5} ${alignr}${tcp_portmon 1 65535 rport  5}
${goto 302}${font :size=6,weight:normal}${color4}${tcp_portmon 1 65535 rip  6} ${alignr}${tcp_portmon 1 65535 rport  6}
${goto 302}${font :size=6,weight:normal}${color4}${tcp_portmon 1 65535 rip  7} ${alignr}${tcp_portmon 1 65535 rport  7}
${goto 302}${font :size=6,weight:normal}${color4}${tcp_portmon 1 65535 rip  8} ${alignr}${tcp_portmon 1 65535 rport  8}
${goto 302}${font :size=6,weight:normal}${color5}${tcp_portmon 1 65535 rip  9} ${alignr}${tcp_portmon 1 65535 rport  9}
${goto 302}${font :size=6,weight:normal}${color5}${tcp_portmon 1 65535 rip 10} ${alignr}${tcp_portmon 1 65535 rport 10}
${goto 302}${font :size=6,weight:normal}${color5}${tcp_portmon 1 65535 rip 11} ${alignr}${tcp_portmon 1 65535 rport 11}
${goto 302}${font :size=6,weight:normal}${color6}${tcp_portmon 1 65535 rip 12} ${alignr}${tcp_portmon 1 65535 rport 12}
${goto 302}${font :size=6,weight:normal}${color6}${tcp_portmon 1 65535 rip 13} ${alignr}${tcp_portmon 1 65535 rport 13}
${goto 302}${font :size=6,weight:normal}${color6}${tcp_portmon 1 65535 rip 14} ${alignr}${tcp_portmon 1 65535 rport 14}
${goto 302}${font :size=6,weight:bold}${color6}♦PORTAS ABERTAS: ${alignr}${tcp_portmon 1 65535 count}${font}
#
${goto 50}${color2}${voffset -130}${font :size=10,weight:bold}LAN
${goto 34}${color2}${voffset -32}${font :size=8}${if_existing /proc/net/route eth0} ON${else}${if_existing /proc/net/route eth1} ON${else}${if_existing /proc/net/route eth2} ON${else}${if_existing /proc/net/route eth3} ON${else}${if_existing /proc/net/route eth4} ON${else}${if_existing /proc/net/route eth5} ON${else}${if_existing /proc/net/route eth6} ON${else}${if_existing /proc/net/route eth7} ON${else}${if_existing /proc/net/route eth8} ON${else}${if_existing /proc/net/route eth9} ON${else}OFF${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 84}${color4}${voffset -43}${if_up eth0}${upspeedgraph eth0 40,106 76FF00 FF0000 -t}${endif}${if_up eth1}${upspeedgraph eth1 40,106 76FF00 FF0000 -t}${endif}${if_up eth2}${upspeedgraph eth2 40,106 76FF00 FF0000 -t}${endif}${if_up eth3}${upspeedgraph eth3 40,106 76FF00 FF0000 -t}${endif}${if_up eth4}${upspeedgraph eth4 40,106 76FF00 FF0000 -t}${endif}${if_up eth5}${upspeedgraph eth5 40,106 76FF00 FF0000 -t}${endif}${if_up eth6}${upspeedgraph eth6 40,106 76FF00 FF0000 -t}${endif}${if_up eth7}${upspeedgraph eth7 40,106 76FF00 FF0000 -t}${endif}${if_up eth8}${upspeedgraph eth8 40,106 76FF00 FF0000 -t}${endif}${if_up eth9}${upspeedgraph eth9 40,106 76FF00 FF0000 -t}${endif}
${goto 190}${color4}${voffset -53}${if_up eth0}${downspeedgraph eth0 40,106 76FF00 FF0000 -t}${endif}${if_up eth1}${downspeedgraph eth1 40,106 76FF00 FF0000 -t}${endif}${if_up eth2}${downspeedgraph eth2 40,106 76FF00 FF0000 -t}${endif}${if_up eth3}${downspeedgraph eth3 40,106 76FF00 FF0000 -t}${endif}${if_up eth4}${downspeedgraph eth4 40,106 76FF00 FF0000 -t}${endif}${if_up eth5}${downspeedgraph eth5 40,106 76FF00 FF0000 -t}${endif}${if_up eth6}${downspeedgraph eth6 40,106 76FF00 FF0000 -t}${endif}${if_up eth7}${downspeedgraph eth7 40,106 76FF00 FF0000 -t}${endif}${if_up eth8}${downspeedgraph eth8 40,106 76FF00 FF0000 -t}${endif}${if_up eth9}${downspeedgraph eth9 40,106 76FF00 FF0000 -t}${endif}
${goto 84}${voffset -6}${wireless_link_bar 10,212}
${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}▲ ${if_up wlan0}${upspeed wlan0}${goto 198}▼ ${downspeed wlan0}${else}\${if_up wlan1}${upspeed wlan1}${goto 198}▼ ${downspeed wlan1}${else}\${if_up wlan2}${upspeed wlan2}${goto 198}▼ ${downspeed wlan2}${else}\${if_up wlan3}${upspeed wlan3}${goto 198}▼ ${downspeed wlan3}${else}\${if_up wlan4}${upspeed wlan4}${goto 198}▼ ${downspeed wlan4}${else}\${if_up wlan5}${upspeed wlan5}${goto 198}▼ ${downspeed wlan5}${else}\${if_up wlan6}${upspeed wlan6}${goto 198}▼ ${downspeed wlan6}${else}\${if_up wlan7}${upspeed wlan7}${goto 198}▼ ${downspeed wlan7}${else}\${if_up wlan8}${upspeed wlan8}${goto 198}▼ ${downspeed wlan8}${else}\${if_up wlan9}${upspeed wlan9}${goto 198}▼ ${downspeed wlan9}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 190}${color4}${voffset -57}${wireless_link_bar 53,1}
${goto 84}${voffset -4}${font :size=7,weight:bold}${color2}TOT: ${color4}${if_up eth0}${totalup eth0}${goto 194}${color2}TOT: ${color4}${totaldown eth0}${else}\${color4}${if_up eth1}${totalup eth1}${goto 194}${color2}TOT: ${color4}${totaldown eth1}${else}\${color4}${if_up eth2}${totalup eth2}${goto 194}${color2}TOT: ${color4}${totaldown eth2}${else}\${color4}${if_up eth3}${totalup eth3}${goto 194}${color2}TOT: ${color4}${totaldown eth3}${else}\${color4}${if_up eth4}${totalup eth4}${goto 194}${color2}TOT: ${color4}${totaldown eth4}${else}\${color4}${if_up eth5}${totalup eth5}${goto 194}${color2}TOT: ${color4}${totaldown eth5}${else}\${color4}${if_up eth6}${totalup eth6}${goto 194}${color2}TOT: ${color4}${totaldown eth6}${else}\${color4}${if_up eth7}${totalup eth7}${goto 194}${color2}TOT: ${color4}${totaldown eth7}${else}\${color4}${if_up eth8}${totalup eth8}${goto 194}${color2}TOT: ${color4}${totaldown eth8}${else}\${color4}${if_up eth9}${totalup eth9}${goto 194}${color2}TOT: ${color4}${totaldown eth9}${else}\${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 190}${color4}${voffset 10}${wireless_link_bar 53,1}
#
############  NET
#
${goto 50}${color2}${voffset -18}${font :size=10,weight:bold}NET
${goto 34}${color2}${voffset -32}${font :size=8}${if_existing /proc/net/route ppp0} 3G${else}${if_existing /proc/net/route wlan0}${wireless_link_qual_perc wlan0}%${else}${if_existing /proc/net/route wlan1}${wireless_link_qual_perc wlan1}%${else}${if_existing /proc/net/route wlan2}${wireless_link_qual_perc wlan2}%${else}${if_existing /proc/net/route wlan3}${wireless_link_qual_perc wlan3}%${else}${if_existing /proc/net/route wlan4}${wireless_link_qual_perc wlan4}%${else}${if_existing /proc/net/route wlan5}${wireless_link_qual_perc wlan5}%${else}${if_existing /proc/net/route wlan6}${wireless_link_qual_perc wlan6}%${else}${if_existing /proc/net/route wlan7}${wireless_link_qual_perc wlan7}%${else}${if_existing /proc/net/route wlan8}${wireless_link_qual_perc wlan8}%${else}${if_existing /proc/net/route wlan9}${wireless_link_qual_perc wlan9}%${else}OFF${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 84}${color4}${voffset -44}${if_existing /proc/net/route ppp0}${upspeedgraph ppp0 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan0}${upspeedgraph wlan0 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan1}${upspeedgraph wlan1 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan2}${upspeedgraph wlan2 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan3}${upspeedgraph wlan3 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan4}${upspeedgraph wlan4 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan5}${upspeedgraph wlan5 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan6}${upspeedgraph wlan6 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan7}${upspeedgraph wlan7 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan8}${upspeedgraph wlan8 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan9}${upspeedgraph wlan9 40,106 76FF00 FF0000 -t}${else}${upspeedgraph wlan 40,106 76FF00 FF0000 -t}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${goto 190}${color4}${if_existing /proc/net/route ppp0}${downspeedgraph ppp0 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan0}${downspeedgraph wlan0 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan1}${downspeedgraph wlan1 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan2}${downspeedgraph wlan2 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan3}${downspeedgraph wlan3 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan4}${downspeedgraph wlan4 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan5}${downspeedgraph wlan5 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan6}${downspeedgraph wlan6 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan7}${downspeedgraph wlan7 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan8}${downspeedgraph wlan8 40,106 76FF00 FF0000 -t}${else}${if_existing /proc/net/route wlan9}${downspeedgraph wlan9 40,106 76FF00 FF0000 -t}${else}${downspeedgraph wlan 40,106 76FF00 FF0000 -t}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 84}${voffset -6}${wireless_link_bar 10,212}
${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}▲ ${if_up eth0}${upspeed eth0}${goto 198}▼ ${downspeed eth0}${else}\${if_up eth1}${upspeed eth1}${goto 198}▼ ${downspeed eth1}${else}\${if_up eth2}${upspeed eth2}${goto 198}▼ ${downspeed eth2}${else}\${if_up eth3}${upspeed eth3}${goto 198}▼ ${downspeed eth3}${else}\${if_up eth4}${upspeed eth4}${goto 198}▼ ${downspeed eth4}${else}\${if_up eth5}${upspeed eth5}${goto 198}▼ ${downspeed eth5}${else}\${if_up eth6}${upspeed eth6}${goto 198}▼ ${downspeed eth6}${else}\${if_up eth7}${upspeed eth7}${goto 198}▼ ${downspeed eth7}${else}\${if_up eth8}${upspeed eth8}${goto 198}▼ ${downspeed eth8}${else}\${if_up eth9}${upspeed eth9}${goto 198}▼ ${downspeed eth9}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${goto 84}${voffset -4}${font :size=7,weight:bold}${color2}TOT:${color4}${if_up ppp0}${totalup ppp0}${goto 194}${color2}TOT: ${color4}${totaldown ppp0}${else}\${color4}${if_up wlan0}${totalup wlan0}${goto 194}${color2}TOT: ${color4}${totaldown wlan0}${else}\${color4}${if_up wlan1}${totalup wlan1}${goto 194}${color2}TOT: ${color4}${totaldown wlan1}${else}\${color4}${if_up wlan2}${totalup wlan2}${goto 194}${color2}TOT: ${color4}${totaldown wlan2}${else}\${color4}${if_up wlan3}${totalup wlan3}${goto 194}${color2}TOT: ${color4}${totaldown wlan3}${else}\${color4}${if_up wlan4}${totalup wlan4}${goto 194}${color2}TOT: ${color4}${totaldown wlan4}${else}\${color4}${if_up wlan5}${totalup wlan5}${goto 194}${color2}TOT: ${color4}${totaldown wlan5}${else}\${color4}${if_up wlan6}${totalup wlan6}${goto 194}${color2}TOT: ${color4}${totaldown wlan6}${else}\${color4}${if_up wlan7}${totalup wlan7}${goto 194}${color2}TOT: ${color4}${totaldown wlan7}${else}\${color4}${if_up wlan8}${totalup wlan8}${goto 194}${color2}TOT: ${color4}${totaldown wlan8}${else}\${color4}${if_up wlan9}${totalup wlan9}${goto 194}${color2}TOT: ${color4}${totaldown wlan9}${else}\${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif} 


its my 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='eth7',                      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=10,
    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='eth7',                      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=10,
    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='downspeedf',                arg='ppp0',                      max_value=100,
    x=44,                          y=570,
    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=10,
    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=570,
    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=10,
    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=650,
    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

Screenshot

Last edited by Marenbraga (2014-04-09 00:33:58)

Offline

#7316 2014-04-09 01:57:44

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

Re: Conky v1.9 Thread

Sector11 wrote:
Dobbie03 wrote:

EDIT:  If I change the ARGB settings to this:

own_window_argb_visual yes
own_window_argb_value 255
own_window_colour ffffff

I get this result:

http://en.zimagez.com/miniature/selection0040.png

I can't quite get the background to be 100% transparent.

Did you set "own_window_transparency" to no - or comment it out?

This 'should' give conky the 'true transparency' however the images don't work, defeating your purpose.

This is a conky problem that's been a known issue for a long time, composite managers and images ... check out what dk75 wrote about it.

If I may make a few suggestions

  1. keep that conky as a backup

  2. make an exact copy to test with.

  3. get another weather conky that uses 'fonts' instead of images running with true argb transparency to have a 'working' weather conky on your desktop as you test this fully. See Teo's scripts in my sig.

In a nutshell:

  1. the washed out images are a composition manager problem within conky, mutt in GNOME3 in your case

  2. the black background is a conky problem due to pusedo-transparency using the 'root' window

i wonder how the cairo generated images work with all this
most lua generated images in scripts are using the imlib2 library
but cairo can display images too (but only png's)
might have to experiment when i have some free time

Offline

#7317 2014-04-09 02:01:09

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

Re: Conky v1.9 Thread

Marenbraga wrote:

problems with conky

can anyone help? My conkyrc is in trouble, the line below will not appear on the display.
The problematic line is:

${goto 91}${voffset -14}${font :size=7,weight:bold}${color2}▲ ${if_up ppp0}${upspeed ppp0}${endif}${if_up wlan0}${upspeed wlan0}${endif}${if_up wlan1}${upspeed wlan1}${endif}${if_up wlan2}${upspeed wlan2}${endif}${if_up wlan3}${upspeed wlan3}${endif}${if_up wlan4}${upspeed wlan4}${endif}${if_up wlan5}${upspeed wlan5}${endif}${if_up wlan6}${upspeed wlan6}${endif}${if_up wlan7}${upspeed wlan7}${endif}${if_up wlan8}${upspeed wlan8}${endif}${if_up wlan9}${upspeed wlan9}${endif}${goto 198}▼ ${if_up ppp0}${downspeed ppp0}${endif}${if_up wlan0}${downspeed wlan0}${endif}${if_up wlan1}${downspeed wlan1}${endif}${if_up wlan2}${downspeed wlan2}${endif}${if_up wlan3}${downspeed wlan3}${endif}${if_up wlan4}${downspeed wlan4}${endif}${if_up wlan5}${downspeed wlan5}${endif}${if_up wlan6}${downspeed wlan6}${endif}${if_up wlan7}${downspeed wlan7}${endif}${if_up wlan8}${downspeed wlan8}${endif}${if_up wlan9}${downspeed wlan9}${endif}

thanks all

is there actually a chance that your conky will encounter this many different connections?
or are you just trying to cover all possibilities?

if it was me, i would find out which possibilities exist and make things more simple

as for not displaying, are you sure your conky is set long enough in the config to see the line?

Offline

#7318 2014-04-09 02:35:37

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

Re: Conky v1.9 Thread

Hi mrpeachy,

I use crunchbang on a stick as if it were installed on an external HDD. However, my Conky needs to interpret any new device ETH as existing. I do not know how clean the "buffer" that stores the ETH devices, by assigning them a different letter (eth 1, 2 eth, eth 3 ....), I need to interpret various ETH on the same Conky.

Unfortunately I do not know if there is another way to use Conky on multiple machines without having to set the "eth and wlan" every time I change computers.

Offline

#7319 2014-04-09 09:25:52

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

pvsage wrote:

mogrify is part of imagemagick; as far as I know it is part of a base Waldorf install.

if you are not able to download the packet you must run following at first:

apt-get update

then you can install

apt-get install imagemagick

then it should work smile

Offline

#7320 2014-04-09 16:24:45

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

Re: Conky v1.9 Thread

@ Marenbraga ... Buen día

Sorry for the dely in getting back ... life, and other things got involved.

I though I had a winners with

if_gw
    if there is at least one default gateway, display everything between $if_gw and the matching $endif

gw_iface
         Displays the default route's interface or "multiple"/"none" accordingly.

but ${gw_iface} can't be imbedded in another conky command like:

${upspeedgraph ${gw_iface} 40,106 76FF00 FF0000 -t}

... bummer.  Would have been soooooooo easy.

Anyway, I can't test the "wlan" stuff in your conky as I only have "eth0" here so my next thoughts were

Check for strictness of your UP connections (above TEXT)

if_up_strictness
     How strict should if_up be when testing an interface for being up? The value is one of up, link or address, to check for the interface being solely up, being up and having link or being up, having link and an assigned IP address.

if_up_strictness up ## up link or address
TEXT

-= or =- "maybe you've max'ed: out default levels:

max_specials
     Maximum number of special things, e.g. fonts, offsets, aligns, etc. (default is 512)

max_user_text
     Maximum size of user text buffer, i.e. layout below TEXT line in config file (default is 16384 bytes)

Pop those in above TEXT with ridiculously high values to see if the "wlan" comes into play, if it does, reduce the values until it disappears and then increase by small amounts until it's back.

Next thought; you have a LOT of unnecessary ${if_up xxx} commands in your conky you could trim those back and see if it helps.

I created a test showing if_up for eth1, eth2, eth0, eth3 eth4 (in that order) and got all your "data" for 'eth0' with only one ${if_up eth0} command (I'd use a few more \ to cut long lines if this was a working conky .. personal preference). goto's and voffset's are different as I used only a section of your conky ... plus the font ... I needed a magnifying glass to see the original conky here. 8) j 8) OLD eyes! lol lol

TEXT
${membar 0,50} Sector11 ${membar 0,50}

${if_up eth1}${goto 250}eth1\
eth 1 info
eth 1 info${else}\
${if_up eth2}${goto 250}eth2\
eth 2 info
eth 2 info${else}\
${if_up eth0}${upspeedgraph eth0 40,106 76FF00 FF0000 -t}${goto 250}eth0\
${goto 115}${color4}${downspeedgraph eth0 40,106 76FF00 FF0000 -t}${color}
${voffset -11}${color5}${wireless_link_bar 15,215}${voffset 11}${goto 113}${voffset -56}${wireless_link_bar 53,1}${color}
${voffset -23}${goto 10}↑ ${upspeed eth0}${goto 123}↓ ${downspeed eth0}
${goto 10}${color2}TOT: ${color4}${totalup eth0}${goto 123}${color2}TOT: ${color4}${totaldown eth0}${else}\
${if_up eth3}${goto 250}eth3\
eth 3 info
eth 3 info${else}\
${if_up eth4}${goto 250}eth4\
eth 4 info
eth 4 info\
${endif}${endif}${endif}${endif}${endif}${color}

${gw_iface} ← :) ↓  :(
${upspeedgraph ${gw_iface} 40,106 76FF00 FF0000 -t}
  ${gw_ip}


if_gw
	if there is at least one default gateway,
	display everything between $if_gw and the matching $endif

${if_gw}${gw_iface}
${upspeedgraph ${gw_iface} 40,106 76FF00 FF0000 -t}${endif}


${membar 0,50} Marenbraga ${membar 0,50}

2014_04_09_13_02_50_1920x1080_Sector11.jpg
I hope this helps.
==========
BTW.... nice idea that vertical bar - - ${wireless_link_bar 53,1} AND since I don't have 'wireless' it makes perfect boxes in conky.
Gracias!  Was that your idea or did you get it someplace else?  I'll always credit you for that or like this:
Credit to Marenbraga via <insert name>

I use ${membar 0,50} to do horizontal lines as seen above.

Last edited by Sector11 (2014-04-09 16:27:25)


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

Offline

#7321 2014-04-09 18:29:14

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

Re: Conky v1.9 Thread

related, i have something that isnt working but looks like it should
this line gets the current running network interface
not very elegant and im sure it could be consolidated into a single command smile

ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'

used in conky like this

template1 ${pre_exec ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'}
TEXT
${template1}

I get "wlan0" displayed on screen by conky

this also

template1 wlan0
TEXT
${downspeed ${template1} }

I get the downspeed of wlan0 displayed on screen by conky

BUT this

template1 ${pre_exec ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'}
TEXT
${downspeed ${template1} }

i just get 0B

it should be feeding downspeed as in ${downspeed wlan0} but it isnt  sad

Offline

#7322 2014-04-09 19:41:36

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

Re: Conky v1.9 Thread

ive been testing images

Screenshot_from_2014_04_09_14_36_12.jpg

top line, left pig is drawn from within a lua script using cairo
top line, middle pig is drawn in a lua script using imlib 2
top line, right pig is drawn with conky image command

${image /home/mcdowall/Desktop/testfolder/pic1.png -p 200,0 -s 70x70}

bottom line, left is cairo pig drawn after text
right is imlib2 pig drawn after text

${lua main ({x=40,y=100,w=70,h=70,mode=1})}
${lua main ({x=120,y=100,w=70,h=70,mode=2})}

these are my window settings

### window settings
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
### ARGB can be used for real transparency, 
### note that a composite manager is required for real transparency. 
own_window_argb_visual yes
##own_window_argb_value 0

so it looks like cairo is the way to go for images when wanting real transparency, ill add a cairo image option to wun i think

NOTE

the imlib2 drawn pigs, drawn from the lua script WERE showing up solid UNTIL i added the conky drawn pig with the conky image command

this is the lua that did the images

require 'cairo'
require 'imlib2'


function conky_main(tab)
if conky_window == nil then return end
local updates=tonumber(conky_parse("${updates}"))
cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
--#########################################################################################################
f ="/home/mcdowall/Desktop/testfolder/pic1.png"

if tab~=nil then
tab=loadstring("return" .. tab)()
x=tab.x
y=tab.y
w=tab.w
h=tab.h
	if tab.mode==1 then
	cimage({x=x,y=y,w=w,h=h,f=f})
	else
	imlib2({x=x,y=y,w=w,h=h,f=f})
	end
end



cimage({x=40,y=0,w=70,h=70,f=f})
imlib2({x=120,y=0,w=70,h=70,f=f})

--#########################################################################################################
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end--end main function

function cimage(im)
local x=im.x
local y=im.y
local w=im.w
local h=im.h
local f=im.f
cairo_rectangle (cr,x,y,w,h);
cairo_clip (cr);
cairo_new_path (cr);
simage = cairo_image_surface_create_from_png (f);
iw = cairo_image_surface_get_width (simage);
ih = cairo_image_surface_get_height (simage);
cairo_save(cr)
cairo_translate(cr,x,y)
cairo_scale (cr, h/iw, w/ih);
cairo_set_source_surface (cr, simage,0,0);
cairo_paint (cr);
cairo_restore (cr)
cairo_surface_destroy (simage);
end

function imlib2(im)--#######################################################################################
local x=im.x
local y=im.y
local w=im.w
local h=im.h
local file=tostring(im.f)
local decache=im.decache or 0
if file==nil then print("set image file") end
---------------------------------------------
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then 
width=imlib_image_get_width() 
else
width=tonumber(w)
end
if tonumber(h)==0 then 
height=imlib_image_get_height() 
else
height=tonumber(h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
	if decache==1 then
	imlib_free_image_and_decache()
	else
	imlib_free_image()
	end
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(x,y)
imlib_free_image()
end--function image

Last edited by mrpeachy (2014-04-09 19:44:26)

Offline

#7323 2014-04-09 20:23:46

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

Re: Conky v1.9 Thread

@ mrpeachy

Oooooooooooo close ... good thinking mrpeachy ...

I tried:

template1 ${pre_exec ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print $1}'}
template2 eth0
template3 ${gw_iface}
template4 ${if_up eth1}eth1${else}eth0${endif}

TEXT
T1: ${template1}
T2: ${template2} ${downspeed ${template2}}${goto 150}${upspeed ${template2}}
T3: ${template3} ${downspeed ${template3}}${goto 150}${upspeed ${template3}}
T4: ${template4} ${downspeed ${template4}}${goto 150}${upspeed ${template4}}

knowing that T1 would not work - I need sudo here - but had hopes for T4 - but noooo, I see:

T1:
T2: eth0 31B          155B (or what ever is current)
T3: eth0 0B            0B
T4: eth0 0B            0B

There has to be a way ...

Last edited by Sector11 (2014-04-09 20:39:59)


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

Offline

#7324 2014-04-09 20:32:27

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

Re: Conky v1.9 Thread

mrpeachy wrote:

ive been testing images

http://s10.postimg.org/jnupuklpx/Screenshot_from_2014_04_09_14_36_12.jpg

top line, left pig is drawn from within a lua script using cairo
top line, middle pig is drawn in a lua script using imlib 2
top line, right pig is drawn with conky image command

Riiiiiiiiiight ... so which little piggy went to the market?  Oh right, the Cairo Piggy!

The Paris and London Piggies are not happy.  lol lol lol

It's going to take me a day or so for that to sink in ... but it looks like something that screams "Conky PitStop".  big_smile


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

Offline

Be excellent to each other!

#7325 2014-04-09 21:11:47

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

Re: Conky v1.9 Thread

this works

${execp ifconfig | grep -EB4 "RUNNING" | grep "Link encap" | grep -v "lo" | awk '{print "${downspeed " $1 "}"}'}

should identify the current running adapter and pring the desired output, in this case downspeed  big_smile

edit the bit at the end for different outputs

now need dk75 to make it a one commander  big_smile

Last edited by mrpeachy (2014-04-09 21:12:57)

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