You are not logged in.

#2401 2019-04-04 14:51:53

loutch
Member
Registered: 2015-12-12
Posts: 346

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

here page 95 post 2363

conky , script.sh & link to images pack

https://forums.bunsenlabs.org/viewtopic … 685#p84685

Last edited by loutch (2019-04-04 14:52:44)


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2402 2019-04-06 16:25:54

chepioq
Member
Registered: 2015-11-29
Posts: 69

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

Thank loutch, but I can see in your conky:
......................
lua_load = '~/.conky/lua/image.lua',
..........................
..........................
${lua fDrawImage ~/.conky/barographe/base.png 66 18 228 97}
${lua fDrawImage ~/.conky/barographe/white.png 74 114 214 12}

what is the script "image.lua"

Offline

#2403 2019-04-06 18:50:42

unklar
Member
Registered: 2015-10-31
Posts: 914

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

smile   image.lua   smile

--créer par Didier-T
 
require 'cairo'
home = os.getenv ('HOME')

--Fonction d'affichage
function conky_fDrawImage(path,x,y,w,h,arc)

   path = string.gsub(path, "~", home)
   path = string.gsub(path, "$HOME", home)

   local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
   
   local function fDrawImage(path,x,y,w,h,arc)
      x=x+(w/2)
      y=y+(h/2)
      local img =  cairo_image_surface_create_from_png(path)
      local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img)

      local cr = cairo_create (cs)
      cairo_translate (cr, x, y)

      if arc then
         cairo_rotate (cr, arc)
      end

      cairo_scale (cr, w/w_img, h/h_img)
      cairo_set_source_surface (cr, img, -w_img/2, -h_img/2)
      cairo_paint (cr)
      cairo_destroy(cr)
      cairo_surface_destroy (img)
   end
   fDrawImage(path,x,y,w,h,arc)
   cairo_surface_destroy(cs)
   return ""
end 

Offline

#2404 2019-04-07 11:02:30

chepioq
Member
Registered: 2015-11-29
Posts: 69

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

Thank unklar, now all work fine.

Offline

#2405 2019-05-14 17:59:27

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

S11_accu_tm_BAR_2016-full.conky & S11_accu_UVI.conky
2019-05-14_S11.th.jpg

Finally diecided to get the {cough cough}new {cough} accuweather script with lynx, such a cat, and ran into an OOPS! right off the bat!

Top and bottom of the script:

weather_conky_launch_command="conky -b"
{snip}
pkill -CONT -xf "$weather_conky_launch_command"

Teo Teo Teo, it's me ... when do I ever run just ONE conky?  HUH! HUH!
And that includes your 1_accu scripts as well  big_smile  Scheeeeech...

So I made a new conky

weather_conky_launch_command="conky -c /media/5/Conky/1_accuweather/TEO-accu-data_2019.conky"
{snip}
pkill -CONT -xf "$weather_conky_launch_command"

... see it below.

Also I had to change /$HOME/1_accuweather as well .. but Teo throws a beautiful curve ball at Sector11, he swings ...

STIIIIIIIIIRKE! 1

So I go looking ... 867 lines later...

Line 867:
			sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
Line 870:
			sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2016

Said to myself what would Teo do....

Line 867:			
			sed -i "4s/$/\${image \/media\/5\/Conky\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2015
		fi
		if [[ $hourly2016 == 1 ]]; then

Line 870:
			sed -i "4s/$/\${image \/media\/5\/Conky\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2016

Seems to be working.  Did I do that right Teo?

NOW snippits of the NEW conky to satisfy the new script - done for conky v1.9 though.

/media/5/Conky/1_accuweather/TEO-accu-data_2019.conky

{snip}

minimum_size 1 1
maximum_width 1
gap_x 0	## l|r
gap_y 0	## u|d
alignment bl
update_interval 1
{snip}

TEXT
${texeci 900 bash /media/5/Conky/1_accuweather/1_accuweather -f2015 -f2016 -h2015 -h2016}

shows nothing on the screen ... BUT the other conkys use the "data"

Now a funny thing happened when running the script, I keep seeing this error:

 14 May 19 @ 13:44:29 ~
   $ conky -c /media/5/Conky/1_accuweather/TEO-accu-data_2019.conky &
[1] 25803
 
 14 May 19 @ 13:44:33 ~
   $ Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
Conky: '/media/5/Conky/1_accuweather/TEO-accu-data_2019.conky' modified, reloading...
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
Conky: '/media/5/Conky/1_accuweather/TEO-accu-data_2019.conky' modified, reloading...
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer

? ?

Last edited by Sector11 (2019-05-15 11:57:11)


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2406 2019-05-14 19:07:45

unklar
Member
Registered: 2015-10-31
Posts: 914

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

Hello, my friend, (I would like to be Teo)  big_smile

maybe you still have a "predecessor script" working. Because with me the lines for "uv" 863 - 871 look like this:

	if [[ $h_uv == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/1_accuweather/altogether16
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2016
		fi
	fi

Offline

#2407 2019-05-14 20:28:44

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 968

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

Sector11 wrote:

Seems to be working.  Did I do that right Teo?

Yep, it goes without saying, replace all paths with your paths for the script to function properly.

Sector11 wrote:

Now a funny thing happened when running the script, I keep seeing this error:

If you mean the messages for the altogether files pay no attention to it.
Line 584 of the script

	rm $HOME/1_accuweather/{altogether16,altogether16_2015,altogether16_2016}

Tries to delete altogether16, altogether16_2015 and the altogether16_2016 files, whether they exist or not, so an error message is inevitable if any of them is not present.

On an unrelated note, nice to see you again in the thread, we've missed you old bean!


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

#2408 2019-05-15 10:04:36

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 968

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

It was late 2008/early 2009 and not many conky weather scripts were out there, the most popular one being the one kaivalagi had created which used weather.com.
Weather.com didn't have a forecast for my hometown, so I created a script of my own using Accuweather's RSS service.
It was tiny and absolutely minimal, but it worked fine and I was happy with it, so I posted it in the Ubuntuforums.

Here's a screenshot of the thread's first page from 2011 (as far back as wayback machine would go):
MevCWYYt.jpg
You can see that the Wunderground ICAL script (RIP) had been added, as well as the NWS XML one (also RIP).


The date that thread was created was May, 11th 2009.

Since then the scripts have been moved to different sites, have increased in number and complexity and have been updated dozens of times.
Some of them have been deprecated while new ones took their place, new features have been added while others have been abandoned.
None of the above would have been achieved without your support all these years...


Happy 10 year anniversary to the Conky Weather Scripts, to 10 more years predicting the weather through Conky!!!


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

#2409 2019-05-15 12:13:31

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

unklar wrote:

Hello, my friend, (I would like to be Teo)  big_smile

maybe you still have a "predecessor script" working. Because with me the lines for "uv" 863 - 871 look like this:

	if [[ $h_uv == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/1_accuweather/altogether16
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2016
		fi
	fi

Hi unklar ...

Those are lines 949-957 in my /media/5/Conky/1_accuweather/1_accuweather script, that I had just downloaded.

Maybe yours is old?  Now I KNOW I'm old but my scripts are the latest:
1) Accuweather - 1_2019-3-17

Last edited by Sector11 (2019-05-15 12:46:33)


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2410 2019-05-15 12:16:19

unklar
Member
Registered: 2015-10-31
Posts: 914

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

Hey, Teo,

in May 2009 I still shit in the Linux diaper  devil
Only in September 2009 I changed with skin and hair to Linux.

It is enormous what you have created over the years. Your weather scripts belong to the basic equipment of my desktops. They do an excellent job. Thank you very much for that! 

It is an honor to know you! Congratulations! hi.gif

Offline

#2411 2019-05-15 12:26:51

unklar
Member
Registered: 2015-10-31
Posts: 914

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

Sector11 wrote:

Maybe your is old?  Now I KNOW I'm old but my scripts id the latest:


No doubt about it!  wink
https://forums.bunsenlabs.org/viewtopic … 035#p39035

I'm glad you're back.   angel

Offline

#2412 2019-05-15 12:44:24

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

TeoBigusGeekus wrote:

It was late 2008/early 2009 ... {snip}
Happy 10 year anniversary to the Conky Weather Scripts, to 10 more years predicting the weather through Conky!!!

I was a great fan of kaivalagi's python scripts, beta testing them all, except the Google ones, I don't do Google, and I still use a few of them, but of course not the weather. It took me a while to find Teo's scripts. 

I followed Teo from Ubu to ARCH and I'm proud to say invited him to #! and Bunsen.  We became good friends over the years.

So, if I may, on behalf of all that use any of "Teo Scripts" ...

Teo, we would not be here if YOU were not here.  You have satisfied our desire to bend, fold and mutilate weather conkys from the minimal to the monsters I and a few other had fun creating.  Some I created just because I could and I must say because they are so easy to manipulate.

I tip my hat to you TeoBigusGeekus.  Thank you for your dedication and fast responses.  Most times the pixels hadn't even lost the sheen of newness on the screen and you've replied or posted a fix to problems.

Now on a more personal note, and if I may be so bold, I have seen Teo's boot next to a bear's paw print, he really is Teo, the BIGUS Geekus!  big_smile

Here's to 10 more years! ... to start with.

-------------------------
and don't you go spoiling it by telling them it was a baby bear either.   ops


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2413 2019-05-15 12:48:07

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

unklar wrote:
Sector11 wrote:

Maybe your is old?  Now I KNOW I'm old but my scripts id the latest:


No doubt about it!  wink
https://forums.bunsenlabs.org/viewtopic … 035#p39035

I'm glad you're back.   angel

Feels good but will be going slower than before ... things have settled.

Like I told Teo, I may not post as often, but I still read everything.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2414 2019-05-15 20:42:15

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 968

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

unklar wrote:

It is an honor to know you! Congratulations!

Sector11 wrote:

I tip my hat to you TeoBigusGeekus.  Thank you for your dedication and fast responses.  Most times the pixels hadn't even lost the sheen of newness on the screen and you've replied or posted a fix to problems.

The pleasure has been all mine gentlemen; it's been a privilege knowing you.
Your support has been essential to me, thanks again...

EDIT @ S11: I am very lucky to be still alive with that bear and its mother wink
It sounds funny now but it wasn't back then...

Last edited by TeoBigusGeekus (2019-06-29 16:02:11)


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

#2415 2019-05-17 04:09:07

ohnonot
...again
Registered: 2015-09-29
Posts: 3,907
Website

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

Sector11 wrote:

Top and bottom of the script:

weather_conky_launch_command="conky -b"
{snip}
pkill -CONT -xf "$weather_conky_launch_command"

Teo Teo Teo, it's me ... when do I ever run just ONE conky?  HUH! HUH!
And that includes your 1_accu scripts as well  big_smile  Scheeeeech...

I'm going to have to chime in with the well-meant critique here.

I haven't needed to use this sort of hack for years now, and frankly I'm a little surprised you're still using it, TBG!
Are you running the script as a separate daemon that creates separate files, then adding hundreds of sed commands to the conky itself?
I find it much more efficient when the script itself generates conky output; my conky just contains this:

${execpi 777 scripts/itl.sh $CONFIG}${catp ./data/conkyoutput}

no need to start/stop the conky process, haven't ever seen incomplete output with this.

With all that said, consistency in development and community support is just as important as the code itself, and TBG has been great in that, so here's to another 10 years!
Happy Anniversary, Bigus Conky-Geekus!

Online

#2416 2019-05-17 13:59:08

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 968

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

Thanks ohnonot!

As for the conky ready files, I already do this for the hourly weather because otherwise people would need a very fast connection not to have an empty screen.
But doing it for everything else, I don't know, it would take away from the flexibility of the script's output.
This way one can have a data file and do whatever they want with it (ie. use whatever info they want, however they want), otherwise it would be very limiting imo.


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

#2417 2019-05-18 13:55:27

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

TeoBigusGeekus wrote:

EDIT @ S11: I am very lucky to be still alive with that bear and it's mother wink
It sounds funny now but it wasn't back then...

I can not tell a lie ... I two was concerned for my friend when I saw those.  Now just a story for your younger family members when you are old and sitting in a rocking chair ...

Say did Uncle Teo ever tell you about the time there was a bear and her cub ...

G R O A N ! again with the bear story ...

lol lol Yup, sounds funny now.

TeoBigusGeekus wrote:

Thanks ohnonot!

As for the conky ready files, I already do this for the hourly weather because otherwise people would need a very fast connection not to have an empty screen.
But doing it for everything else, I don't know, it would take away from the flexibility of the script's output.
This way one can have a data file and do whatever they want with it (ie. use whatever info they want, however they want), otherwise it would be very limiting imo.

I agree, I prefer the flexability.  Not everyone wants the same conky, same font or maybe even the same screen sizes.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2418 2019-05-18 14:29:27

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

ohnonot wrote:

I find it much more efficient when the script itself generates conky output; my conky just contains this:

${execpi 777 scripts/itl.sh $CONFIG}${catp ./data/conkyoutput}

no need to start/stop the conky process, haven't ever seen incomplete output with this.

You and Teo have given me the and idea.

Take MY conky layout make a file: Conky.TopBar.template

and have at it.... must try ...


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2419 2019-05-19 17:21:02

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 968

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

Sector11 wrote:

I agree, I prefer the flexability.  Not everyone wants the same conky, same font or maybe even the same screen sizes.

+1 wink


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

#2420 2019-05-21 20:45:45

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

And that's exactly why I have a 'few' laying around.   devil  devil


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2421 2019-05-24 13:23:47

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 909
Website

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

Teo is conky-weather legendary. I don't use nowdays conky with weather rather than a simple line bar.
...But, I appreciate a lot his contribution, and I thank him for his time and sharing/updating the codes with the rest of us.

Be blessed!

Congratulations and the same words go for Sector11 aswell, You guys have been inspiration for me in time.

Best Regards!

Last edited by Nili (2019-05-24 13:24:19)


Devuan | Fluxbox
---
Nothing beats peace and quiet - Tomoki Sakurai

Offline

#2422 2019-05-24 13:36:06

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,528

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

Nili - It has been a long time.  I hope you are well.  Always nice to see an old friend here.

Thank you for the kind words.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2423 2019-05-24 15:55:17

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 968

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

Long time no see my old friend, thanks for your kind words.


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

#2424 2019-05-24 20:07:48

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 909
Website

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

Thank you guys smile The usual things on my side, works & family life tasks as usual. Mostly okay.

Awesome for keeping the spirit and conky legacy alive on the forum. I wish you all the best.

Nili


Devuan | Fluxbox
---
Nothing beats peace and quiet - Tomoki Sakurai

Offline

#2425 2019-06-12 09:00:38

ragamatrix
Member
Registered: 2015-10-04
Posts: 406

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

chepioq wrote:

https://image.noelshack.com/minis/2019/14/2/1554220905-conky-meteo.png

Following my post #2339 I find a way to align vertical position with a script lua.

The conky:

conky.config = {
background = false,
use_xft = true,
font = 'DejaVuSansMono:size=8',
update_interval = 300.0,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
stippled_borders = 8,
border_inner_margin = 4,
alignment = 'top_left',
minimum_width = 390,
minimum_height = 900,
gap_x = 130,
gap_y = 30,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 6144,
imlib_cache_size = 8192, 

default_outline_color = '000000',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '005fff',
color4 = 'ff4500',
lua_load = '/home/dominique/conky-meteo-dark_sky/date_position.lua', 
lua_draw_hook_pre = 'date_position',

}

conky.text = [[
${color2}${goto 90}${font DejaVuSansMono:bold:size=10}Prévisions semaine${font}
${image ~/conky-meteo-dark_sky/d1.png -p -1,35 -s 53x32}
${image ~/conky-meteo-dark_sky/d2.png -p -1,105 -s 53x32}
${image ~/conky-meteo-dark_sky/d3.png -p -1,175 -s 53x32}
${image ~/conky-meteo-dark_sky/d4.png -p -1,245 -s 53x32}
${image ~/conky-meteo-dark_sky/d5.png -p -1,315 -s 53x32}
${image ~/conky-meteo-dark_sky/d6.png -p -1,385 -s 53x32}
${image ~/conky-meteo-dark_sky/d7.png -p -1,455 -s 53x32}
${image ~/conky-meteo-dark_sky/d8.png -p -1,525 -s 53x32}
]]

And the script date_position.lua:

--[[Conky et lua pour afficher les heures de lever, coucher et zénith du soleil.
]]

require 'cairo'
require 'imlib2'


function conky_date_position()
    if conky_window == nil then return end

    local text_color={13,206,232}
    
     local text_d= conky_parse("${exec date '+%A %d %B'}")
     local text_d1= conky_parse("${exec date '+%A %d %B' --date '1 days'}")
     local text_d2= conky_parse("${exec date '+%A %d %B' --date '2 days'}")
     local text_d3= conky_parse("${exec date '+%A %d %B' --date '3 days'}")
     local text_d4= conky_parse("${exec date '+%A %d %B' --date '4 days'}")
     local text_d5= conky_parse("${exec date '+%A %d %B' --date '5 days'}")
     local text_d6= conky_parse("${exec date '+%A %d %B' --date '6 days'}")
     local text_d7= conky_parse("${exec date '+%A %d %B' --date '7 days'}")
     
     local text_p0= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p01= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p1= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p11= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p2= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p21= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p3= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p31= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p4= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p41= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p5= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p51= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p6= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p61= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p7= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p71= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     
     local text_th0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")   
     local text_th6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     
     local text_tm0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     
--Police à utiliser
     local font= "DejaVuSansMono-Bold"
     local font_size= 14

    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs)

    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)


    cairo_move_to (cr, 100.0, 60.0)
    cairo_show_text (cr, text_d)

    cairo_move_to (cr, 100.0, 130.0)
    cairo_show_text (cr, text_d1)

    cairo_move_to (cr, 100.0, 200.0)
    cairo_show_text (cr, text_d2)

    cairo_move_to (cr, 100.0, 270.0)
    cairo_show_text (cr, text_d3)

    cairo_move_to (cr, 100.0, 340.0)
    cairo_show_text (cr, text_d4)

    cairo_move_to (cr, 100.0, 410.0)
    cairo_show_text (cr, text_d5)
    
    cairo_move_to (cr, 100.0, 480.0)
    cairo_show_text (cr, text_d6)   
    
    cairo_move_to (cr, 100.0, 550.0)
    cairo_show_text (cr, text_d7)
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs)    
     local font1= "DejaVuSansMono"
     local font1_size= 11
     
    local text_color={233,149,3}
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs)


    cairo_select_font_face (cr, font1, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font1_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
    
    cairo_move_to (cr, 20.0, 80.0)
    cairo_show_text (cr, text_p0)
    cairo_move_to (cr, 20.0, 90.0)
    cairo_show_text (cr, text_p01)
    
    cairo_move_to (cr, 20.0, 150.0)
    cairo_show_text (cr, text_p1)
    cairo_move_to (cr, 20.0, 160.0)
    cairo_show_text (cr, text_p11)
    
    cairo_move_to (cr, 20.0, 220.0)
    cairo_show_text (cr, text_p2)
    cairo_move_to (cr, 20.0, 230.0)
    cairo_show_text (cr, text_p21)
    
    cairo_move_to (cr, 20.0, 290.0)
    cairo_show_text (cr, text_p3)
    cairo_move_to (cr, 20.0, 300.0)
    cairo_show_text (cr, text_p31)
    
    cairo_move_to (cr, 20.0, 360.0)
    cairo_show_text (cr, text_p4) 
        cairo_move_to (cr, 20.0, 370.0)
    cairo_show_text (cr, text_p41)

    cairo_move_to (cr, 20.0, 430.0)
    cairo_show_text (cr, text_p5)
    cairo_move_to (cr, 20.0, 440.0)
    cairo_show_text (cr, text_p51)
    
    cairo_move_to (cr, 20.0, 500.0)
    cairo_show_text (cr, text_p6)
    cairo_move_to (cr, 20.0, 510.0)
    cairo_show_text (cr, text_p61)
    
    cairo_move_to (cr, 20.0, 570.0)
    cairo_show_text (cr, text_p7)
    cairo_move_to (cr, 20.0, 580.0)
    cairo_show_text (cr, text_p71)
    
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs) 
     local font2= "DejaVuSansMono"
     local font2_size= 10

    local text_color={200,6,19}
    cr=cairo_create(cs)
    
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font2_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
        
    cairo_move_to (cr, 40.0, 110.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 110.0)
    cairo_show_text (cr, text_th0)
    
    cairo_move_to (cr, 40.0, 180.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 180.0)
    cairo_show_text (cr, text_th1)
    
    cairo_move_to (cr, 40.0, 250.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 250.0)
    cairo_show_text (cr, text_th2)
    
    cairo_move_to (cr, 40.0, 320.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 320.0)
    cairo_show_text (cr, text_th3)
    
    cairo_move_to (cr, 40.0, 390.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 390.0)
    cairo_show_text (cr, text_th4)    
    
    cairo_move_to (cr, 40.0, 460.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 460.0)
    cairo_show_text (cr, text_th5)
    
    cairo_move_to (cr, 40.0, 530.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 530.0)
    cairo_show_text (cr, text_th6)    
    
    cairo_move_to (cr, 40.0, 600.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 600.0)
    cairo_show_text (cr, text_th7)    
    
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs) 
     local font2= "DejaVuSansMono"
     local font2_size= 10

    local text_color={11,191,200}
    cr=cairo_create(cs)
    
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font2_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
        
    cairo_move_to (cr, 160.0, 110.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 110.0)
    cairo_show_text (cr, text_tm0)
    
    cairo_move_to (cr, 140.0, 180.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 210.0, 180.0)
    cairo_show_text (cr, text_tm1)
    
    cairo_move_to (cr, 160.0, 250.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 250.0)
    cairo_show_text (cr, text_tm2)
    
    cairo_move_to (cr, 160.0, 320.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 320.0)
    cairo_show_text (cr, text_tm3)
    
    cairo_move_to (cr, 160.0, 390.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 390.0)
    cairo_show_text (cr, text_tm4)    
    
    cairo_move_to (cr, 160.0, 460.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 460.0)
    cairo_show_text (cr, text_tm5)
    
    cairo_move_to (cr, 160.0, 530.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 530.0)
    cairo_show_text (cr, text_tm6)    
    
    cairo_move_to (cr, 160.0, 600.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 600.0)
    cairo_show_text (cr, text_tm7)    
    
    cairo_destroy(cr)
end

Hello Chepioq
Thank you for your work.
Does this conky update with the meteo script?
the display is correct but I'm not sure it updates every 300s

merci pour ton travail
est-que ce conky se met à jour avec le script meteo?
l'affichage est correct mais je ne suis pas sur qu'il fasse des mises à jour toutes les 300s

Offline

Board footer

Powered by FluxBB