You are not logged in.

#3326 2020-03-28 09:15:14

unklar
Member
Registered: 2015-10-31
Posts: 1,135

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

@Teo, angel

it's a pleasure to work with your script to Weather.com every day and have the current(!) and complete(!) data on computer immediately.

Once again, thanks a lot to you, my friend!   smile

Offline

#3327 2020-03-28 12:18:31

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Kein Problem unklar


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3328 2020-03-28 18:24:31

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

fv80megav1.png
conkynew.pnghow to up load


Good evening to all and good evening to TEO and SECTOR11 .... the phoenix always rises from the ashes ..... here I am after a long time I republish my last job thinking of YOU and thinking that my MASTERS are always there ..... I hope you like it ..
Anyone interested in the code will publish it soon .......
Your Luke Skywalker

big_smile  big_smile  big_smile  tongue  tongue  tongue  tongue  cool  cool  cool  cool  angel  devil


Nothing happens by chance

Offline

#3329 2020-03-28 19:28:28

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

That's very tasty fvirgola80, thanks for your kind words!
I really hope you're holding on there buddy.
Our thoughts are out there for Italy, viva Italia and STAY AT HOME!


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3330 2020-03-28 20:17:06

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,128

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

@ fvirgola80

Ciao amico....  So good to see you.  Stay safe, wash your hands.

NICE Conky!!!  One OOPS!

You have a problem with the calendar.
That is not this month showing  sad

the 1 should be under Sunday and 28 under Saturday.
2020-03-28-170927-S11.jpg

If you need help send the code you are using for the calendar.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3331 2020-03-29 08:44:37

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:

That's very tasty fvirgola80, thanks for your kind words!
I really hope you're holding on there buddy.
Our thoughts are out there for Italy, viva Italia and STAY AT HOME!


Good morning Teo, thanks to YOU ... here in Italy the situation is dramatic you are at home and in the meantime I have resumed with the work on the conky ... what is the situation with you? I hope it is quieter than ours ....
We get caught these days ... big_smile  wink


Nothing happens by chance

Offline

#3332 2020-03-29 08:47:48

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Sector11 wrote:

@ fvirgola80

Ciao amico....  So good to see you.  Stay safe, wash your hands.

NICE Conky!!!  One OOPS!

You have a problem with the calendar.
That is not this month showing  sad

the 1 should be under Sunday and 28 under Saturday.
https://i.ibb.co/27g1XSc/2020-03-28-170927-S11.jpg

If you need help send the code you are using for the calendar.

Amico mio wink wink big_smile ,
how are you? now I send you the part of the calendar code, it's actually right, however, even in the old conky it worked that way ...

${alignc}${if_match ${time %w}==0}${color5}do${color6} lu ma me gi ve sa${else}\
${if_match ${time %w}==1}${color6}do ${color5}lu${color6} ma me gi ve sa${else}\
${if_match ${time %w}==2}${color6}do lu ${color5}ma${color6} me gi ve sa${else}\
${if_match ${time %w}==3}${color6}do lu ma ${color5}me${color6} gi ve sa${else}\
${if_match ${time %w}==4}${color6}do lu ma me ${color5}gi${color6} ve sa${else}\
${if_match ${time %w}==5}${color6}do lu ma me gi ${color5}ve${color6} sa${else}\
${color6}do lu ma me gi ve ${color5}sa${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}${color6}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color6}/' | sed ':a;N;$!ba;s/\n/\n${alignc}/g'}${color}

Chimo  wink  wink  wink


Nothing happens by chance

Offline

#3333 2020-03-29 12:37:15

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,128

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

fvirgola80 wrote:

Amico mio wink wink big_smile ,
how are you? now I send you the part of the calendar code, it's actually right, however, even in the old conky it worked that way ...

All good here and happy to see the number of recovered in Italy rising.  12,384 so far, as a friend said, let's concentrate on the positive.

Interesting, it is my tweaks to that calendar.

And it works perfect here.  The "1" is under "do" but under the "d" in do not the "o"

I changed the two ${alignc} in the last line to get it under the "o" = ${goto 90} in my case
2020-03-29-093206-S11.jpg

so now I am stumped.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3334 2020-03-29 13:11:52

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

fvirgola80 wrote:

Good morning Teo, thanks to YOU ... here in Italy the situation is dramatic you are at home and in the meantime I have resumed with the work on the conky ... what is the situation with you? I hope it is quieter than ours ....
We get caught these days ... big_smile  wink

Things are still at the moment; the next 2-3 weeks are crucial for the development of the pandemic.
Thank God our government took measures quickly and without hesitation.
Stay strong my friend and, once again, STAY AT HOME!


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3335 2020-03-30 10:29:42

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:
fvirgola80 wrote:

Good morning Teo, thanks to YOU ... here in Italy the situation is dramatic you are at home and in the meantime I have resumed with the work on the conky ... what is the situation with you? I hope it is quieter than ours ....
We get caught these days ... big_smile  wink

Things are still at the moment; the next 2-3 weeks are crucial for the development of the pandemic.
Thank God our government took measures quickly and without hesitation.
Stay strong my friend and, once again, STAY AT HOME!


Thanks a lot Teo. Here in Italy they have set the deadline as April 3, 2020 but I think things will go on for long ... I want to publish my conky with some small arrangements.

wink  wink  wink  wink


Nothing happens by chance

Offline

#3336 2020-03-30 10:31:50

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Sector11 wrote:
fvirgola80 wrote:

Amico mio wink wink big_smile ,
how are you? now I send you the part of the calendar code, it's actually right, however, even in the old conky it worked that way ...

All good here and happy to see the number of recovered in Italy rising.  12,384 so far, as a friend said, let's concentrate on the positive.

Interesting, it is my tweaks to that calendar.

And it works perfect here.  The "1" is under "do" but under the "d" in do not the "o"

I changed the two ${alignc} in the last line to get it under the "o" = ${goto 90} in my case
https://i.ibb.co/fpVZTDm/2020-03-29-093206-S11.jpg

so now I am stumped.

Amico mio,
I have tried to follow your advice but I have not solved the problem the correspondence day does not align with the date. In the bad weather I publish the conky and the lua script
Chimo wink  wink  wink  tongue


Nothing happens by chance

Offline

#3337 2020-03-30 11:20:11

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Here I am my friends, as promised public the conky whose images I previously published. The conky is in version 1.9 who wants to convert it into the version that owns for example 1.10. is optimized for 1920 * 1080 video resolution. The initial part refers to the classic system monitor inside a LUA script is included for the graphics of the processors and the LAN, immediately below there are the weather forecasts and the moon phases. (of which I have changed the scenography from the previous one)
I tried to insert a little bit of everything. Suggestions and changes to the same are welcome, maybe I have omitted something many times.
Have fun

conkynew.png  fv80megav1.png  grid2.png

LUA SCRIPT

To call the script in a conky, use, before TEXT
	lua_load /path/to/the/script/graph.lua
	lua_draw_hook_pre main_graph
and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name		- the name of the conky variable to display,
			  for example for {$cpu cpu0}, just write name="cpu"
arg			- the argument of the above variable,
			  for example for {$cpu cpu1}, just write arg="cpu1"
		  	  arg can be a numerical value if name=""
max			- the maximum value the above variable can reach,
			  for example for {$cpu cpu1}, just write max=100 or less or more
	
Optional parameters:
x,y 		- coordinates of the bottom-left corner of the graph,
              relative to the top-left corner of the conky window 
			  default =  bottom-left corner of the conky window
width       - width of the graph, default = 100 pixels
height      - height of the graph, default = 20 pixels
nb_values   - number of values to display in the graph, default=width 
              i.e. 1 pixel for 1 value
autoscale   - if set to true, calculate the max valeu of the y axis and
              doesn't use the max parameter above, default=false
skew_x      - skew graph around x axis, défaut = 0
skew_y      - skew graph around y axis, défaut = 0
angle	    - angle of rotation of the graph in degress, default = 0
              i.e. a horizontal graph)
inverse     - if set to true, graph are draw from right to left, default=false
background  - if set to false, background is not drawn, default=true
foreground  - if set to false, foreground is not drawn, default=true
              foreground = plain graph
bg_bd_size  - size of the border of the background, default=0=no border
fg_bd_size  - size of the border of the foreground, default=0=no border


Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table : 
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table : 
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table : 
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}

bg_colour	- colour table for background,
			  default = {{0,0x000000,.5},{1,0xFFFFFF,.5}}
fg_colour	- colour table for foreground,
			  default = {{0,0x00FFFF,1},{1,0x0000FF,1}}
bg_bd_colour- colour table for background border,
			  default = {{1,0xFFFFFF,1}}			  
fg_bd_colour- colour table for foreground border,
			  default = {{1,0xFFFF00,1}}			  

bg_orientation, bg_bd_orientation, fg_orientation, fg_bd_orientation,
        	- "orientation" defines the starting point of the gradient,
        	  default="nn"
			  there are 8 available starting points : 
			  "nw","nn","ne","ee","se","ss","sw","ww"
			  (n for north, w for west ...)
			  theses 8 points are the 4 corners + the 4 middles of graph
			  so a gradient "nn" will go from "nn" to "ss"
			  a gradient "nw" will go from "nw" to "se"

draw_me     - if set to false, graph is not drawn (default = true)
              it can be used with a conky string, if the string returns 1, the graph is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
              
v1.0 (31/10/2010) original release
v1.1 (07/01/2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"
                  text is parsed inside the function, not in the array of settings

--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation version 3 (GPLv3)
--     
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--     
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--      MA 02110-1301, USA.		

]]

require 'cairo'

function set_settings()
graph_settings={
     {
     name="cpu",
     arg="cpu1",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=6,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x1882a3,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },
     {
     name="cpu",
     arg="cpu2",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=6,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x42706f,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },
     {
     name="cpu",
     arg="cpu3",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=5,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x24d4c2,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
     {
     name="cpu",
     arg="cpu4",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=5,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x3a4ee8,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
     {
     name="upspeedf",
     arg="eth1",
     max=40,
     width=285,
     height=20,
     nb_values=76,
     autoscale=true,
     x=5,
     y=446,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x3a4ee8,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
     {
     name="downspeedf",
     arg="eth1",
     max=80,
     width=285,
     height=80,
     nb_values=76,
     autoscale=true,
     x=5,
     y=447,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x24d4c2,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
      }
end


function check_settings(t)
    --tables are check only when conky start
	if t.name==nil and t.arg==nil then 
		print ("No input values ... use parameters 'name'" .. 
			" with 'arg' or only parameter 'arg' ") 
		return 1
	end

	if t.max==nil then
		print ("No maximum value defined, use 'max'")
		print ("for name=" .. t.name .. " with arg=" .. t.arg)
		return 1
	end
	if t.name==nil then t.name="" end
	if t.arg==nil then t.arg="" end
	return 0
end

function conky_main_graph()

    if conky_window == nil then return end
	    
    local w=conky_window.width
    local h=conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, 
            conky_window.drawable, conky_window.visual, w, h)
    cr=cairo_create(cs)

    updates=tonumber(conky_parse('${updates}'))
    --start drawing after "updates_gap" updates
    --prevent segmentation error for cpu
    updates_gap=5
    if updates==1 then    
        set_settings()
	    
	    flagOK=0
		for i in pairs(graph_settings) do
			if graph_settings[i].width==nil then graph_settings[i].width=100 end
        	if graph_settings[i].nb_values==nil then  
        	    graph_settings[i].nb_values= graph_settings[i].width
        	end
			--create an empty table to store values
			graph_settings[i]["values"]={}
			--beginning point
			graph_settings[i].beg = graph_settings[i].nb_values
			--graph_settings[i].beg = 0
			for j =1, graph_settings[i].nb_values do
			    graph_settings[i].values[j]=0
			end
		    graph_settings[i].flag_init=true
		    flagOK=flagOK + check_settings(graph_settings[i])

		end
    end

-- ARGH argh

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

    --drawing process
    if updates > updates_gap then
		for i in pairs(graph_settings) do
		    if graph_settings[i].draw_me==true then graph_settings[i].draw_me = nil end
			if (graph_settings[i].draw_me==nil or conky_parse(tostring(graph_settings[i].draw_me)) == "1") then 
			    local nb_values=graph_settings[i].nb_values
			    graph_settings[i].automax=0
			    for j =1, nb_values do
				    if graph_settings[i].values[j+1]==nil then 
				        graph_settings[i].values[j+1]=0 
				    end
				
				    graph_settings[i].values[j]=graph_settings[i].values[j+1]
				    if j==nb_values then
					    --store value
					    if graph_settings[i].name=="" then
					        value=graph_settings[i].arg
					    else
        					value=tonumber(conky_parse('${' .. 
        					    graph_settings[i].name .. " " ..
        					    graph_settings[i].arg ..'}'))
        			    end
					    graph_settings[i].values[nb_values]=value
				    end
				    graph_settings[i].automax=math.max(graph_settings[i].automax,
				                                       graph_settings[i].values[j])
			        --should stop weird glitches at beginning when no values reported yet for upspeed or diskio
                    if graph_settings[i].automax == 0 then graph_settings[i].automax = 1 end 
                end
   			    draw_graph(graph_settings[i])
		    end
		end
    end

    cairo_destroy(cr)
    cairo_surface_destroy(cs)
	updates=nil
	updates_gap=nil
end


function draw_graph(t)
    --drawing function

    local function rgb_to_r_g_b(colour)
        return ((colour[2] / 0x10000) % 0x100) / 255., ((colour[2] / 0x100) % 0x100) / 255., (colour[2] % 0x100) / 255., colour[3]
    end
 
	local function linear_orientation(o,w,h)
	    --set gradient for bg and bg border
	    local p
		if o=="nn" then
			p={w/2,h,w/2,0}
		elseif o=="ne" then
			p={w,h,0,0}
		elseif o=="ww" then
			p={0,h/2,w,h/2}
		elseif o=="se" then
			p={w,0,0,h}
		elseif o=="ss" then
			p={w/2,0,w/2,h}
		elseif o=="ee" then
			p={w,h/2,0,h/2}		
		elseif o=="sw" then
			p={0,0,w,h}
		elseif o=="nw" then
			p={0,h,w,0}
		end
		return p
	end

	local function linear_orientation_inv(o,w,h)
	    --set gradient for fg and fg border
	    local p
		if o=="ss" then
			p={w/2,h,w/2,0}
		elseif o=="sw" then
			p={w,h,0,0}
		elseif o=="ee" then
			p={0,h/2,w,h/2}
		elseif o=="nw" then
			p={w,0,0,h}
		elseif o=="nn" then
			p={w/2,0,w/2,h}
		elseif o=="ww" then
			p={w,h/2,0,h/2}		
		elseif o=="ne" then
			p={0,0,w,h}
		elseif o=="se" then
			p={0,h,w,0}
		end
		return p
	end


	--set default values
	
    --cancel drawing if not needed
	if t.draw_me~=nil and conky_parse(tostring(t.draw_me)) ~= "1" then 
		return
	end
	

	
	if t.height==nil	then t.height=20 end
	--checked in previous part : width and nb_values
		
	if t.background==nil    then t.background=true end
	if t.bg_bd_size==nil	then t.bg_bd_size=0 end
	if t.x==nil 		    then t.x=t.bg_bd_size end
	if t.y==nil 		    then t.y=conky_window.height -t.bg_bd_size end
	if t.bg_colour==nil 	then t.bg_colour={{0,0x000000,.5},{1,0xFFFFFF,.5}} end
	if t.bg_bd_colour==nil 	then t.bg_bd_colour={{1,0xFFFFFF,1}} end
	
	if t.foreground==nil    then t.foreground=true end
	if t.fg_colour==nil 	then t.fg_colour={{0,0x00FFFF,1},{1,0x0000FF,1}} end
	
	if t.fg_bd_size==nil	then t.fg_bd_size=0 end	
	if t.fg_bd_colour==nil  then t.fg_bd_colour={{1,0xFFFF00,1}} end
	
	if t.autoscale==nil     then t.autoscale=false end
	if t.inverse==nil       then t.inverse=false end
	if t.angle==nil         then t.angle=0 end
	
	if t.bg_bd_orientation==nil then t.bg_bd_orientation="nn" end
	if t.bg_orientation==nil then t.bg_orientation="nn" end
	if t.fg_bd_orientation==nil then t.fg_bd_orientation="nn" end
	if t.fg_orientation==nil then t.fg_orientation="nn" end

    --check colours tables
	for i=1, #t.fg_colour do    
        if #t.fg_colour[i]~=3 then 
        	print ("error in fg_colour table")
        	t.fg_colour[i]={1,0x0000FF,1} 
        end
    end
	
	for i=1, #t.fg_bd_colour do    
        if #t.fg_bd_colour[i]~=3 then 
        	print ("error in fg_bd_colour table")
        	t.fg_bd_colour[i]={1,0x00FF00,1} 
        end
    end
    
	for i=1, #t.bg_colour do    
        if #t.bg_colour[i]~=3 then 
        	print ("error in background color table")
        	t.bg_colour[i]={1,0xFFFFFF,0.5} 
        end
    end    

	for i=1, #t.bg_bd_colour do    
        if #t.bg_bd_colour[i]~=3 then 
        	print ("error in background border color table")
        	t.bg_bd_colour[i]={1,0xFFFFFF,1} 
        end
    end    

    --calculate skew parameters if needed
    if t.flag_init then
	    if t.skew_x == nil then 
		    t.skew_x=0 
	    else
		    t.skew_x = math.pi*t.skew_x/180	
	    end
	    if t.skew_y == nil then 
		    t.skew_y=0
	    else
		    t.skew_y = math.pi*t.skew_y/180	
	    end
	    t.flag_init=false
	end

    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_join(cr,CAIRO_LINE_JOIN_ROUND)

    local matrix0 = cairo_matrix_t:create()
    tolua.takeownership(matrix0)
    cairo_save(cr)
    cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
    cairo_transform(cr,matrix0)
    
   	local ratio=t.width/t.nb_values

	cairo_translate(cr,t.x,t.y)
	cairo_rotate(cr,t.angle*math.pi/180)
	cairo_scale(cr,1,-1)

	--background
	if t.background then
	    local pts=linear_orientation(t.bg_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1, #t.bg_colour do
			--print ("i",i,t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
		    cairo_pattern_add_color_stop_rgba (pat, t.bg_colour[i][1], rgb_to_r_g_b(t.bg_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_rectangle(cr,0,0,t.width,t.height)	
		cairo_fill(cr)	
		cairo_pattern_destroy(pat)
	end
	
    --autoscale
    cairo_save(cr)
	if t.autoscale then
		t.max= t.automax*1.1
	end
	
    local scale_x = t.width/(t.nb_values-1)
	local scale_y = t.height/t.max
	
    --define first point of the graph
	if updates-updates_gap <t.nb_values then 
		t.beg = t.beg - 1
    	--next line prevent segmentation error when conky window is redraw 
		--quicly when another window "fly" over it
		if t.beg<0 then t.beg=0 end
	else
		t.beg=0
	end
    if t.inverse then cairo_scale(cr,-1,1)
    cairo_translate(cr,-t.width,0) end

	--graph foreground
	if t.foreground then
	    local pts_fg=linear_orientation_inv(t.fg_orientation,t.width,t.height)
	    local pat = cairo_pattern_create_linear (pts_fg[1],pts_fg[2],pts_fg[3],pts_fg[4])
		for i=1,#t.fg_colour,1 do
			cairo_pattern_add_color_stop_rgba (pat, 1-t.fg_colour[i][1], rgb_to_r_g_b(t.fg_colour[i]))
		end
		cairo_set_source (cr, pat)

		cairo_move_to(cr,t.beg*scale_x,0)
		cairo_line_to(cr,t.beg*scale_x,t.values[t.beg+1]*scale_y)
		for i=t.beg, t.nb_values-1 do
			cairo_line_to(cr,i*scale_x,t.values[i+1]*scale_y)		
		end
		cairo_line_to(cr,(t.nb_values-1)*scale_x,0)
		cairo_close_path(cr)
		cairo_fill(cr)
		cairo_pattern_destroy(pat)
	end

	--graph_border
	if t.fg_bd_size>0 then
    	local pts=linear_orientation_inv(t.fg_bd_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1,#t.fg_bd_colour,1 do
			cairo_pattern_add_color_stop_rgba (pat, 1-t.fg_bd_colour[i][1], rgb_to_r_g_b(t.fg_bd_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_move_to(cr,t.beg*scale_x,t.values[t.beg+1]*scale_y)
		for i=t.beg, t.nb_values-1 do
			cairo_line_to(cr,i*scale_x,t.values[i+1]*scale_y)		
		end
		cairo_set_line_width(cr,t.fg_bd_size)
		cairo_stroke(cr)
		cairo_pattern_destroy(pat)
	end
	cairo_restore(cr)

	--background border
	if t.bg_bd_size>0 then
    	local pts=linear_orientation(t.bg_bd_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1, #t.bg_bd_colour do
			--print ("i",i,t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
		    cairo_pattern_add_color_stop_rgba (pat, t.bg_bd_colour[i][1], rgb_to_r_g_b(t.bg_bd_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_rectangle(cr,0,0,t.width,t.height)	
		cairo_set_line_width(cr,t.bg_bd_size)
		cairo_stroke(cr)
		cairo_pattern_destroy(pat)	
	end	

	cairo_restore(cr)

end

CONKY SCRIPT

# pkill -xf "conky -q -c /home/fvirgola80/.config/conky/conkymio.conkyrc" &

###  Begin Window Settings  ##################################################
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class Conky
own_window_colour 000000
## own_window_title fvirgola80 v3 for testing
### ARGB can be used for real transparency - requires composite manager
### Plays hell on conky with images.
own_window_argb_visual yes # Options: yes or no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
own_window_argb_value 100

#minimum_size 250 00	# w|h
#maximum_width 250

minimum_size 0 0 # w|h
maximum_width 1080

gap_x 0 # l|r
gap_y 0 # u|d

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
use_xft yes
xftfont monofur:bold:size=10
xftalpha 1
override_utf8_locale yes
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

default_color DCDCDC #Gainsboro
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 FFA07A #LightSalmon
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
# border margins
border_inner_margin 0
border_outer_margin 0
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
background yes
use_spacer yes
no_buffers yes
imlib_cache_size 0
double_buffer yes


# Name width for processes
top_name_width 5

#Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

draw_graph_borders no #
default_bar_size 0 15
#########  Lua  ##################
lua_load /home/fvirgola80/.config/conky/LUA/graph.lua
lua_draw_hook_post main_graph

##############################################  End Miscellaneous Section  ###

update_interval 1
TEXT
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,10 -s 207x1}
${goto 8}${color5}${time %T}${color} ${color6}←${color} ${nodename} ${color6}→${color} ${kernel} ${color6}←${color}
${goto 8}${color5}${time %b %Y} Week ${time %V}${color} UPTIME ${color6}→→→→${color} ${uptime} ${color6}←${color}
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,52 -s 207x1}
${alignc}${if_match ${time %w}==0}${color5}do${color6} lu ma me gi ve sa${else}\
${if_match ${time %w}==1}${color6}do ${color5}lu${color6} ma me gi ve sa${else}\
${if_match ${time %w}==2}${color6}do lu ${color5}ma${color6} me gi ve sa${else}\
${if_match ${time %w}==3}${color6}do lu ma ${color5}me${color6} gi ve sa${else}\
${if_match ${time %w}==4}${color6}do lu ma me ${color5}gi${color6} ve sa${else}\
${if_match ${time %w}==5}${color6}do lu ma me gi ${color5}ve${color6} sa${else}\
${color6}do lu ma me gi ve ${color5}sa${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}${color6}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color6}/' | sed ':a;N;$!ba;s/\n/\n${alignc}/g'}${color}
${image $HOME/images/white_1.png -p 5,156 -s 285x1}
${image $HOME/images/grid2.png -p 5,165 -s 285x80}




${goto 8}${color6}C1: ${freq_g 1} G ${cpu cpu1}%${color}
${goto 190}${voffset -15}${color5}C2: ${freq_g 2} G ${cpu cpu2}%${color}
${goto 8}${voffset 4}${color5}C3: ${freq_g 3} G ${cpu cpu3}%${color}
${goto 190}${voffset -14}${color6}C4: ${freq_g 4} G ${cpu cpu4}%${color}
${goto 135}${voffset -20}${color4}${execi 2 sensors | grep 'Core 0' | sed -e 's/.*  +//' | sed -e 's/.0°C.*//'}ºC${color}
${image $HOME/images/white_1.png -p 5,271 -s 285x1}
${goto 8}RAM $mem / $memmax ${memgraph 12,132 F57900 FCAF3E}${memperc}%
${goto 8}${voffset 4}${color6}HDD ${acpitemp}°C I/O ${diskio}${color}${diskiograph /dev/sda 12,145 F57900 FCAF3E}
${goto 8}${voffset 4}/root  ${fs_used /} / ${fs_size /}${diskiograph_read /dev/sda 12,60 B0E0E6 00BFFF} ${goto 210}←← read ${fs_used_perc /}%
${goto 8}${voffset 4}${color6}/home  ${fs_used /home} / ${fs_size /home}${diskiograph_write /dev/sda 12,60 ce2029 3dba19}${color} ${goto 210}← write ${fs_free_perc /}%
${goto 8}${voffset 4}${color5}SWAP ${swap}/${swapmax} ${swapperc}%${color} ${color6}→→→→→→${color} ${goto 200}${color5}FAN${color}\
${execi 1 sensors | grep 'fan1' | cut -c13-18 | sed '/^$/d'}${color6}Rpm${color}
${image $HOME/images/white_1.png -p 5,365-s 285x1}
${image $HOME/images/grid2.png -p 5,374 -s 285x80}




${goto 8}LAN: ${addr eth1}${downspeedgraph eth1 12,75 000000 7f8ed3} ${upspeedgraph eth1 12,75 000000 ffcc00}
${goto 8}${voffset 4}${color6}↓↓${color6}DN↓↓${color5}${goto 244}↑↑UP${color5}↑↑${color}
${goto 8}${voffset 4}${color5}${upspeed eth1}${goto 125}${color4}← per/s →${goto 248}${color6}${downspeed eth1}${color}
${goto 8}${voffset 4}${color6}${totalup eth1}${goto 125}${color4}← total →${goto 248}${color5}${totaldown eth1}${color}
${goto 8}${voffset 4}${color5}GW: ${gw_ip}${goto 166}${color6}IPP: ${execi 100 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color}
${image $HOME/images/white_1.png -p 5,535-s 285x1}
${texeci 300 bash $HOME/Accuweather_conky_script/accuweather -f2016}
${goto 85}${voffset -20}${color6}Pressure${goto 200}HUM${goto 265}CLD${color}
${goto 85}${voffset 2}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 200}${texeci 300 sed -n '7p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 265}${texeci 300 sed -n '10p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_0.png -p 2,545 -s 80x80}
${goto 85}${voffset -10}${color6}Wind & Speed${goto 200}UVI${goto 265}VIS${color}
${goto 85}${voffset 5}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $1}'}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $2}'}\
${goto 200}${texeci 300 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | cut -c-5}\
${goto 250}${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/wind_0.png -p 163,590 -s 25x25}
${goto 85}${voffset -10}${color6}Currently${goto 200}REF${goto 265}TMP${color}
${goto 8}${voffset 5}${color5}DP ${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 85}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond|cut -c1-20}\
${goto 200}±${texeci 300 sed -n '3p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 265}${texeci 300 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°${color}
${goto 8}${voffset 5}${color6}Sun${goto 85}↑${texeci 300 sed -n '23p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '24p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '16p' $HOME/Accuweather_conky_script/curr_cond}${color}
${goto 8}${voffset 5}${color5}Moon${goto 85}↑${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/images/white_1.png -p 5,688-s 285x1}
${goto 15}${color5}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 110}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 200}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_1.png -p 15,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_2.png -p 110,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_3.png -p 200,713 -s 65x65}
${goto 80}${color6}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}°${color}


${goto 80}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 8}${color6}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 600 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color6}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${image $HOME/images/white_1.png -p 5,830-s 285x1}
${goto 8}${color5}${texeci 300 sed -n '22p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 80}${texeci 300 sed -n '29p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 155}${texeci 300 sed -n '36p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 220}${texeci 300 sed -n '43p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}
${goto 55}${color6}${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '32p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 300 sed -n '39p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '46p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 55}${color5}${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '33p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 600 sed -n '40p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 600 sed -n '47p' $HOME/Accuweather_conky_script/daily_forecast}°${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_4.png -p 10,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_5.png -p 80,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_6.png -p 155,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_7.png -p 220,850 -s 45x45}
${image $HOME/images/white_1.png -p 5,905-s 285x1}
${texeci 300 bash $HOME/Moongiant_conky_script/moongiant}
${image $HOME/Moongiant_conky_script/0.png -p 5,913 -s 60x60}
${goto 80}${voffset -40}${color6}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2" "$6}'`}\
${goto 195}M.A. ${execpi 300 sed -n '5p' $HOME/Moongiant_conky_script/raw}${color}${color}
${goto 105}${color5}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 195}M.AG. ${execpi 300 sed -n '6p' $HOME/Moongiant_conky_script/raw}${color}
${goto 100}${color6}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 195}M.D. ${execpi 300 sed -n '4p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${goto 90}${color5}VISIBILITY\
${goto 195}S.A. ${execpi 300 sed -n '2p' $HOME/Moongiant_conky_script/raw}${color}
${goto 120}${color6}${execpi 300 sed -n '1p' $HOME/Moongiant_conky_script/raw}\
${goto 195}S.D. ${execpi 300 sed -n '3p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${image $HOME/images/white_1.png -p 190,910-s 1x67}
${image $HOME/images/white_1.png -p 5,980-s 285x1}
${voffset -27}${goto 15}${color5}${execi 3600 echo `date --date="-2 day" | awk '{print $3" "$2}'`}\
${goto 80}${execi 3600 echo `date --date="-1 day" | awk '{print $3" "$2}'`}\
${goto 155}${execi 3600 echo `date --date="+1 day" | awk '{print $3" "$2}'`}\
${goto 220}${execi 3600 echo `date --date="+2 day" | awk '{print $3" "$2}'`}${color}
${image $HOME/Moongiant_conky_script/-2.png -p 10,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/-1.png -p 80,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/1.png -p 154,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/2.png -p 218,997 -s 45x45}
${font monofur:bold:size=9}${goto 57}${color6}${execpi 300 sed -n '13p' $HOME/Moongiant_conky_script/raw}\
${goto 126}${execpi 300 sed -n '21p' $HOME/Moongiant_conky_script/raw}\
${goto 200}${execpi 300 sed -n '29p' $HOME/Moongiant_conky_script/raw}\
${goto 264}${execpi 300 sed -n '37p' $HOME/Moongiant_conky_script/raw}${font}${color}

${voffset 10}${goto 8}${color5}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 79}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 150}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 220}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}${color}
${goto 5}${color6}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 75}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 145}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 215}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}${color}

Luke Skywalker  wink  tongue

a greeting to my teachers
Obi-Wan (TEO) and Yoda (Sector11) 

big_smile  wink  tongue  lol  cool  ops

Last edited by fvirgola80 (2020-03-30 11:22:33)


Nothing happens by chance

Offline

#3338 2020-04-02 14:15:40

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

I modified some scenarios shortly by sending the new code

big_smile big_smile

fvirgola80 wrote:

Here I am my friends, as promised public the conky whose images I previously published. The conky is in version 1.9 who wants to convert it into the version that owns for example 1.10. is optimized for 1920 * 1080 video resolution. The initial part refers to the classic system monitor inside a LUA script is included for the graphics of the processors and the LAN, immediately below there are the weather forecasts and the moon phases. (of which I have changed the scenography from the previous one)
I tried to insert a little bit of everything. Suggestions and changes to the same are welcome, maybe I have omitted something many times.
Have fun

https://i.postimg.cc/k6DjT531/conkynew.png  https://i.postimg.cc/tZH3xCRn/fv80megav1.png  https://i.postimg.cc/BL5PdrWr/grid2.png

LUA SCRIPT

To call the script in a conky, use, before TEXT
	lua_load /path/to/the/script/graph.lua
	lua_draw_hook_pre main_graph
and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name		- the name of the conky variable to display,
			  for example for {$cpu cpu0}, just write name="cpu"
arg			- the argument of the above variable,
			  for example for {$cpu cpu1}, just write arg="cpu1"
		  	  arg can be a numerical value if name=""
max			- the maximum value the above variable can reach,
			  for example for {$cpu cpu1}, just write max=100 or less or more
	
Optional parameters:
x,y 		- coordinates of the bottom-left corner of the graph,
              relative to the top-left corner of the conky window 
			  default =  bottom-left corner of the conky window
width       - width of the graph, default = 100 pixels
height      - height of the graph, default = 20 pixels
nb_values   - number of values to display in the graph, default=width 
              i.e. 1 pixel for 1 value
autoscale   - if set to true, calculate the max valeu of the y axis and
              doesn't use the max parameter above, default=false
skew_x      - skew graph around x axis, défaut = 0
skew_y      - skew graph around y axis, défaut = 0
angle	    - angle of rotation of the graph in degress, default = 0
              i.e. a horizontal graph)
inverse     - if set to true, graph are draw from right to left, default=false
background  - if set to false, background is not drawn, default=true
foreground  - if set to false, foreground is not drawn, default=true
              foreground = plain graph
bg_bd_size  - size of the border of the background, default=0=no border
fg_bd_size  - size of the border of the foreground, default=0=no border


Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table : 
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table : 
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table : 
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}

bg_colour	- colour table for background,
			  default = {{0,0x000000,.5},{1,0xFFFFFF,.5}}
fg_colour	- colour table for foreground,
			  default = {{0,0x00FFFF,1},{1,0x0000FF,1}}
bg_bd_colour- colour table for background border,
			  default = {{1,0xFFFFFF,1}}			  
fg_bd_colour- colour table for foreground border,
			  default = {{1,0xFFFF00,1}}			  

bg_orientation, bg_bd_orientation, fg_orientation, fg_bd_orientation,
        	- "orientation" defines the starting point of the gradient,
        	  default="nn"
			  there are 8 available starting points : 
			  "nw","nn","ne","ee","se","ss","sw","ww"
			  (n for north, w for west ...)
			  theses 8 points are the 4 corners + the 4 middles of graph
			  so a gradient "nn" will go from "nn" to "ss"
			  a gradient "nw" will go from "nw" to "se"

draw_me     - if set to false, graph is not drawn (default = true)
              it can be used with a conky string, if the string returns 1, the graph is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
              
v1.0 (31/10/2010) original release
v1.1 (07/01/2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"
                  text is parsed inside the function, not in the array of settings

--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation version 3 (GPLv3)
--     
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--     
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--      MA 02110-1301, USA.		

]]

require 'cairo'

function set_settings()
graph_settings={
     {
     name="cpu",
     arg="cpu1",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=6,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x1882a3,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },
     {
     name="cpu",
     arg="cpu2",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=6,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x42706f,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },
     {
     name="cpu",
     arg="cpu3",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=5,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x24d4c2,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
     {
     name="cpu",
     arg="cpu4",
     max=100,
     width=285,
     height=75,
     nb_values=100,
     x=5,
     y=237,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x3a4ee8,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
     {
     name="upspeedf",
     arg="eth1",
     max=40,
     width=285,
     height=20,
     nb_values=76,
     autoscale=true,
     x=5,
     y=446,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x3a4ee8,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
     {
     name="downspeedf",
     arg="eth1",
     max=80,
     width=285,
     height=80,
     nb_values=76,
     autoscale=true,
     x=5,
     y=447,
     fg_bd_size=1,
     fg_bd_colour = { {0,0x24d4c2,1}, },
     background=false,
     foreground=false,
     inverse=true,
     },    
      }
end


function check_settings(t)
    --tables are check only when conky start
	if t.name==nil and t.arg==nil then 
		print ("No input values ... use parameters 'name'" .. 
			" with 'arg' or only parameter 'arg' ") 
		return 1
	end

	if t.max==nil then
		print ("No maximum value defined, use 'max'")
		print ("for name=" .. t.name .. " with arg=" .. t.arg)
		return 1
	end
	if t.name==nil then t.name="" end
	if t.arg==nil then t.arg="" end
	return 0
end

function conky_main_graph()

    if conky_window == nil then return end
	    
    local w=conky_window.width
    local h=conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, 
            conky_window.drawable, conky_window.visual, w, h)
    cr=cairo_create(cs)

    updates=tonumber(conky_parse('${updates}'))
    --start drawing after "updates_gap" updates
    --prevent segmentation error for cpu
    updates_gap=5
    if updates==1 then    
        set_settings()
	    
	    flagOK=0
		for i in pairs(graph_settings) do
			if graph_settings[i].width==nil then graph_settings[i].width=100 end
        	if graph_settings[i].nb_values==nil then  
        	    graph_settings[i].nb_values= graph_settings[i].width
        	end
			--create an empty table to store values
			graph_settings[i]["values"]={}
			--beginning point
			graph_settings[i].beg = graph_settings[i].nb_values
			--graph_settings[i].beg = 0
			for j =1, graph_settings[i].nb_values do
			    graph_settings[i].values[j]=0
			end
		    graph_settings[i].flag_init=true
		    flagOK=flagOK + check_settings(graph_settings[i])

		end
    end

-- ARGH argh

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

    --drawing process
    if updates > updates_gap then
		for i in pairs(graph_settings) do
		    if graph_settings[i].draw_me==true then graph_settings[i].draw_me = nil end
			if (graph_settings[i].draw_me==nil or conky_parse(tostring(graph_settings[i].draw_me)) == "1") then 
			    local nb_values=graph_settings[i].nb_values
			    graph_settings[i].automax=0
			    for j =1, nb_values do
				    if graph_settings[i].values[j+1]==nil then 
				        graph_settings[i].values[j+1]=0 
				    end
				
				    graph_settings[i].values[j]=graph_settings[i].values[j+1]
				    if j==nb_values then
					    --store value
					    if graph_settings[i].name=="" then
					        value=graph_settings[i].arg
					    else
        					value=tonumber(conky_parse('${' .. 
        					    graph_settings[i].name .. " " ..
        					    graph_settings[i].arg ..'}'))
        			    end
					    graph_settings[i].values[nb_values]=value
				    end
				    graph_settings[i].automax=math.max(graph_settings[i].automax,
				                                       graph_settings[i].values[j])
			        --should stop weird glitches at beginning when no values reported yet for upspeed or diskio
                    if graph_settings[i].automax == 0 then graph_settings[i].automax = 1 end 
                end
   			    draw_graph(graph_settings[i])
		    end
		end
    end

    cairo_destroy(cr)
    cairo_surface_destroy(cs)
	updates=nil
	updates_gap=nil
end


function draw_graph(t)
    --drawing function

    local function rgb_to_r_g_b(colour)
        return ((colour[2] / 0x10000) % 0x100) / 255., ((colour[2] / 0x100) % 0x100) / 255., (colour[2] % 0x100) / 255., colour[3]
    end
 
	local function linear_orientation(o,w,h)
	    --set gradient for bg and bg border
	    local p
		if o=="nn" then
			p={w/2,h,w/2,0}
		elseif o=="ne" then
			p={w,h,0,0}
		elseif o=="ww" then
			p={0,h/2,w,h/2}
		elseif o=="se" then
			p={w,0,0,h}
		elseif o=="ss" then
			p={w/2,0,w/2,h}
		elseif o=="ee" then
			p={w,h/2,0,h/2}		
		elseif o=="sw" then
			p={0,0,w,h}
		elseif o=="nw" then
			p={0,h,w,0}
		end
		return p
	end

	local function linear_orientation_inv(o,w,h)
	    --set gradient for fg and fg border
	    local p
		if o=="ss" then
			p={w/2,h,w/2,0}
		elseif o=="sw" then
			p={w,h,0,0}
		elseif o=="ee" then
			p={0,h/2,w,h/2}
		elseif o=="nw" then
			p={w,0,0,h}
		elseif o=="nn" then
			p={w/2,0,w/2,h}
		elseif o=="ww" then
			p={w,h/2,0,h/2}		
		elseif o=="ne" then
			p={0,0,w,h}
		elseif o=="se" then
			p={0,h,w,0}
		end
		return p
	end


	--set default values
	
    --cancel drawing if not needed
	if t.draw_me~=nil and conky_parse(tostring(t.draw_me)) ~= "1" then 
		return
	end
	

	
	if t.height==nil	then t.height=20 end
	--checked in previous part : width and nb_values
		
	if t.background==nil    then t.background=true end
	if t.bg_bd_size==nil	then t.bg_bd_size=0 end
	if t.x==nil 		    then t.x=t.bg_bd_size end
	if t.y==nil 		    then t.y=conky_window.height -t.bg_bd_size end
	if t.bg_colour==nil 	then t.bg_colour={{0,0x000000,.5},{1,0xFFFFFF,.5}} end
	if t.bg_bd_colour==nil 	then t.bg_bd_colour={{1,0xFFFFFF,1}} end
	
	if t.foreground==nil    then t.foreground=true end
	if t.fg_colour==nil 	then t.fg_colour={{0,0x00FFFF,1},{1,0x0000FF,1}} end
	
	if t.fg_bd_size==nil	then t.fg_bd_size=0 end	
	if t.fg_bd_colour==nil  then t.fg_bd_colour={{1,0xFFFF00,1}} end
	
	if t.autoscale==nil     then t.autoscale=false end
	if t.inverse==nil       then t.inverse=false end
	if t.angle==nil         then t.angle=0 end
	
	if t.bg_bd_orientation==nil then t.bg_bd_orientation="nn" end
	if t.bg_orientation==nil then t.bg_orientation="nn" end
	if t.fg_bd_orientation==nil then t.fg_bd_orientation="nn" end
	if t.fg_orientation==nil then t.fg_orientation="nn" end

    --check colours tables
	for i=1, #t.fg_colour do    
        if #t.fg_colour[i]~=3 then 
        	print ("error in fg_colour table")
        	t.fg_colour[i]={1,0x0000FF,1} 
        end
    end
	
	for i=1, #t.fg_bd_colour do    
        if #t.fg_bd_colour[i]~=3 then 
        	print ("error in fg_bd_colour table")
        	t.fg_bd_colour[i]={1,0x00FF00,1} 
        end
    end
    
	for i=1, #t.bg_colour do    
        if #t.bg_colour[i]~=3 then 
        	print ("error in background color table")
        	t.bg_colour[i]={1,0xFFFFFF,0.5} 
        end
    end    

	for i=1, #t.bg_bd_colour do    
        if #t.bg_bd_colour[i]~=3 then 
        	print ("error in background border color table")
        	t.bg_bd_colour[i]={1,0xFFFFFF,1} 
        end
    end    

    --calculate skew parameters if needed
    if t.flag_init then
	    if t.skew_x == nil then 
		    t.skew_x=0 
	    else
		    t.skew_x = math.pi*t.skew_x/180	
	    end
	    if t.skew_y == nil then 
		    t.skew_y=0
	    else
		    t.skew_y = math.pi*t.skew_y/180	
	    end
	    t.flag_init=false
	end

    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_join(cr,CAIRO_LINE_JOIN_ROUND)

    local matrix0 = cairo_matrix_t:create()
    tolua.takeownership(matrix0)
    cairo_save(cr)
    cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
    cairo_transform(cr,matrix0)
    
   	local ratio=t.width/t.nb_values

	cairo_translate(cr,t.x,t.y)
	cairo_rotate(cr,t.angle*math.pi/180)
	cairo_scale(cr,1,-1)

	--background
	if t.background then
	    local pts=linear_orientation(t.bg_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1, #t.bg_colour do
			--print ("i",i,t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
		    cairo_pattern_add_color_stop_rgba (pat, t.bg_colour[i][1], rgb_to_r_g_b(t.bg_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_rectangle(cr,0,0,t.width,t.height)	
		cairo_fill(cr)	
		cairo_pattern_destroy(pat)
	end
	
    --autoscale
    cairo_save(cr)
	if t.autoscale then
		t.max= t.automax*1.1
	end
	
    local scale_x = t.width/(t.nb_values-1)
	local scale_y = t.height/t.max
	
    --define first point of the graph
	if updates-updates_gap <t.nb_values then 
		t.beg = t.beg - 1
    	--next line prevent segmentation error when conky window is redraw 
		--quicly when another window "fly" over it
		if t.beg<0 then t.beg=0 end
	else
		t.beg=0
	end
    if t.inverse then cairo_scale(cr,-1,1)
    cairo_translate(cr,-t.width,0) end

	--graph foreground
	if t.foreground then
	    local pts_fg=linear_orientation_inv(t.fg_orientation,t.width,t.height)
	    local pat = cairo_pattern_create_linear (pts_fg[1],pts_fg[2],pts_fg[3],pts_fg[4])
		for i=1,#t.fg_colour,1 do
			cairo_pattern_add_color_stop_rgba (pat, 1-t.fg_colour[i][1], rgb_to_r_g_b(t.fg_colour[i]))
		end
		cairo_set_source (cr, pat)

		cairo_move_to(cr,t.beg*scale_x,0)
		cairo_line_to(cr,t.beg*scale_x,t.values[t.beg+1]*scale_y)
		for i=t.beg, t.nb_values-1 do
			cairo_line_to(cr,i*scale_x,t.values[i+1]*scale_y)		
		end
		cairo_line_to(cr,(t.nb_values-1)*scale_x,0)
		cairo_close_path(cr)
		cairo_fill(cr)
		cairo_pattern_destroy(pat)
	end

	--graph_border
	if t.fg_bd_size>0 then
    	local pts=linear_orientation_inv(t.fg_bd_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1,#t.fg_bd_colour,1 do
			cairo_pattern_add_color_stop_rgba (pat, 1-t.fg_bd_colour[i][1], rgb_to_r_g_b(t.fg_bd_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_move_to(cr,t.beg*scale_x,t.values[t.beg+1]*scale_y)
		for i=t.beg, t.nb_values-1 do
			cairo_line_to(cr,i*scale_x,t.values[i+1]*scale_y)		
		end
		cairo_set_line_width(cr,t.fg_bd_size)
		cairo_stroke(cr)
		cairo_pattern_destroy(pat)
	end
	cairo_restore(cr)

	--background border
	if t.bg_bd_size>0 then
    	local pts=linear_orientation(t.bg_bd_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1, #t.bg_bd_colour do
			--print ("i",i,t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
		    cairo_pattern_add_color_stop_rgba (pat, t.bg_bd_colour[i][1], rgb_to_r_g_b(t.bg_bd_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_rectangle(cr,0,0,t.width,t.height)	
		cairo_set_line_width(cr,t.bg_bd_size)
		cairo_stroke(cr)
		cairo_pattern_destroy(pat)	
	end	

	cairo_restore(cr)

end

CONKY SCRIPT

# pkill -xf "conky -q -c /home/fvirgola80/.config/conky/conkymio.conkyrc" &

###  Begin Window Settings  ##################################################
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class Conky
own_window_colour 000000
## own_window_title fvirgola80 v3 for testing
### ARGB can be used for real transparency - requires composite manager
### Plays hell on conky with images.
own_window_argb_visual yes # Options: yes or no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
own_window_argb_value 100

#minimum_size 250 00	# w|h
#maximum_width 250

minimum_size 0 0 # w|h
maximum_width 1080

gap_x 0 # l|r
gap_y 0 # u|d

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
use_xft yes
xftfont monofur:bold:size=10
xftalpha 1
override_utf8_locale yes
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

default_color DCDCDC #Gainsboro
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 FFA07A #LightSalmon
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
# border margins
border_inner_margin 0
border_outer_margin 0
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
background yes
use_spacer yes
no_buffers yes
imlib_cache_size 0
double_buffer yes


# Name width for processes
top_name_width 5

#Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

draw_graph_borders no #
default_bar_size 0 15
#########  Lua  ##################
lua_load /home/fvirgola80/.config/conky/LUA/graph.lua
lua_draw_hook_post main_graph

##############################################  End Miscellaneous Section  ###

update_interval 1
TEXT
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,10 -s 207x1}
${goto 8}${color5}${time %T}${color} ${color6}←${color} ${nodename} ${color6}→${color} ${kernel} ${color6}←${color}
${goto 8}${color5}${time %b %Y} Week ${time %V}${color} UPTIME ${color6}→→→→${color} ${uptime} ${color6}←${color}
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,52 -s 207x1}
${alignc}${if_match ${time %w}==0}${color5}do${color6} lu ma me gi ve sa${else}\
${if_match ${time %w}==1}${color6}do ${color5}lu${color6} ma me gi ve sa${else}\
${if_match ${time %w}==2}${color6}do lu ${color5}ma${color6} me gi ve sa${else}\
${if_match ${time %w}==3}${color6}do lu ma ${color5}me${color6} gi ve sa${else}\
${if_match ${time %w}==4}${color6}do lu ma me ${color5}gi${color6} ve sa${else}\
${if_match ${time %w}==5}${color6}do lu ma me gi ${color5}ve${color6} sa${else}\
${color6}do lu ma me gi ve ${color5}sa${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}${color6}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color6}/' | sed ':a;N;$!ba;s/\n/\n${alignc}/g'}${color}
${image $HOME/images/white_1.png -p 5,156 -s 285x1}
${image $HOME/images/grid2.png -p 5,165 -s 285x80}




${goto 8}${color6}C1: ${freq_g 1} G ${cpu cpu1}%${color}
${goto 190}${voffset -15}${color5}C2: ${freq_g 2} G ${cpu cpu2}%${color}
${goto 8}${voffset 4}${color5}C3: ${freq_g 3} G ${cpu cpu3}%${color}
${goto 190}${voffset -14}${color6}C4: ${freq_g 4} G ${cpu cpu4}%${color}
${goto 135}${voffset -20}${color4}${execi 2 sensors | grep 'Core 0' | sed -e 's/.*  +//' | sed -e 's/.0°C.*//'}ºC${color}
${image $HOME/images/white_1.png -p 5,271 -s 285x1}
${goto 8}RAM $mem / $memmax ${memgraph 12,132 F57900 FCAF3E}${memperc}%
${goto 8}${voffset 4}${color6}HDD ${acpitemp}°C I/O ${diskio}${color}${diskiograph /dev/sda 12,145 F57900 FCAF3E}
${goto 8}${voffset 4}/root  ${fs_used /} / ${fs_size /}${diskiograph_read /dev/sda 12,60 B0E0E6 00BFFF} ${goto 210}←← read ${fs_used_perc /}%
${goto 8}${voffset 4}${color6}/home  ${fs_used /home} / ${fs_size /home}${diskiograph_write /dev/sda 12,60 ce2029 3dba19}${color} ${goto 210}← write ${fs_free_perc /}%
${goto 8}${voffset 4}${color5}SWAP ${swap}/${swapmax} ${swapperc}%${color} ${color6}→→→→→→${color} ${goto 200}${color5}FAN${color}\
${execi 1 sensors | grep 'fan1' | cut -c13-18 | sed '/^$/d'}${color6}Rpm${color}
${image $HOME/images/white_1.png -p 5,365-s 285x1}
${image $HOME/images/grid2.png -p 5,374 -s 285x80}




${goto 8}LAN: ${addr eth1}${downspeedgraph eth1 12,75 000000 7f8ed3} ${upspeedgraph eth1 12,75 000000 ffcc00}
${goto 8}${voffset 4}${color6}↓↓${color6}DN↓↓${color5}${goto 244}↑↑UP${color5}↑↑${color}
${goto 8}${voffset 4}${color5}${upspeed eth1}${goto 125}${color4}← per/s →${goto 248}${color6}${downspeed eth1}${color}
${goto 8}${voffset 4}${color6}${totalup eth1}${goto 125}${color4}← total →${goto 248}${color5}${totaldown eth1}${color}
${goto 8}${voffset 4}${color5}GW: ${gw_ip}${goto 166}${color6}IPP: ${execi 100 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color}
${image $HOME/images/white_1.png -p 5,535-s 285x1}
${texeci 300 bash $HOME/Accuweather_conky_script/accuweather -f2016}
${goto 85}${voffset -20}${color6}Pressure${goto 200}HUM${goto 265}CLD${color}
${goto 85}${voffset 2}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 200}${texeci 300 sed -n '7p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 265}${texeci 300 sed -n '10p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_0.png -p 2,545 -s 80x80}
${goto 85}${voffset -10}${color6}Wind & Speed${goto 200}UVI${goto 265}VIS${color}
${goto 85}${voffset 5}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $1}'}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $2}'}\
${goto 200}${texeci 300 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | cut -c-5}\
${goto 250}${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/wind_0.png -p 163,590 -s 25x25}
${goto 85}${voffset -10}${color6}Currently${goto 200}REF${goto 265}TMP${color}
${goto 8}${voffset 5}${color5}DP ${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 85}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond|cut -c1-20}\
${goto 200}±${texeci 300 sed -n '3p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 265}${texeci 300 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°${color}
${goto 8}${voffset 5}${color6}Sun${goto 85}↑${texeci 300 sed -n '23p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '24p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '16p' $HOME/Accuweather_conky_script/curr_cond}${color}
${goto 8}${voffset 5}${color5}Moon${goto 85}↑${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/images/white_1.png -p 5,688-s 285x1}
${goto 15}${color5}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 110}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 200}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_1.png -p 15,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_2.png -p 110,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_3.png -p 200,713 -s 65x65}
${goto 80}${color6}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}°${color}


${goto 80}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 8}${color6}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 600 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color6}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${image $HOME/images/white_1.png -p 5,830-s 285x1}
${goto 8}${color5}${texeci 300 sed -n '22p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 80}${texeci 300 sed -n '29p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 155}${texeci 300 sed -n '36p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 220}${texeci 300 sed -n '43p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}
${goto 55}${color6}${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '32p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 300 sed -n '39p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '46p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 55}${color5}${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '33p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 600 sed -n '40p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 600 sed -n '47p' $HOME/Accuweather_conky_script/daily_forecast}°${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_4.png -p 10,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_5.png -p 80,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_6.png -p 155,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_7.png -p 220,850 -s 45x45}
${image $HOME/images/white_1.png -p 5,905-s 285x1}
${texeci 300 bash $HOME/Moongiant_conky_script/moongiant}
${image $HOME/Moongiant_conky_script/0.png -p 5,913 -s 60x60}
${goto 80}${voffset -40}${color6}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2" "$6}'`}\
${goto 195}M.A. ${execpi 300 sed -n '5p' $HOME/Moongiant_conky_script/raw}${color}${color}
${goto 105}${color5}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 195}M.AG. ${execpi 300 sed -n '6p' $HOME/Moongiant_conky_script/raw}${color}
${goto 100}${color6}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 195}M.D. ${execpi 300 sed -n '4p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${goto 90}${color5}VISIBILITY\
${goto 195}S.A. ${execpi 300 sed -n '2p' $HOME/Moongiant_conky_script/raw}${color}
${goto 120}${color6}${execpi 300 sed -n '1p' $HOME/Moongiant_conky_script/raw}\
${goto 195}S.D. ${execpi 300 sed -n '3p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${image $HOME/images/white_1.png -p 190,910-s 1x67}
${image $HOME/images/white_1.png -p 5,980-s 285x1}
${voffset -27}${goto 15}${color5}${execi 3600 echo `date --date="-2 day" | awk '{print $3" "$2}'`}\
${goto 80}${execi 3600 echo `date --date="-1 day" | awk '{print $3" "$2}'`}\
${goto 155}${execi 3600 echo `date --date="+1 day" | awk '{print $3" "$2}'`}\
${goto 220}${execi 3600 echo `date --date="+2 day" | awk '{print $3" "$2}'`}${color}
${image $HOME/Moongiant_conky_script/-2.png -p 10,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/-1.png -p 80,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/1.png -p 154,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/2.png -p 218,997 -s 45x45}
${font monofur:bold:size=9}${goto 57}${color6}${execpi 300 sed -n '13p' $HOME/Moongiant_conky_script/raw}\
${goto 126}${execpi 300 sed -n '21p' $HOME/Moongiant_conky_script/raw}\
${goto 200}${execpi 300 sed -n '29p' $HOME/Moongiant_conky_script/raw}\
${goto 264}${execpi 300 sed -n '37p' $HOME/Moongiant_conky_script/raw}${font}${color}

${voffset 10}${goto 8}${color5}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 79}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 150}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 220}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}${color}
${goto 5}${color6}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 75}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 145}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 215}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}${color}

Luke Skywalker  wink  tongue

a greeting to my teachers
Obi-Wan (TEO) and Yoda (Sector11) 

big_smile  wink  tongue  lol  cool  ops

Last edited by fvirgola80 (2020-04-02 14:25:42)


Nothing happens by chance

Offline

#3339 2020-04-02 16:06:40

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Nice job my friend, thanks!


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3340 2020-04-03 07:20:53

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

wink  wink  wink


Nothing happens by chance

Offline

#3341 2020-04-04 10:33:17

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Good morning,
here is the conky version 1.10

conky.config = {
-- Create own window instead of using desktop (required in nautilus)
	own_window = true,
	own_window_type = 'override',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	own_window_class = 'Conky',
	own_window_argb_visual = true,
        own_window_argb_count = 100,
        own_window_colour = '000000',
	
-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,

-- fiddle with window
	use_spacer = 'none',
	use_xft = true,
	show_graph_scale = false,
        show_graph_range = false,
	short_units = true,

-- Update interval in seconds
	update_interval = 1,
	background = true,

-- Minimum size of text area
	minimum_width = 0, minimum_height = 0,
	maximum_width = 1080,

	override_utf8_locale = true,

-- Draw shades?
	draw_shades = false,

-- Text stuff
	draw_outline = false, -- amplifies text if yes
	draw_borders = false,
	draw_graph_borders = false,
--font freesans -12
	font = 'monofur:bold:size=10',
	uppercase = false,-- set to yes if you want all text to be in uppercase
	xftalpha= .1,

-- Stippled borders?
	stippled_borders = 0,

-- border margins
	border_inner_margin = 0,

-- border width
	border_width = 0,

-- Default colors and also border colors, grey90 == #e5e5e5
	default_color = '#cbcbcb',
	color1 = '#ffe595',
	color5 = '#FFDEAD',
        color6 = '#00BFFF',

-- Text alignment, other possible values are commented
	alignment = 'top_left',
--alignment top_right
--alignment bottom_left
--alignment bottom_right

-- Gap between borders of screen and text
	gap_x = 0,
	gap_y = 0,

	imlib_cache_size = 0,
        lua_load = '/home/fvirgola80/.config/conky/LUA/graph.lua',
        lua_draw_hook_pre = 'main_graph',
-- stuff after 'TEXT' will be formatted on screen

};

conky.text = [[
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,10 -s 207x1}
${goto 8}${color5}${time %T}${color} ${color6}←${color} ${nodename} ${color6}→${color} ${kernel} ${color6}←${color}
${goto 8}${color5}${time %b %Y} Week ${time %V}${color} UPTIME ${color6}→→→→${color} ${uptime} ${color6}←${color}
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,52 -s 207x1}
${alignc}${if_match ${time %w}==0}${color5}do${color6} lu ma me gi ve sa${else}\
${if_match ${time %w}==1}${color6}do ${color5}lu${color6} ma me gi ve sa${else}\
${if_match ${time %w}==2}${color6}do lu ${color5}ma${color6} me gi ve sa${else}\
${if_match ${time %w}==3}${color6}do lu ma ${color5}me${color6} gi ve sa${else}\
${if_match ${time %w}==4}${color6}do lu ma me ${color5}gi${color6} ve sa${else}\
${if_match ${time %w}==5}${color6}do lu ma me gi ${color5}ve${color6} sa${else}\
${color6}do lu ma me gi ve ${color5}sa${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}${color6}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color6}/' | sed ':a;N;$!ba;s/\n/\n${alignc}/g'}${color}
${image $HOME/images/white_1.png -p 5,156 -s 285x1}
${image $HOME/images/grid2.png -p 5,165 -s 285x80}




${goto 8}${color6}C1: ${freq_g 1} G ${cpu cpu1}%${color}
${goto 190}${voffset -15}${color5}C2: ${freq_g 2} G ${cpu cpu2}%${color}
${goto 8}${voffset 4}${color5}C3: ${freq_g 3} G ${cpu cpu3}%${color}
${goto 190}${voffset -14}${color6}C4: ${freq_g 4} G ${cpu cpu4}%${color}
${goto 135}${voffset -20}${color4}${execi 2 sensors | grep 'Core 0' | sed -e 's/.*  +//' | sed -e 's/.0°C.*//'}ºC${color}
${image $HOME/images/white_1.png -p 5,271 -s 285x1}
${goto 8}RAM $mem / $memmax ${memgraph 12,132 F57900 FCAF3E}${memperc}%
${goto 8}${voffset 4}${color6}HDD ${acpitemp}°C I/O ${diskio}${color}${diskiograph /dev/sda 12,145 F57900 FCAF3E}
${goto 8}${voffset 4}/root  ${fs_used /} / ${fs_size /}${diskiograph_read /dev/sda 12,60 B0E0E6 00BFFF} ${goto 210}←← read ${fs_used_perc /}%
${goto 8}${voffset 4}${color6}/home  ${fs_used /home} / ${fs_size /home}${diskiograph_write /dev/sda 12,60 ce2029 3dba19}${color} ${goto 210}← write ${fs_free_perc /}%
${goto 8}${voffset 4}${color5}SWAP ${swap}/${swapmax} ${swapperc}%${color} ${color6}→→→→→→→→→→${color} ${goto 200}${color5}FAN${color}\
${execi 1 sensors | grep 'fan1' | cut -c13-18 | sed '/^$/d'}${color6}Rpm${color}
${image $HOME/images/white_1.png -p 5,365-s 285x1}
${image $HOME/images/grid2.png -p 5,374 -s 285x80}




${goto 8}LAN: ${addr eth1}${downspeedgraph eth1 12,75 000000 7f8ed3} ${upspeedgraph eth1 12,75 000000 ffcc00}
${goto 8}${voffset 4}${color6}↓↓${color6}DN↓↓${color5}${goto 244}↑↑UP${color5}↑↑${color}
${goto 8}${voffset 4}${color5}${upspeed eth1}${goto 125}${color4}← per/s →${goto 248}${color6}${downspeed eth1}${color}
${goto 8}${voffset 4}${color6}${totalup eth1}${goto 125}${color4}← total →${goto 248}${color5}${totaldown eth1}${color}
${goto 8}${voffset 4}${color5}GW: ${gw_ip}${goto 166}${color6}IPP: ${execi 100 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color}
${image $HOME/images/white_1.png -p 5,535-s 285x1}
${texeci 300 bash $HOME/Accuweather_conky_script/accuweather -f2016 -h2016}
${goto 85}${voffset -20}${color6}Pressure${goto 200}HUM${goto 265}CLD${color}
${goto 85}${voffset 2}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 200}${texeci 300 sed -n '7p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 265}${texeci 300 sed -n '10p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_0.png -p 2,545 -s 80x80}
${goto 85}${voffset -10}${color6}Rain ${texeci 300 sed -n '24p' $HOME/Accuweather_conky_script/hourly} \
${texeci 300 sed -n '7p' $HOME/Accuweather_conky_script/hourly}${goto 200}UVI${goto 265}VIS${color}
${goto 85}${voffset 5}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $1}'}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $2}'}\
${goto 200}${texeci 300 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | cut -c-5}\
${goto 250}${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/wind_0.png -p 163,590 -s 25x25}
${goto 85}${voffset -10}${color6}W.G. ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/hourly} Km/h ${goto 200}REF${goto 265}TMP${color}
${goto 8}${voffset 5}${color5}DP ${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 85}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond|cut -c1-20}\
${goto 200}±${texeci 300 sed -n '3p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 265}${texeci 300 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°${color}
${goto 8}${voffset 5}${color6}CELLING${goto 75}Sun ↑${texeci 300 sed -n '23p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '24p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '16p' $HOME/Accuweather_conky_script/curr_cond}${color}
${goto 8}${voffset 5}${color5}${texeci 300 sed -n '32p' $HOME/Accuweather_conky_script/hourly}${goto 70}Moon ↑${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/images/white_1.png -p 5,688-s 285x1}
${goto 15}${color5}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 110}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 200}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_1.png -p 15,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_2.png -p 110,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_3.png -p 200,713 -s 65x65}
${goto 80}${color6}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}°${color}


${goto 80}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 8}${color6}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 600 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color6}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${image $HOME/images/white_1.png -p 5,830-s 285x1}
${goto 8}${color5}${texeci 300 sed -n '22p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 80}${texeci 300 sed -n '29p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 155}${texeci 300 sed -n '36p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 220}${texeci 300 sed -n '43p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}
${goto 55}${color6}${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '32p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 300 sed -n '39p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '46p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 55}${color5}${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '33p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 600 sed -n '40p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 600 sed -n '47p' $HOME/Accuweather_conky_script/daily_forecast}°${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_4.png -p 10,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_5.png -p 80,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_6.png -p 155,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_7.png -p 220,850 -s 45x45}
${image $HOME/images/white_1.png -p 5,905-s 285x1}
${texeci 300 bash $HOME/Moongiant_conky_script/moongiant}
${image $HOME/Moongiant_conky_script/0.png -p 5,913 -s 60x60}
${goto 80}${voffset -40}${color6}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2" "$6}'`}\
${goto 195}M.A. ${execpi 300 sed -n '5p' $HOME/Moongiant_conky_script/raw}${color}${color}
${goto 105}${color5}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 195}M.AG. ${execpi 300 sed -n '6p' $HOME/Moongiant_conky_script/raw}${color}
${goto 100}${color6}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 195}M.D. ${execpi 300 sed -n '4p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${goto 90}${color5}VISIBILITY\
${goto 195}S.A. ${execpi 300 sed -n '2p' $HOME/Moongiant_conky_script/raw}${color}
${goto 120}${color6}${execpi 300 sed -n '1p' $HOME/Moongiant_conky_script/raw}\
${goto 195}S.D. ${execpi 300 sed -n '3p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${image $HOME/images/white_1.png -p 190,910-s 1x67}
${image $HOME/images/white_1.png -p 5,980-s 285x1}
${voffset -27}${goto 15}${color5}${execi 3600 echo `date --date="-2 day" | awk '{print $3" "$2}'`}\
${goto 80}${execi 3600 echo `date --date="-1 day" | awk '{print $3" "$2}'`}\
${goto 155}${execi 3600 echo `date --date="+1 day" | awk '{print $3" "$2}'`}\
${goto 220}${execi 3600 echo `date --date="+2 day" | awk '{print $3" "$2}'`}${color}
${image $HOME/Moongiant_conky_script/-2.png -p 10,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/-1.png -p 80,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/1.png -p 154,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/2.png -p 218,997 -s 45x45}
${voffset 30}${font monofur:bold:size=9}${goto 24}${color6}${execpi 300 sed -n '13p' $HOME/Moongiant_conky_script/raw}\
${goto 93}${execpi 300 sed -n '21p' $HOME/Moongiant_conky_script/raw}\
${goto 167}${execpi 300 sed -n '29p' $HOME/Moongiant_conky_script/raw}\
${goto 233}${execpi 300 sed -n '37p' $HOME/Moongiant_conky_script/raw}${font}${color}
${voffset -5}${goto 8}${color5}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 79}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 150}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 220}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}${color}
${goto 5}${color6}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 75}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 145}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 215}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}${color}


]];


I'm not sure if it works well if someone please check that everything is ok, because sometimes I flash on the video and I couldn't understand why

wink  wink


Nothing happens by chance

Offline

#3342 2020-04-05 11:16:07

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Have a good day everyone wink  big_smile

Last edited by fvirgola80 (2020-04-05 11:35:55)


Nothing happens by chance

Offline

#3343 2020-04-05 19:59:05

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

I tried running it but it is kinda messy because of my dpi settings and I don't think lua works (my conky is not compiled with lua I think)
mKtm8GYt.jpg


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3344 2020-04-06 01:19:00

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,128

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:

I tried running it but it is kinda messy because of my dpi settings and I don't think lua works (my conky is not compiled with lua I think)
https://i.imgur.com/mKtm8GYt.jpg

Terminal; do a:

conky -v

That will tell you (bottom of list):

 05 Apr 20 @ 22:18:10 ~
   $ conky -v
Conky 1.9.0 compiled Sun Jun 11 16:40:54 UTC 2017 for Linux 4.4.62-18.6-default (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3345 2020-04-06 21:45:21

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Yep, as I already knew.

[[Time:00:41 Location:~/Desktop]]
$ conky -v
conky 1.11.5_pre compiled Thu 29 Aug 2019 10:15:57 PM UTC for Linux 4.19.67-1-lts x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * CMUS
  * MPD
  * MOC

 Default values:
  * Netdevice: eno1
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 256
  * Maximum text size: 16384
  * Size text buffer: 256

Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3346 2020-04-07 12:07:54

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

I have revised the conky and this should be the definitive one.
I solved the problem of flashing a screen for my error on the vove "minuium_widht" was set to "0" instead of the real value of the width of the conky ....

yikes  yikes

conky.config = {
own_window = true,
own_window_type = 'override',
own_window_transparent = true, --false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
--  own_window_colour = '#000000',
    own_window_class = 'Conky',
--  own_window_title = 'fvirgola80 WUweather',
    own_window_argb_visual = true,
    own_window_argb_value = 120,

minimum_width = 290, minimum_height = 00,  -- w|h
maximum_width = 1080,

gap_x = 0, -- l|r
gap_y = 0,  -- u|d

alignment = 'top_left', --right',

use_xft = true,
font = 'monofur:bold:size=10',
xftalpha = 1,
override_utf8_locale = true,

draw_shades = true,
default_shade_color = '000000',
draw_outline = false,
default_outline_color = '000000',
short_units = true,
draw_graph_borders = false,

default_color = '#cbcbcb',
	default_outline_color = '000000',
	color1 = '#ffe595',
	color5 = '#FFDEAD',
        color6 = '#00BFFF',

border_inner_margin = 0,
border_outer_margin = 0,

background = true,
use_spacer = 'none',
no_buffers = true,
imlib_cache_size = 0,
double_buffer = true,

update_interval = 1, --0.5

lua_load = '~/.config/conky/LUA/graph.lua', 
lua_draw_hook_pre = 'main_graph', 


};

conky.text = [[
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,10 -s 207x1}
${goto 8}${color5}${time %T}${color} ${color6}←${color} ${nodename} ${color6}→${color} ${kernel} ${color6}←${color}
${goto 8}${color5}${time %b %Y} Week ${time %V}${color} UPTIME ${color6}→→→→${color} ${uptime} ${color6}←${color}
${goto 8}${color6}↓↓↓↓↓${color}${goto 255}${color6}↓↓↓↓↓${color}${image $HOME/images/white_1.png -p 45,52 -s 207x1}
${alignc}${if_match ${time %w}==0}${color5}do${color6} lu ma me gi ve sa${else}\
${if_match ${time %w}==1}${color6}do ${color5}lu${color6} ma me gi ve sa${else}\
${if_match ${time %w}==2}${color6}do lu ${color5}ma${color6} me gi ve sa${else}\
${if_match ${time %w}==3}${color6}do lu ma ${color5}me${color6} gi ve sa${else}\
${if_match ${time %w}==4}${color6}do lu ma me ${color5}gi${color6} ve sa${else}\
${if_match ${time %w}==5}${color6}do lu ma me gi ${color5}ve${color6} sa${else}\
${color6}do lu ma me gi ve ${color5}sa${color}\
${endif}${endif}${endif}${endif}${endif}${endif}
${alignc}${color6}${execpi 1800 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color6}/' | sed ':a;N;$!ba;s/\n/\n${alignc}/g'}${color}
${image $HOME/images/white_1.png -p 5,156 -s 285x1}
${image $HOME/images/grid2.png -p 5,165 -s 285x80}




${goto 8}${color6}C1: ${freq_g 1} G ${cpu cpu1}%${color}
${goto 190}${voffset -15}${color5}C2: ${freq_g 2} G ${cpu cpu2}%${color}
${goto 8}${voffset 4}${color5}C3: ${freq_g 3} G ${cpu cpu3}%${color}
${goto 190}${voffset -14}${color6}C4: ${freq_g 4} G ${cpu cpu4}%${color}
${goto 135}${voffset -20}${color4}${execi 2 sensors | grep 'Core 0' | sed -e 's/.*  +//' | sed -e 's/.0°C.*//'}ºC${color}
${image $HOME/images/white_1.png -p 5,271 -s 285x1}
${goto 8}RAM $mem / $memmax ${memgraph 12,132 F57900 FCAF3E}${memperc}%
${goto 8}${voffset 4}${color6}HDD ${acpitemp}°C I/O ${diskio}${color}${diskiograph /dev/sda 12,145 F57900 FCAF3E}
${goto 8}${voffset 4}/root  ${fs_used /} / ${fs_size /}${diskiograph_read /dev/sda 12,60 B0E0E6 00BFFF} ${goto 210}←← read ${fs_used_perc /}%
${goto 8}${voffset 4}${color6}/home  ${fs_used /home} / ${fs_size /home}${diskiograph_write /dev/sda 12,60 ce2029 3dba19}${color} ${goto 210}← write ${fs_free_perc /}%
${goto 8}${voffset 4}${color5}SWAP ${swap}/${swapmax} ${swapperc}%${color} ${color6}→→→→→→→→→→${color} ${goto 200}${color5}FAN${color}\
${execi 1 sensors | grep 'fan1' | cut -c13-18 | sed '/^$/d'}${color6}Rpm${color}
${image $HOME/images/white_1.png -p 5,365-s 285x1}
${image $HOME/images/grid2.png -p 5,374 -s 285x80}




${goto 8}LAN: ${addr eth1}${downspeedgraph eth1 12,75 000000 7f8ed3} ${upspeedgraph eth1 12,75 000000 ffcc00}
${goto 8}${voffset 4}${color6}↓↓${color6}DN↓↓${color5}${goto 244}↑↑UP${color5}↑↑${color}
${goto 8}${voffset 4}${color5}${upspeed eth1}${goto 125}${color4}← per/s →${goto 248}${color6}${downspeed eth1}${color}
${goto 8}${voffset 4}${color6}${totalup eth1}${goto 125}${color4}← total →${goto 248}${color5}${totaldown eth1}${color}
${goto 8}${voffset 4}${color5}GW: ${gw_ip}${goto 166}${color6}IPP: ${execi 100 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color}
${image $HOME/images/white_1.png -p 5,535-s 285x1}
${texeci 300 bash $HOME/Accuweather_conky_script/accuweather -f2016 -h2016}
${goto 85}${voffset -20}${color6}Pressure${goto 200}HUM${goto 265}CLD${color}
${goto 85}${voffset 2}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 200}${texeci 300 sed -n '7p' $HOME/Accuweather_conky_script/curr_cond}\
${goto 265}${texeci 300 sed -n '10p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_0.png -p 2,545 -s 80x80}
${goto 85}${voffset -10}${color6}Rain ${texeci 300 sed -n '24p' $HOME/Accuweather_conky_script/hourly} \
${texeci 300 sed -n '7p' $HOME/Accuweather_conky_script/hourly}${goto 200}UVI${goto 265}VIS${color}
${goto 85}${voffset 5}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $1}'}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $2}'}\
${goto 200}${texeci 300 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | cut -c-5}\
${goto 250}${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/Accuweather_conky_script/forecast_2016/wind_0.png -p 163,590 -s 25x25}
${goto 85}${voffset -10}${color6}W.G. ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/hourly} Km/h ${goto 200}REF${goto 265}TMP${color}
${goto 8}${voffset 5}${color5}DP ${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 85}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond|cut -c1-20}\
${goto 200}±${texeci 300 sed -n '3p' $HOME/Accuweather_conky_script/curr_cond}°\
${goto 265}${texeci 300 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°${color}
${goto 8}${voffset 5}${color6}CELLING${goto 75}Sun ↑${texeci 300 sed -n '23p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '24p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '16p' $HOME/Accuweather_conky_script/curr_cond}${color}
${goto 8}${voffset 5}${color5}${texeci 300 sed -n '32p' $HOME/Accuweather_conky_script/hourly}${goto 70}Moon ↑${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/curr_cond} ↓\
${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/curr_cond} ${goto 208}Durat ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/curr_cond}${color}
${image $HOME/images/white_1.png -p 5,688-s 285x1}
${goto 15}${color5}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 110}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 200}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_1.png -p 15,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_2.png -p 110,713 -s 65x65}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_3.png -p 200,713 -s 65x65}
${goto 80}${color6}${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}°${color}


${goto 80}${color5}${texeci 300 sed -n '5p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 175}${texeci 300 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 8}${color6}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 600 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '6p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color5}${texeci 300 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${goto 8}${color6}${texeci 300 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c1-17}\
 ${texeci 300 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast|cut -c18-34}${color}
${image $HOME/images/white_1.png -p 5,830-s 285x1}
${goto 8}${color5}${texeci 300 sed -n '22p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 80}${texeci 300 sed -n '29p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 155}${texeci 300 sed -n '36p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}\
${goto 220}${texeci 300 sed -n '43p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z}${color}
${goto 55}${color6}${texeci 300 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '32p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 300 sed -n '39p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '46p' $HOME/Accuweather_conky_script/daily_forecast}°${color}

${goto 55}${color5}${texeci 300 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 125}${texeci 300 sed -n '33p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 200}${texeci 300 sed -n '40p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 265}${texeci 300 sed -n '47p' $HOME/Accuweather_conky_script/daily_forecast}°${color}
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_4.png -p 10,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_5.png -p 80,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_6.png -p 155,850 -s 45x45}\
${image $HOME/Accuweather_conky_script/forecast_2016/forecast_7.png -p 220,850 -s 45x45}
${image $HOME/images/white_1.png -p 5,905-s 285x1}
${texeci 300 bash $HOME/Moongiant_conky_script/moongiant}
${image $HOME/Moongiant_conky_script/0.png -p 5,913 -s 60x60}
${goto 80}${voffset -40}${color6}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2" "$6}'`}\
${goto 195}M.A. ${execpi 300 sed -n '5p' $HOME/Moongiant_conky_script/raw}${color}${color}
${goto 105}${color5}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 195}M.AG. ${execpi 300 sed -n '6p' $HOME/Moongiant_conky_script/raw}${color}
${goto 100}${color6}${execpi 300 sed -n '7p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 195}M.D. ${execpi 300 sed -n '4p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${goto 90}${color5}VISIBILITY\
${goto 195}S.A. ${execpi 300 sed -n '2p' $HOME/Moongiant_conky_script/raw}${color}
${goto 120}${color6}${execpi 300 sed -n '1p' $HOME/Moongiant_conky_script/raw}\
${goto 195}S.D. ${execpi 300 sed -n '3p' $HOME/Moongiant_conky_script/raw | cut -c-3} ${font monofur:bold:size=9}K/km${font}${color}
${image $HOME/images/white_1.png -p 190,910-s 1x67}
${image $HOME/images/white_1.png -p 5,980-s 285x1}
${voffset -27}${goto 15}${color5}${execi 3600 echo `date --date="-2 day" | awk '{print $3" "$2}'`}\
${goto 80}${execi 3600 echo `date --date="-1 day" | awk '{print $3" "$2}'`}\
${goto 155}${execi 3600 echo `date --date="+1 day" | awk '{print $3" "$2}'`}\
${goto 220}${execi 3600 echo `date --date="+2 day" | awk '{print $3" "$2}'`}${color}
${image $HOME/Moongiant_conky_script/-2.png -p 10,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/-1.png -p 80,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/1.png -p 154,997 -s 45x45}\
${image $HOME/Moongiant_conky_script/2.png -p 218,997 -s 45x45}
${voffset 30}${font monofur:bold:size=9}${goto 24}${color6}${execpi 300 sed -n '13p' $HOME/Moongiant_conky_script/raw}\
${goto 93}${execpi 300 sed -n '21p' $HOME/Moongiant_conky_script/raw}\
${goto 167}${execpi 300 sed -n '29p' $HOME/Moongiant_conky_script/raw}\
${goto 233}${execpi 300 sed -n '37p' $HOME/Moongiant_conky_script/raw}${font}${color}
${voffset -5}${goto 8}${color5}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 79}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 150}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}\
${goto 220}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'}${color}
${goto 5}${color6}${execpi 300 sed -n '19p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 75}${execpi 300 sed -n '27p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 145}${execpi 300 sed -n '35p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}\
${goto 215}${execpi 300 sed -n '43p' $HOME/Moongiant_conky_script/raw | awk '{print $2}'}${color}
]];

wink  wink

Last edited by fvirgola80 (2020-04-07 12:36:32)


Nothing happens by chance

Offline

#3347 2020-04-07 14:56:23

unklar
Member
Registered: 2015-10-31
Posts: 1,135

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:

Yep, as I already knew.

Teo, you need the package conky-cairo from AUR.   wink

conky -v
conky 1.11.3_pre compiled Mi 27. Mär 20:43:00 CET 2019 for Linux 5.0.3-arch1-1-ARCH x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * iconv
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * CMUS
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

Last edited by unklar (2020-04-07 14:57:04)

Offline

#3348 2020-04-07 21:13:44

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,271

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Sorry guys, but I intend to keep my pc lua free.
If anyone else, with a lua ready conky client that is, could try fvirgola80's config and provide some feedback it'd be great.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3349 2020-04-08 17:39:50

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 258

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Good friends,
here I am .... the creation of Accuweather in its 24 hours ....

mega-conkyacweatehr2020.png verticale-aweather2020.png


below the conky code vers. 1.10 for the 24-hour conky

conky.config = {
own_window = true,
own_window_type = 'override',
own_window_transparent = true, --false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
--  own_window_colour = '#000000',
    own_window_class = 'Conky',
--  own_window_title = 'fvirgola80 24 hours Accuweather',
    own_window_argb_visual = true,
    own_window_argb_value = 120,

minimum_width = 200, minimum_height = 00,  -- w|h
maximum_width = 1080,

gap_x = 0, -- l|r
gap_y = 0,  -- u|d

alignment = 'top_right', --left',

use_xft = true,
font = 'monofur:bold:size=10',
xftalpha = 1,
override_utf8_locale = true,

draw_shades = true,
default_shade_color = '000000',
draw_outline = false,
default_outline_color = '000000',

        default_color = '#cbcbcb',
        color5 = '#FFDEAD',
        color6 = '#00BFFF',

border_inner_margin = 0,
border_outer_margin = 0,

background = true,
use_spacer = 'none',
no_buffers = true,
imlib_cache_size = 0,
double_buffer = true,

update_interval = 1, --0.5


};

conky.text = [[
${texeci 300 bash $HOME/Accuweather_conky_script/accuweather -h2016}
${alignc}${color5}Next 24 hours${color}
${image $HOME/images/red_1.png -p 100,30 -s 2x870}
${goto 35}${color6}${texeci 300 sed -n '1p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '4p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '33p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '36p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_1.png -p 40,58 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_2.png -p 110,58 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '65p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '68p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '97p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '100p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_3.png -p 40,130 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_4.png -p 110,130 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '129p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '132p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '161p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '164p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_5.png -p 40,202 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_6.png -p 110,202 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '193p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '196p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '225p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '228p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_7.png -p 40,273 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_8.png -p 110,273 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '257p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '260p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '289p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '292p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_9.png -p 40,345 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_10.png -p 110,345 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '321p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '324p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '353p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '356p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_11.png -p 40,417 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_12.png -p 110,417 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '385p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '388p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '417p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '420p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_13.png -p 40,489 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_14.png -p 110,489 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '449p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '452p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '481p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '484p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_15.png -p 40,562 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_16.png -p 110,562 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '513p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '516p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '545p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '548p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_17.png -p 40,634 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_18.png -p 110,634 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '577p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '580p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '609p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '612p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_19.png -p 40,705 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_20.png -p 110,705 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '641p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '644p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '673p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '676p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_21.png -p 40,777 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_22.png -p 110,777 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${color6}${goto 35}${texeci 300 sed -n '705p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '708p' $HOME/Accuweather_conky_script/hourly}°\
${goto 110}${texeci 300 sed -n '737p' $HOME/Accuweather_conky_script/hourly} ${texeci 300 sed -n '740p' $HOME/Accuweather_conky_script/hourly}°${color}
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_23.png -p 40,849 -s 50x50}\
${image $HOME/Accuweather_conky_script/hourly_2016/hourly_24.png -p 110,849 -s 50x50}
${voffset 35}${membar 0}
${voffset -5}${alignc}${color6}${cpu cpu1} | ${cpu cpu2} | ${cpu cpu3} | ${cpu cpu4}${color}
${texeci 300 bash $HOME/Weather_com_conky_script/weather_com}
${color5}${voffset -10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s25}${color6}
${membar 0}
${color6}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}
${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s25}${color}
]];


I inserted the weather.com script at the end with the descriptive predictions .....
good conky to all of you friends ...



wink  wink  wink

Last edited by fvirgola80 (2020-04-08 17:47:14)


Nothing happens by chance

Offline

#3350 2020-04-09 12:57:35

unklar
Member
Registered: 2015-10-31
Posts: 1,135

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

No sooner has "someone" here pronounced the name of the weather service wink and published configurations than there are errors.
This has been going on all day today. Again and again (content of the curr_cond_raw)

<HTML><HEAD>
<TITLE>Gateway Timeout - In read </TITLE>
</HEAD><BODY>
<H1>Gateway Timeout</H1>
The proxy server did not receive a timely response from the upstream server.<P>
Reference&#32;&#35;1&#46;16b51002&#46;1586436088&#46;238272d7
</BODY></HTML>

Teo, I can't help it...   lol  tongue  big_smile

Offline

Board footer

Powered by FluxBB