You are not logged in.

#2326 2019-03-16 08:43:41

bansurveillancecapitalism
New Member
Registered: 2019-03-15
Posts: 2

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

Teo: Thanks for the response and help. The new script is pulling in the CR newline character (which is Windows encoding) into the first_days file during the hours when "Lo" is displayed.

If you open the first_days file in geany during evening, or early morning, you can clearly see it with the line endings visible:

4aMSVKdhvgf4.png

Only "Lo" has the CR in the line ending. This does not happen in any other line in the file. You can manually remove the character, but it reappears as soon as the new script is executed on the next interval, as expected. This doesn't happen on other conkyrc files using the old script and EU locations.

uklar: Thanks for the response and the [override_utf8_locale = true] suggestion, but as I said in the original message the issue is not with "Lo" appearing, which is desired, it is the unwanted character that is getting pulled in by the new script only during the hours when Lo is displayed. The degree character displays correctly.

Offline

#2327 2019-03-16 21:07:06

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

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

I'll investigate ASAP, thanks for the feedback bansurveillancecapitalism.


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

#2328 2019-03-16 23:18:34

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

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

ANNOUNCEMENT

Tiny bug in the last month's update (1_Accuweather script) that caused an unwanted Windows carriage return to appear after the "Lo" temperature value when a US location had been chosen, thus making conky display an unknown character after the aforementioned string. Script rebundled.
For the lazy: Open the script, go to line 391 and replace its ending

.....  -e 's/<\/span>//g' $HOME/1_accuweather/first_days

with

.....  -e 's/<\/span>//g' -e 's/\r//g' $HOME/1_accuweather/first_days

Thanks to bansurveillancecapitalism for his feedback.

Last edited by TeoBigusGeekus (2019-03-16 23:19:15)


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

#2329 2019-03-17 16:35:02

ector1935
Member
Registered: 2017-05-03
Posts: 146

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

Hi everyone
To all xfce4 users, if in the latest updates your conky no longer have transparency, and desktop icons are like in the picture, just downgrade xfdesktop
probably has some bugs
At least to me with archlinux xfce4 this bug appears

https://postimg.cc/ppsZybh5

https://postimg.cc/0byGQ08C

Offline

#2330 2019-03-17 16:39:10

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

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

Arch+Openbox here, no problems whatsoever.
Just wait for an update from the xfce developers.

Thanks for the info ector1935.

Last edited by TeoBigusGeekus (2019-03-17 16:39:39)


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

#2331 2019-03-17 19:21:55

ector1935
Member
Registered: 2017-05-03
Posts: 146

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

Hi Teo,
it seems to be only for xfce and is caused by the latest xfdesktop version.
But no weather images on my conky tonight, I hope it's just temporary.
Does it happen to you too?
see image

Istantanea-2019-03-17-20-20-21.png

have this error from terminal

home/eva/1_accuweather/1_accuweather: riga 414: 15213 Annullato               (core dump creato) lynx --source -accept_all_cookies "$addr2" > $HOME/1_accuweather/last_days_raw

Edit
I restarted and everything works sorry.

Last edited by ector1935 (2019-03-17 19:44:31)

Offline

#2332 2019-03-17 21:50:12

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

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

Alright then ector1935, keep an eye though.


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

#2333 2019-03-18 10:36:38

ceeslans
Member
Registered: 2015-09-30
Posts: 27

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

ector1935 wrote:

Hi Teo,
it seems to be only for xfce and is caused by the latest xfdesktop version.
But no weather images on my conky tonight, I hope it's just temporary.
Does it happen to you too?

Debian stable running fine with xfdesktop v.4.12.3-3 .
Which version of xfdesktop is playing ugly?

Offline

#2334 2019-03-18 11:02:17

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

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

Probably this one.


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

#2335 2019-03-18 12:10:42

ector1935
Member
Registered: 2017-05-03
Posts: 146

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

TeoBigusGeekus wrote:

Probably this one.

yes
xfdesktop 4.13.3-1
have made a patch, but I still have to check if it works, yesterday I tried to reinstall it and the bug of the conky wax still

Last edited by ector1935 (2019-03-18 12:11:29)

Offline

#2336 2019-03-18 15:18:41

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

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

Patience my friend


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

#2337 2019-03-21 17:56:17

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

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

Hello

my conky station (conky 1.10}

1553191070.png


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

#2338 2019-03-22 14:50:50

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

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

Nice one loutch!


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

#2339 2019-03-24 15:48:49

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

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

With conky, we can set position of image like this :

${image ~/conky-meteo-dark_sky/d1.png -p 40,20 -s 53x32}
${image ~/conky-meteo-dark_sky/d2.png -p 40,90 -s 53x32}
${image ~/conky-meteo-dark_sky/d3.png -p 40,160 -s 53x32}
${image ~/conky-meteo-dark_sky/d4.png -p 40,230 -s 53x32}
${image ~/conky-meteo-dark_sky/d5.png -p 40,295 -s 53x32}
${image ~/conky-meteo-dark_sky/d6.png -p 40,365 -s 53x32}
${image ~/conky-meteo-dark_sky/d7.png -p 40,435 -s 53x32}
${image ~/conky-meteo-dark_sky/d8.png -p 40,500 -s 53x32}

In my conky I have that :

${goto 100}${font DejaVuSansMono:bold:size=10}${exec date '+%A %d %B'}
${goto 100}${font DejaVuSansMono:bold:size=10}${exec date '+%A %d %B' --date '1 days'}
............................

I can set horizontal position with ${goto 100} but I want also set vertical position for align text with image.

Is there a way to do that ?

Offline

#2340 2019-03-24 15:59:14

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

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

Look at the voffset variable.


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

#2341 2019-03-24 16:22:21

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

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

TeoBigusGeekus wrote:

Look at the voffset variable.

I test voffset but that is not good.
Because in my conky I have a line for forecast, and this forecast may be on 1 or 2 or 3 lines.

${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | xargs -n6}

1553444128-prevision.png

without xargs -n6

1553444560-prevision1.png
with xargs -n6

Offline

#2342 2019-03-24 17:19:43

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

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

This Conky goes back to @loutch.

letzteNummerMGA5.th.jpg

With the help of the image.lua script of Didier-T the arrangement of the images is determined. After TEXT or conky.text = [[ the configuration looks like this. Maybe it will help you.  wink

...
lua_load ~/LUA/image.lua

TEXT
##### Start #####
${texeci 500 bash $HOME/1_accuweather/1_accuweather -f2015 -h2015}
##### Zeit #####
${voffset -35}${font GE Inspira:size=55}${time %H}:${time %M}${font GE Inspira:size=20}${color 808080}${goto 180}${time %S}$color$font
##### Datum #####
${voffset -55}${font GE Inspira:size=14}${alignc -50}${time %A, %d %B %Y}$font
##### Wind-Info-Anzeige ######
${goto 310}${font GE Inspira:size=12}Wind : ${execi 90 sed -n '5p' $HOME/1_accuweather/curr_cond} ${execi 90 sed -n '6p' $HOME/1_accuweather/curr_cond}
${goto 310}Humidity : ${execi 90 sed -n '7p' $HOME/1_accuweather/curr_cond}
${goto 310}Pressure : ${execi 90 sed -n '8p' $HOME/1_accuweather/curr_cond}
#### Stadt ####
${voffset -5}${font GE Inspira:size=14}Lichtenstein : ${font} ${execi 90 sed -n '1p' $HOME/1_accuweather/aktualisiert}
${font GE Inspira:size=18}${goto 135}${execi 90 sed -n '2p' $HOME/1_accuweather/curr_cond} °C ${font} Gefühlt :  ${voffset -12}${font GE Inspira:size=18}${execi 90 sed -n '3p' $HOME/1_accuweather/curr_cond} °C
${goto 555}${voffset -124}${font ubuntu:size=11}N $font
${goto 522}${voffset 8}${font Ubuntu:size=6}NNW ${goto 583}NNE$font
${goto 493}${voffset -6}${font Ubuntu:size=9}NW ${goto 611}NE$font
${goto 486}${voffset 10}${font Ubuntu:size=6}WNW ${goto 618}ENE$font
${goto 468}${voffset 5}${font Ubuntu:size=11}W ${goto 641}E$font
${goto 486}${voffset 9}${font Ubuntu:size=6}WSW ${goto 618}ESE
${goto 493}${voffset 16}${font Ubuntu:size=9}SW ${goto 611}SE$font
${goto 522}${voffset -4}${font Ubuntu:size=6}SSW ${goto 583}SSE
${goto 555}${voffset 4}${font Ubuntu:size=11}S $font
#### Anzeige der nächsten drei Stunden und drei Tage ####
${voffset -60}${goto 20}${tztime GMT-1 %H} h\
${goto 95}${tztime GMT-2 %H} h\
${goto 170}${tztime GMT-3 %H} h\
${goto 245}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$2}'`}\
${goto 320}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$2}'`}\
${goto 400}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$2}'`}
##### Temperaturanzeige  #####
${voffset 25}
T${goto 30}${execi 90 sed -n '29p' $HOME/1_accuweather/hourly1}°\
${goto 100}${execi 90 sed -n '30p' $HOME/1_accuweather/hourly1}°\
${goto 180}${execi 90 sed -n '31p' $HOME/1_accuweather/hourly1}°\
${goto 245}${color9}${execi 90 sed -n '8p' $HOME/1_accuweather/first_days}°${color}/${color7}${execi 90 sed -n '9p' $HOME/1_accuweather/first_days}°${color}\
${goto 320}${color9}${execi 90 sed -n '13p' $HOME/1_accuweather/first_days}°${color}/${color7}${execi 90 sed -n '14p' $HOME/1_accuweather/first_days}°${color}\
${goto 400}${color9}${execi 90 sed -n '18p' $HOME/1_accuweather/first_days}°${color}/${color7}${execi 90 sed -n '19p' $HOME/1_accuweather/first_days}°${color}
#### Icons aktuelle Bedingungen und Wind ####
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_0.png 180 5 132 80 0}${lua fDrawImage $HOME/1_accuweather/forecast_2015/wind_0.png 465 4 190 190 0}\
#### Icons für die nächsten 3 Stunden und 3 Tage ####
${lua fDrawImage $HOME/1_accuweather/hourly_2015/hourly_1.png 0 145 70 40 0}\
${lua fDrawImage $HOME/1_accuweather/hourly_2015/hourly_2.png 75 145 70 40 0}\
${lua fDrawImage $HOME/1_accuweather/hourly_2015/hourly_3.png 150 145 70 40 0}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_2.png 225 145 70 40 0}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_3.png 300 145 70 40 0}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_4.png 380 145 70 40 0}
${voffset -800}

image.lua

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

e.g

${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_0.png 180 5 132 80 0}

180= horizontal position from left
  5= vertical position from above
132=image height
80=image width
  0=Rotation of the image (here nothing but 0,1 -1-1,5 or others can be set up to the desired rotation)

Last edited by unklar (2019-03-24 17:21:52)

Offline

#2343 2019-03-25 12:06:23

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

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

@unklar
That's beautiful mein Freund, congrats!

@chepioq
If you don't know the number of lines of your output then there's nothing much that you can do.
Unless you use the cut command and just cut it to as many characters as you like while keeping a standard number of lines.
But in this way you end up with a lot of white space... hmm


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

#2344 2019-03-25 12:49:51

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

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

TeoBigusGeekus wrote:

@chepioq
If you don't know the number of lines of your output then there's nothing much that you can do.
Unless you use the cut command and just cut it to as many characters as you like while keeping a standard number of lines.
But in this way you end up with a lot of white space... hmm

Thank for your answer  Teo.
I will see if this is possible with a script lua.

Offline

#2345 2019-03-26 07:46:33

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

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

hello

Guys i would integreat this in my weather station

1553586328.png

but i lost my conky-pack .

If anyone have the scripts for conky 1.10 tanks.


@+


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

#2346 2019-03-26 08:59:51

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

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

TeoBigusGeekus wrote:

@unklar
That's beautiful mein Freund, congrats!


Teo, thank you very much!
Without your super script I would be nothing. angel  And, the idea had @loutch...   smile

Offline

#2347 2019-03-26 09:05:57

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

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

loutch wrote:

Guys i would integreat this in my weather station
....
but i lost my conky-pack .
If anyone have the scripts for conky 1.10 tanks.

You mean conkyrc 1.10?
Or, do you mean 
https://forums.bunsenlabs.org/viewtopic … 220#p31220
https://forums.bunsenlabs.org/viewtopic.php?id=2282

Offline

#2348 2019-03-26 15:13:19

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

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

Hello

unklar wrote:

You mean conkyrc 1.10?


I mean conky version 1.10  .

i go to try yours links (conky 1.09) but i'm not shure that work with conky 1.10

@+


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

#2349 2019-03-26 16:14:00

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

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

Don' work

Many errors in console.

When weather.txt empty is & nothing in conky

romuald@RogStrix:~$ conky -c ~/.conky/weather/conkyrc
conky: desktop window (a00008) is subwindow of root window (28a)
conky: window type - normal
conky: drawing to created window (0x4c00002)
conky: drawing to double buffer
conky: forked to background, pid is 3505
romuald@RogStrix:~$ 
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
/home/romuald/.conky/weather/lua-weather.sh: 43: /home/romuald/.conky/weather/lua-weather.sh: Syntax error: Bad for loop variable
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value

when i ad this in weather.txt


270
0,0 kn
0534
2138
0,0
Sarreguemines
broken clouds


i have in console this (

romuald@RogStrix:~$ conky -c ~/.conky/weather/conkyrc
conky: desktop window (a00008) is subwindow of root window (28a)
conky: window type - normal
conky: drawing to created window (0x4a00002)
conky: drawing to double buffer
conky: forked to background, pid is 3587
romuald@RogStrix:~$ 
/home/romuald/.conky/weather/lua-weather.sh: 43: /home/romuald/.conky/weather/lua-weather.sh: Syntax error: Bad for loop variable

done this

1553616820.png

Last edited by loutch (2019-03-26 16:14:34)


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

#2350 2019-03-26 16:26:29

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

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

loutch wrote:

I mean conky version 1.10  .

i go to try yours links (conky 1.09) but i'm not shure that work with conky 1.10

If your conky version is at least 1.10.6 and higher, then the conky is still displayed in the old syntax1.9. It only complains about it at the beginning of the terminal.

Using this example, you can also do the conversion to syntax1.10 yourself.
The script for this is in
/usr/share/doc/conky1.10.x/convert.lua


Copy it into your /home, into the directory of conky1.9, make it executable, go into it and issue the command:

lua convert.lua conkyrc9 conkyrc10

For better understanding I have here the 9 for old and the 10 for the new Conky

I've done this so many times, it works reliably.
In debian based distro's you should make sure that the package lua5.2  wink
is installed because the convert.lua script needs this command line interpreter.

Last edited by unklar (2019-03-26 16:29:10)

Offline

Board footer

Powered by FluxBB