You are not logged in.

#3251 2020-03-09 21:17:58

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

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

You do not want to see/feel UVI 11+ ...

At 8/9 I can feel my skin burning.   We get in in the south because of the ozone hole over the south pole.  Getting smaller but not fast enough.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3252 2020-03-10 07:54:13

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

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

Very beautiful setups from both of you.

@unklar
Very good solution, that's a clear and elegant conky.

@s11
You should visit Athens in the summer to tell me how it compares with Buenos Aires, infernowise.


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

#3253 2020-03-10 13:27:53

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

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

TeoBigusGeekus wrote:

@unklar
Very good solution, that's a clear and elegant conky.

Thanks, Teo. I'm happy to return the compliment, because without your script I would have been nothing  wink

I think I can release this thing into the "wild."
simple configuration in Siduction(in kf5)siduction1.th.pngsiduction2.th.png


with Lua for the "round corners", thanks to @loutch for the trick, in archlinux(also kf5)arch1.th.pngarch2.th.png


with "selfmade background", thanks to @ragamatrix for the ingenious script, in bl-lithium(openbox)
Unfortunately this needs some more work, the first lines of text refuse to move to the right with ${goto} hmm  bl2.th.png

and the configuration(simple)

-- https://forums.bunsenlabs.org/viewtopic.php?pid=1545#p1545
-- after a design idea from 2015 by @Sector11
-- https://forums.mageia.org/de/download/file.php?id=1352&mode=view
-- @unklar 2020-03-10
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',--
--own_window_color 000000
    own_window_argb_visual = true,
--own_window_argb_value = 250,

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,

-- fiddle with window
	use_spacer = 'none', --right',left',
	use_xft = true,

-- Update interval in seconds
	update_interval = 2, --1,

-- Minimum size of text area
	minimum_width = 180, minimum_height = 00,
	maximum_width = 180,

	override_utf8_locale = true,

-- Draw shades?
	draw_shades = true,

-- Text stuff
	draw_outline = true,
	draw_borders = false,
--font freesans -12
	font = 'monofur:size=8',
	uppercase = false,

-- Stippled borders?
	stippled_borders = 3,

-- border margins
	border_inner_margin = 9,

-- border width
	border_width = 10,

-- Default colors and also border colors, grey90 == #e5e5e5
	default_color = 'ffffff',
	color1 = 'ffffff', --949494',
	color2 = 'cyan',

-- 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 = 10,
	gap_y = 10,

--imlib_cache_size = 0,
	imlib_cache_flush_interval = 900,
	max_user_text = 48552,

};

conky.text = [[
${color1}${font monofur:size=12}WETTER ${color2}${hr 2}${color}${texeci 500 bash $HOME/Weather_com_conky_script/weather_com}
${image $HOME/Weather_com_conky_script/Forecast_Images/now.png -p 0,90 -s 40x40}\
${font monofur:size=10}${color1}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days} ${color}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/now}°C(${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/now}°C)
${font}${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/10days}
${goto 70}MOND${color}${alignr} ${texeci 600 sed -n '17p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}${font}Hoch / Tief${color}${alignr} ${texeci 600 sed -n '4p' $HOME/Weather_com_conky_script/now}° / ${texeci 600 sed -n '5p' $HOME/Weather_com_conky_script/now}°
${goto 70}${color1}WIND${color}${alignr} ${texeci 600 sed -n '7p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}UV INDEX${color}${alignr} ${texeci 600 sed -n '6p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Sonnenaufgang${color}${alignr} ${texeci 600 sed -n '13p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Sonnenuntergang${color}${alignr} ${texeci 600 sed -n '15p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Luftdruck${color}${alignr} ${texeci 600 sed -n '10p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Mondaufgang${color}${alignr} ${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Monduntergang${color}${alignr} ${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Fernsicht${color}${alignr} ${texeci 600 sed -n '11p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Rel.Luftfeuchte${color}${alignr} ${texeci 600 sed -n '8p' $HOME/Weather_com_conky_script/now} %
${goto 70}${color1}Taupunkt${color}${alignr} ${texeci 600 sed -n '9p' $HOME/Weather_com_conky_script/now} °C
${color2}${hr 1}${color}
${image $HOME/1_pixel_images/cyan_1.png -p 90,202 -s 1x335}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h2.png -p 105,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h3.png -p 105,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h4.png -p 105,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h5.png -p 105,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h6.png -p 105,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h7.png -p 105,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h8.png -p 105,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h9.png -p 105,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h10.png -p 105,505 -s 30x30}\
${if_match "${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}" == "Heute"}
${goto 70}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 170}${tztime GMT-2 %H} h
${goto 60}${texeci 600 sed -n '71p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 170}${tztime GMT-3 %H} h
${goto 60}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 170}${tztime GMT-4 %H} h
${goto 60}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 170}${tztime GMT-5 %H} h
${goto 60}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 170}${tztime GMT-6 %H} h
${goto 60}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 170}${tztime GMT-7 %H} h
${goto 60}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 170}${tztime GMT-8 %H} h
${goto 60}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 170}${tztime GMT-9 %H} h
${goto 60}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 170}${tztime GMT-10 %H} h
${goto 60}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color2}${hr 1}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${else}
${goto 70}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 170}${tztime GMT-2 %H} h
${goto 60}${texeci 600 sed -n '40p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 170}${tztime GMT-3 %H} h
${goto 60}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 170}${tztime GMT-4 %H} h
${goto 60}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 170}${tztime GMT-5 %H} h
${goto 60}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 170}${tztime GMT-6 %H} h
${goto 60}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 170}${tztime GMT-7 %H} h
${goto 60}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 170}${tztime GMT-8 %H} h
${goto 60}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 170}${tztime GMT-9 %H} h
${goto 60}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 170}${tztime GMT-10 %H} h
${goto 60}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color2}${hr 1}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${endif}

]];

and with the lua part

-- https://forums.bunsenlabs.org/viewtopic.php?pid=1545#p1545
-- after a design idea from 2015 by @Sector11
-- https://forums.mageia.org/de/download/file.php?id=1352&mode=view
-- @unklar 2020-03-10 https://forums.bunsenlabs.org/viewtopic.php?pid=98571#p98571
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
        background = true,
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
--own_window_color 000000
    own_window_argb_visual = true,
--own_window_argb_value = 250,

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,
	no_buffers = true,

-- fiddle with window
	use_spacer = 'none', --right',left',
	use_xft = true,

-- Update interval in seconds
	update_interval = 2, --1,

-- Minimum size of text area
	minimum_width = 180, minimum_height = 00,
	maximum_width = 180,

	override_utf8_locale = true,

-- Draw shades?
	draw_shades = true,
	default_shade_color = '000000',

-- Text stuff
	draw_outline = false, --true,
	default_outline_color = '000000',
	draw_borders = false,
	
--font freesans -12
	font = 'monofur:size=8',
	uppercase = false,

-- Stippled borders?
	stippled_borders = 3,

-- border margins
	border_inner_margin = 9,
	border_outer_margin = 0,

-- border width
	border_width = 10,

-- Default colors and also border colors, grey90 == #e5e5e5
	default_color = 'ffffff',
	color1 = 'ffffff', --949494',
	color2 = '000000', --cyan',

-- 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 = 25,
	gap_y = 150,

--imlib_cache_size = 0,
	imlib_cache_flush_interval = 900,
	max_user_text = 48552,
-- LUA --	
	lua_load = '~/Weather_com_conky_script/script/draw_bg.lua',
        lua_draw_hook_pre = 'draw_bg 10 0 0 0 0 0x000000 0.55',

};

conky.text = [[
${color1}${font monofur:size=12}WETTER ${color2}${hr 2}${color}${texeci 500 bash $HOME/Weather_com_conky_script/weather_com}
${image $HOME/Weather_com_conky_script/Forecast_Images/now.png -p 0,90 -s 40x40}\
${font monofur:size=10}${color1}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days} ${color}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/now}°C(${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/now}°C)
${font}${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/10days}
${goto 70}MOND${color}${alignr} ${texeci 600 sed -n '17p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}${font}Hoch / Tief${color}${alignr} ${texeci 600 sed -n '4p' $HOME/Weather_com_conky_script/now}° / ${texeci 600 sed -n '5p' $HOME/Weather_com_conky_script/now}°
${goto 70}${color1}WIND${color}${alignr} ${texeci 600 sed -n '7p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}UV INDEX${color}${alignr} ${texeci 600 sed -n '6p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Sonnenaufgang${color}${alignr} ${texeci 600 sed -n '13p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Sonnenuntergang${color}${alignr} ${texeci 600 sed -n '15p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Luftdruck${color}${alignr} ${texeci 600 sed -n '10p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Mondaufgang${color}${alignr} ${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Monduntergang${color}${alignr} ${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Fernsicht${color}${alignr} ${texeci 600 sed -n '11p' $HOME/Weather_com_conky_script/now}
${goto 70}${color1}Rel.Luftfeuchte${color}${alignr} ${texeci 600 sed -n '8p' $HOME/Weather_com_conky_script/now} %
${goto 70}${color1}Taupunkt${color}${alignr} ${texeci 600 sed -n '9p' $HOME/Weather_com_conky_script/now} °C
${color2}${hr 1}${color}
${image $HOME/1_pixel_images/black_1.png -p 90,202 -s 1x335}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h2.png -p 105,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h3.png -p 105,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h4.png -p 105,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h5.png -p 105,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h6.png -p 105,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h7.png -p 105,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h8.png -p 105,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h9.png -p 105,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h10.png -p 105,505 -s 30x30}\
${if_match "${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}" == "Heute"}
${goto 70}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 170}${tztime GMT-2 %H} h
${goto 60}${texeci 600 sed -n '71p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 170}${tztime GMT-3 %H} h
${goto 60}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 170}${tztime GMT-4 %H} h
${goto 60}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 170}${tztime GMT-5 %H} h
${goto 60}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 170}${tztime GMT-6 %H} h
${goto 60}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 170}${tztime GMT-7 %H} h
${goto 60}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 170}${tztime GMT-8 %H} h
${goto 60}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 170}${tztime GMT-9 %H} h
${goto 60}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 170}${tztime GMT-10 %H} h
${goto 60}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color2}${hr 1}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${else}
${goto 70}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 170}${tztime GMT-2 %H} h
${goto 60}${texeci 600 sed -n '40p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 170}${tztime GMT-3 %H} h
${goto 60}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 170}${tztime GMT-4 %H} h
${goto 60}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 170}${tztime GMT-5 %H} h
${goto 60}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 170}${tztime GMT-6 %H} h
${goto 60}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 170}${tztime GMT-7 %H} h
${goto 60}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 170}${tztime GMT-8 %H} h
${goto 60}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 170}${tztime GMT-9 %H} h
${goto 60}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 70}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 170}${tztime GMT-10 %H} h
${goto 60}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 170}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color2}${hr 1}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${endif}

]];

BL may follow later smile
As always, improvements are welcome.  big_smile

Have fun!

Offline

#3254 2020-03-10 15:30:42

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

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

@ Teo ....

If I went to Greece (Athens or elsewhere) it would be to see you not to judge the heat difference.  But I'd accepts that as a second reason for going.  big_smile

Next is Moon Script


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3255 2020-03-10 18:06:18

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

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

Hm, this is ${goto 30} and looks ok, because it only affects one line each. 2020-03-10-17-44-14_scrot.png

In the if_statement, which prints a different number of lines here, this also only affects the 1st line.
All other lines are ignored.
This is {goto25} 2020-03-10-17-49-46_scrot.png

At {goto22}, it's very close...   mad  2020-03-10-18-07-59_scrot.th.png


I don't like this...  neutral
It's closing time for today.

Offline

#3256 2020-03-10 19:46:05

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

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

unklar wrote:

I don't like this...  neutral
It's closing time for today.

FRIEND IN TROUBLE ALERT -  -  - FRIEND IN TROUBLE ALERT

You close for the day .... I re-open the case.

So I postponed getting moon script running.  And instead activated Teo's weather.com script AND grabbed the last few lines that are NOT being nice to my friend.  Nothing else and put them into my test conky - well of course I had to setup and ran the weather.com script in the conky as well:

${texeci 500 bash $HOME/Weather_com_conky_script/weather_com}\
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}

2020-03-10-163650-S11.jpg
There we go same lines.  And away from the edge too.

The necessary tweak to do that:
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

border_inner_margin 10

WARNING:  Border of 10 pixels apply to the top, bottom and both sides of the conky.  Adjust accordingly.

Notice how my space station image is out of sync with the curve of the text beside it ↑↑ there compared to ↓↓ :
2020-03-10-165223-S11.jpg

Last edited by Sector11 (2020-03-10 19:56:49)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3257 2020-03-11 12:01:25

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

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

lol  lol
I admit I was speculating that you might be able to take care of it. Who else is going to solve this mystery...  angel

I can tell you that the rule

border_inner_margin 10

will affect the edge of the Conky window and indent the text inwards.

But...
Teo's if_statement assumes that the code is in the Conky twice.

TeoBigusGeekus wrote:

As for the Tonight/Tomorrow thingy, it can't be avoided because the forecast up until sometime in the day is for tonight and then it's for tomorrow, with only the first line of the 10days file to indicate the difference. It seems hard at first, but once you get the hang of it it's not a big deal to tackle the if_match command; it's just that you practically have to write two conkyrc sections for this part of your configuration.

Yeah, and this is exactly the part where the border-10 doesn't work   sad

Again for clarification, besides the border-10 setting above, this is the code I used:

${if_match "${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}" == "Heute"}
...
${goto 20}${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${goto 20}${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${goto 20}${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${else}
...
${goto 20}${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${goto 20}${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${goto 20}${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${endif}

with this result 2020-03-11-14-10-11_scrot.png


Note, I use my own backround picture for Conky!

Of course, none of this will matter if I leave out this picture...   big_smile

Last edited by unklar (2020-03-11 13:27:17)

Offline

#3258 2020-03-11 15:43:35

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

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

@ unklar

I grabbed the conkys from here

I also remember the today, tonight, tomorrow thing --- itching to play with it.

Mean time converting the conkys to v1.9


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3259 2020-03-11 16:00:29

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

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

Why do I not see this: 10days ??

${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3260 2020-03-11 16:10:22

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

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

Here is the complete, current code for bl-lithium and the background image to play.

-- https://forums.bunsenlabs.org/viewtopic.php?pid=1545#p1545
-- after a design idea from 2015 by @Sector11
-- https://forums.mageia.org/de/download/file.php?id=1352&mode=view
-- @unklar 2020-03-10
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
	background = false,--true,
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	own_window_class = 'Conky',
--	own_window_color = '000000',
--	own_window_argb_visual = true,
--	own_window_argb_value = 200,

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,
	no_buffers = true,

-- fiddle with window
	use_spacer = 'none', --right',left',
	use_xft = true,
	--font freesans -12
	xftalpha = 1.0,
	font = 'monofur:size=8',
	uppercase = false,

-- Update interval in seconds
	update_interval = 2, --1,

-- Minimum size of text area
	minimum_width = 185, minimum_height = 720,
	maximum_width = 185,

	override_utf8_locale = true,

-- Draw shades?
	draw_shades = false, --true,

-- Text stuff
	draw_outline = false, --true,
	draw_borders = false,
	stippled_borders = 0,
	draw_graph_borders = false,
	border_inner_margin = 10,
	border_outer_margin = 0,
	border_width = 0,

-- Default colors and also border colors, grey90 == #e5e5e5
	default_color = 'ffffff',
	color1 = 'ffffff', --949494',
	color2 = 'cyan',
	color3 = 'ed2323',

-- 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 = 10,
	gap_y = 80,

--imlib_cache_size = 0,
	imlib_cache_flush_interval = 900,
	max_user_text = 48552,

};

conky.text = [[${image $HOME/bin/com5.png -p 0,0 -s 185x720}\
${color1}${voffset 4}${font monofur:size=12}${alignc}WETTER ${color}${texeci 500 bash $HOME/Weather_com_conky_script/weather_com}
${image $HOME/Weather_com_conky_script/Forecast_Images/now.png -p 5,90 -s 40x40}\
${goto 20}${font monofur:size=10}${color1}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days} ${color}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/now}°C(${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/now}°C)
${goto 20}${font}${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/10days}
${goto 60}MOND${color}${alignr 5} ${texeci 600 sed -n '17p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}${font}Hoch / Tief${color}${alignr 5} ${texeci 600 sed -n '4p' $HOME/Weather_com_conky_script/now}° / ${texeci 600 sed -n '5p' $HOME/Weather_com_conky_script/now}°
${goto 60}${color1}WIND${color}${alignr 5} ${texeci 600 sed -n '7p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}UV INDEX${color}${alignr 5} ${texeci 600 sed -n '6p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Sonnenaufgang${color}${alignr 5} ${texeci 600 sed -n '13p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Sonnenuntergang${color}${alignr 5} ${texeci 600 sed -n '15p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Luftdruck${color}${alignr 5} ${texeci 600 sed -n '10p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Mondaufgang${color}${alignr 5} ${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Monduntergang${color}${alignr 5} ${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Fernsicht${color}${alignr 5} ${texeci 600 sed -n '11p' $HOME/Weather_com_conky_script/now}
${goto 60}${color1}Rel.Luftfeuchte${color}${alignr 5} ${texeci 600 sed -n '8p' $HOME/Weather_com_conky_script/now} %
${goto 60}${color1}Taupunkt${color}${alignr 5} ${texeci 600 sed -n '9p' $HOME/Weather_com_conky_script/now} °C
${color3}${voffset -4}${hr 1}${color}
${image $HOME/1_pixel_images/white_1.png -p 90,202 -s 1x335}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h2.png -p 105,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h3.png -p 105,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h4.png -p 105,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h5.png -p 105,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h6.png -p 105,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h7.png -p 105,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h8.png -p 105,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h9.png -p 105,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h10.png -p 105,505 -s 30x30}\
${if_match "${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}" == "Heute"}
${goto 60}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 160}${tztime GMT-2 %H} h
${goto 55}${texeci 600 sed -n '71p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 160}${tztime GMT-3 %H} h
${goto 55}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 160}${tztime GMT-4 %H} h
${goto 55}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 160}${tztime GMT-5 %H} h
${goto 55}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 160}${tztime GMT-6 %H} h
${goto 55}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 160}${tztime GMT-7 %H} h
${goto 55}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 160}${tztime GMT-8 %H} h
${goto 55}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 160}${tztime GMT-9 %H} h
${goto 55}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 160}${tztime GMT-10 %H} h
${goto 55}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color3}${hr 1}${color}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${goto 20}${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${goto 20}${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${else}
${goto 60}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 160}${tztime GMT-2 %H} h
${goto 55}${texeci 600 sed -n '40p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 160}${tztime GMT-3 %H} h
${goto 55}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 160}${tztime GMT-4 %H} h
${goto 55}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 160}${tztime GMT-5 %H} h
${goto 55}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 160}${tztime GMT-6 %H} h
${goto 55}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 160}${tztime GMT-7 %H} h
${goto 55}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 160}${tztime GMT-8 %H} h
${goto 55}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 160}${tztime GMT-9 %H} h
${goto 55}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${hr 1}
${goto 60}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 160}${tztime GMT-10 %H} h
${goto 55}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 160}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color3}${hr 1}${color}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${goto 20}${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${goto 20}${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${endif}

]];

But, you have to fix your moon script first. wink

We are already older and have time, my friend.   big_smile

Offline

#3261 2020-03-11 16:14:39

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

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

First run after converting ... needs tweaking and a HUGE magnifying glass!
2020-03-11-130710-S11.jpg

How do you see that unklar?


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3262 2020-03-11 16:24:22

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

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

Teo,  smile
can you possibly conky "brake"?

Conky is just too fast for the work of your script.
I notice this again and again especially at the start of Conky and the changes of "Today", "Tonight", "Tomorrow" etc. The complete data is only available at the second run.
So, after 8.333333... minutes.

Please, it's just a question to your expertise.   cool

Offline

#3263 2020-03-11 16:24:52

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

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

unklar wrote:

Here is the complete, current code for bl-lithium and the background image to play.

aaaaaaaaaaaaa  OK thank you.

unklar wrote:

But, you have to fix your moon script first. ;)

We are already older and have time, my friend.   :D

OH no wonder I could not see.  The darkness of a missing moon and ancient eyes.
(dirty glasses nop cleaned)

OK time to turn the moon on.

Hey you, MOON, get up there already will ya, we need the tides flowing!"

I start again ...


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3264 2020-03-11 16:28:14

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

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

Sector11 wrote:

First run after converting ... needs tweaking and a HUGE magnifying glass!
How do you see that unklar?

You mean the Conky or the Sreen?

With the Conky, the goal was to keep the thing very small.
Therefore monofur 8 and

minimum_size 180 00
maximum_width 180

finally the picture 185x720 (I assumed the "addition of a total of 12 lines)   big_smile

2020-03-11-17-55-36_scrot.th.png

Last edited by unklar (2020-03-11 16:58:35)

Offline

#3265 2020-03-11 21:23:16

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

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

Guten Abend mein Freund unklar

unklar wrote:
Sector11 wrote:

First run after converting ... needs tweaking and a HUGE magnifying glass!
How do you see that unklar?

You mean the Conky or the Sreen?

The small text on  the conky, I need a magnifying glass.  big_smile

With the Conky, the goal was to keep the thing very small.

Well, it worked - it is smaller than small. ...  Now I just need to wait to see when the "yellow" squares show up.  Should be sometime after 18:00 here and it's 17:05 now.
2020-03-11-170202-S11.jpg

Interesting that your BL-Lithium conky (Debian 10) does not line up right on my Debian 10 install.  I needed "some" tweaking to get it to play right.

FIRST thing I did was make a new image: com-5-20.png it is 20 pixels wider and 20 pixels taller, transparent, with your image pasted into the centre - to help with the alignment of the conky text.  Gives it a 10 pixel transparent edge to play with,

And I call it into the conky like this:

${image /media/5/Conky/Weather_com_conky_script/com5-20.png -p -10,-10 -s 205x740}\

Notice the -10 offsets.

And then set the "inner border" and a "dashed border" to see the edge of the conky, the visible part of your image lines up perfectly with the stippled border conky edge:

draw_borders yes #no
stippled_borders 5
border_inner_margin 10
border_outer_margin 0
border_width 0

However it cause the conky to move away from the edge of the screen ... so another tweak:

## Gap between borders of screen and text
	gap_x -5	## ←|→
	gap_y 80	## ↑|↓

pushes it back to the edge of the screen quite nicely.

Alsosince things are set to be "10 pixels" from the edge the

${goto 160}

you had I changed to

${alignr 20}

Remember the wider image is offset a -10 and they there is the other transparent 10 pixels, so this sets all text in the WETTER section to align to the right nice like.

Here's the code with the red+x.png, green+x.png and yellow+x.png still in place

Oh and in the bottom part where you see TODAY and TONIGHT  get rid of the first ${goto} statement you have see my code:

## pkill -xf "conky -c /media/5/Conky/Weather_com_conky_script/unklar-1_1.9.conky" &

## https://forums.bunsenlabs.org/viewtopic.php?pid=1545#p1545
## after a design idea from 2015 by @Sector11
## https://forums.mageia.org/de/download/file.php?id=1352&mode=view
## @unklar 2020-03-10
## conky.config = {
## Create own window instead of using desktop (required in nautilus)
	background false## true
	own_window true
	own_window_type normal
	own_window_transparent true
	own_window_hints undecorated,below,skip_taskbar,skip_pager
	own_window_class Conky
## 	own_window_color 000000
## 	own_window_argb_visual true
## 	own_window_argb_value 200

## Use double buffering (reduces flicker may not work for everyone)
	double_buffer true
	no_buffers true

## fiddle with window
	use_spacer none ## rightleft
	use_xft true
	## font freesans -12
	xftalpha 1.0
	font monofur:size=8
	uppercase false

## Update interval in seconds
	update_interval 2 ## 1

## Minimum size of text area

minimum_size 185 720
maximum_width 185

	override_utf8_locale true

## Draw shades?
	draw_shades false ## true

## Text stuff
	draw_outline false ## true

draw_borders yes #no
stippled_borders 5
border_inner_margin 10
border_outer_margin 0
border_width 0

## Default colors and also border colors grey90 == #e5e5e5
	default_color ffffff
	color1 ffffff ## 949494
	color2 cyan
	color3 ed2323

## 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 -5	## ←|→
	gap_y 80	## ↑|↓

##imlib_cache_size 0
	imlib_cache_flush_interval 900
	max_user_text 48552

#${texeci 500 bash /media/5/Conky/Weather_com_conky_script/weather_com}


TEXT
${image /media/5/Conky/Weather_com_conky_script/com5-20.png -p -10,-10 -s 205x740}\
${color1}${voffset 4}${font monofur:size=12}${alignc 10}WETTER${color}
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/now.png -p 5,90 -s 40x40}${image /media/5/Conky/images/red+x.png -p 5,90 -s 40x40}\
${font monofur:size=10}${color1}${texeci 600 sed -n '1p' /media/5/Conky/Weather_com_conky_script/10days} ${color}${texeci 600 sed -n '1p' /media/5/Conky/Weather_com_conky_script/now}°C(${texeci 600 sed -n '3p' /media/5/Conky/Weather_com_conky_script/now}°C)
${font}${texeci 600 sed -n '19p' /media/5/Conky/Weather_com_conky_script/10days}
${goto 50}MOND${color}${alignr 20}${texeci 600 sed -n '17p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}${font}Hoch / Tief${color}${alignr 20}${texeci 600 sed -n '4p' /media/5/Conky/Weather_com_conky_script/now}° / ${texeci 600 sed -n '5p' /media/5/Conky/Weather_com_conky_script/now}°
${goto 50}${color1}WIND${color}${alignr 20}${texeci 600 sed -n '7p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}UV INDEX${color}${alignr 20}${texeci 600 sed -n '6p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Sonnenaufgang${color}${alignr 20}${texeci 600 sed -n '13p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Sonnenuntergang${color}${alignr 20}${texeci 600 sed -n '15p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Luftdruck${color}${alignr 20}${texeci 600 sed -n '10p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Mondaufgang${color}${alignr 20}${texeci 600 sed -n '19p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Monduntergang${color}${alignr 20}${texeci 600 sed -n '21p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Fernsicht${color}${alignr 20}${texeci 600 sed -n '11p' /media/5/Conky/Weather_com_conky_script/now}
${goto 50}${color1}Rel.Luftfeuchte${color}${alignr 20}${texeci 600 sed -n '8p' /media/5/Conky/Weather_com_conky_script/now} %
${goto 50}${color1}Taupunkt${color}${alignr 20}${texeci 600 sed -n '9p' /media/5/Conky/Weather_com_conky_script/now} °C
${color3}${swapbar 0,165}${color}
${image /media/5/Conky/images/bk-n-dots/white_1.png -p 90,202 -s 1x314}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h2.png -p 105,212 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,212 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h3.png -p 105,245 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,245 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h4.png -p 105,278 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,278 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h5.png -p 105,311 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,311 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h6.png -p 105,344 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,344 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h7.png -p 105,377 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,377 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h8.png -p 105,410 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,410 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h9.png -p 105,443 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,443 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/h10.png -p 105,476 -s 30x30}${image /media/5/Conky/images/red+x.png -p 105,476-s 30x30}\
${if_match "${texeci 600 sed -n '1p' /media/5/Conky/Weather_com_conky_script/10days}" == "Heute"}
${goto 60}${execi 3600 date  --date='1 day' '+%a %e'}${alignr}${tztime GMT-2 %H} h
${goto 55}${texeci 600 sed -n '71p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '3p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='2 day' '+%a %e'}${goto 150}${tztime GMT-3 %H} h
${goto 55}${texeci 600 sed -n '133p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '32p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='3 day' '+%a %e'}${goto 150}${tztime GMT-4 %H} h
${goto 55}${texeci 600 sed -n '195p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '61p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='4 day' '+%a %e'}${goto 150}${tztime GMT-5 %H} h
${goto 55}${texeci 600 sed -n '257p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '90p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='5 day' '+%a %e'}${goto 150}${tztime GMT-6 %H} h
${goto 55}${texeci 600 sed -n '319p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '119p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='6 day' '+%a %e'}${goto 150}${tztime GMT-7 %H} h
${goto 55}${texeci 600 sed -n '381p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '148p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='7 day' '+%a %e'}${goto 150}${tztime GMT-8 %H} h
${goto 55}${texeci 600 sed -n '443p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '177p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='8 day' '+%a %e'}${goto 150}${tztime GMT-9 %H} h
${goto 55}${texeci 600 sed -n '505p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '206p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 60}${execi 3600 date  --date='9 day' '+%a %e'}${goto 150}${tztime GMT-10 %H} h
${goto 55}${texeci 600 sed -n '567p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '235p' /media/5/Conky/Weather_com_conky_script/hourly}°
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d2.png -p 10,212 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,212 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d3.png -p 10,245 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,245 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d4.png -p 10,278 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,278 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d5.png -p 10,311 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,311 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d6.png -p 10,344 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,344 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d7.png -p 10,377 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,377 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d8.png -p 10,410 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,410 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d9.png -p 10,443 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,443 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d10.png -p 10,476 -s 30x30}${image /media/5/Conky/images/yellow+x.png -p 10,476 -s 30x30}\
hello ${color3}${swapbar 0,165}${color}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '1p' /media/5/Conky/Weather_com_conky_script/10days}${font}
${goto 20}${texeci 600 sed -n '21p' /media/5/Conky/Weather_com_conky_script/10days | fold -s35}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '32p' /media/5/Conky/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${goto 20}${color}${texeci 600 sed -n '52p' /media/5/Conky/Weather_com_conky_script/10days | fold -s35}
${else}
${goto 50}${execi 3600 date  --date='1 day' '+%a %e'}${goto 150}${tztime GMT-2 %H} h
${goto 55}${texeci 600 sed -n '40p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '3p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='2 day' '+%a %e'}${goto 150}${tztime GMT-3 %H} h
${goto 55}${texeci 600 sed -n '133p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '32p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='3 day' '+%a %e'}${goto 150}${tztime GMT-4 %H} h
${goto 55}${texeci 600 sed -n '195p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '61p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='4 day' '+%a %e'}${goto 150}${tztime GMT-5 %H} h
${goto 55}${texeci 600 sed -n '257p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '90p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='5 day' '+%a %e'}${goto 150}${tztime GMT-6 %H} h
${goto 55}${texeci 600 sed -n '319p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '119p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='6 day' '+%a %e'}${goto 150}${tztime GMT-7 %H} h
${goto 55}${texeci 600 sed -n '381p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '148p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='7 day' '+%a %e'}${goto 150}${tztime GMT-8 %H} h
${goto 55}${texeci 600 sed -n '443p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '177p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='8 day' '+%a %e'}${goto 150}${tztime GMT-9 %H} h
${goto 55}${texeci 600 sed -n '505p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '206p' /media/5/Conky/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='9 day' '+%a %e'}${goto 150}${tztime GMT-10 %H} h
${goto 55}${texeci 600 sed -n '567p' /media/5/Conky/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '235p' /media/5/Conky/Weather_com_conky_script/hourly}°
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d2.png -p 10,212 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,212 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d3.png -p 10,245 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,245 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d4.png -p 10,278 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,278 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d5.png -p 10,311 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,311 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d6.png -p 10,344 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,344 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d7.png -p 10,377 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,377 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d8.png -p 10,410 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,410 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d9.png -p 10,443 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,443 -s 30x30}\
${image /media/5/Conky/Weather_com_conky_script/Forecast_Images/d10.png -p 10,476 -s 30x30}${image /media/5/Conky/images/green+x.png -p 10,476 -s 30x30}
${voffset -5}${color3}${swapbar 0,165}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' /media/5/Conky/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${texeci 600 sed -n '21p' /media/5/Conky/Weather_com_conky_script/10days | fold -s35}

${font monofur:size=10}${texeci 600 sed -n '32p' /media/5/Conky/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' /media/5/Conky/Weather_com_conky_script/10days | fold -s35}
${endif}

CHIMO!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3266 2020-03-12 11:14:57

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

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

Good morning my friend!

I just discovered everything.  smile

unklar wrote:

I admit I was speculating that you might be able to take care of it. Who else is going to solve this mystery...


I didn't mean for you to take care of it right away. But I guess it made you really hot   big_smile  devil


I confess you live up to your name. I never would have thought of this solution in my young Conky life.
I want to thank you and your time

I'll be in touch, brilliant!   angel

Offline

#3267 2020-03-12 16:48:20

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

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

Teo I need your help..... 
I start 3 scripts like this in ~/.conkyrc :

TEXT
${execpi 900 /media/5/Conky/Accuweather_conky_script/accuweather -f2015 -h2015 -f2016 -h2016}\
${execpi 900 /media/5/Conky/Moongiant_conky_script/moongiant}\
${execpi 900 /media/5/Conky/Weather_com_conky_script/weather_com}\
${font LED_mono:size=34}${goto 12}${color1}88:88:88${goto 12}${color5}${time %T}${color}${font}
bla bla bla


accuweather
Trying to run the script in a terminal:

 12 Mar 20 @ 13:24:13 ~
   $ /media/5/Conky/Accuweather_conky_script/accuweather
Invalid arguments!
 
 12 Mar 20 @ 13:24:26 ~
   $ 

In "accuweather" is this line:

address="https://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"

Opening that link in a web browser and the info matches perfectly with what I see in the conky.

confusing as all get up and go.

next: moongiant

 12 Mar 20 @ 13:24:30 ~
   $ /media/5/Conky/Moongiant_conky_script/moongiant
 
 12 Mar 20 @ 13:24:34 ~
   $ 

works perfect...

last: weather_com

 12 Mar 20 @ 13:25:01 ~
   $ /media/5/Conky/Weather_com_conky_script/weather_com
rm: cannot remove '/media/5/Conky/Weather_com_conky_script/Forecast_Images/*.svg': No such file or directory
 
 12 Mar 20 @ 13:25:10 ~
   $ 

Tell me if you can help and what you might need and you got it.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3268 2020-03-12 16:59:20

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

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

Just in case:

/media/5/Conky/Accuweather_conky_script/accuweather

#!/bin/bash

#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
#weather_conky_launch_command="conky -b"
weather_conky_launch_command="conky -c ~/.conkyrc"


#####################################
# Put your Accuweather address here #
#####################################
address="https://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
#address="https://www.accuweather.com/en/us/hutto-tx/78634/weather-forecast/2110192"
#address="https://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="https://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"


#Pause weather conky
pkill -STOP -xf "$weather_conky_launch_command"

#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;
         11)
           echo 0
         ;;
         12)
           echo h
         ;;
         13|14)
           echo g
         ;;
         15)
           echo m
         ;;
         16|17)
           echo k
         ;;
         18)
           echo i
         ;;
         19)
           echo q
         ;;
         20|21|23)
           echo o
         ;;
         22)
           echo r
         ;;
         24|31)
           echo E
         ;;
         25)
           echo v
         ;;
         26)
           echo x
         ;;
         29)
           echo y
         ;;
         30)
           echo 5
         ;;
         32)
           echo 6
         ;;
         33)
           echo A
         ;;
         34|35)
           echo B
         ;;
         36|37)
           echo C
         ;;
         38)
           echo D
         ;;
         39|40)
           echo G
         ;;
         41|42)
           echo K
         ;;
         43|44)
           echo O
         ;;
         *)
		   echo -
		 ;;
        esac
}


############################
# Check the user arguments #
############################

if (( $# < 1 || $# > 15 )); then
	echo "Invalid arguments!"
	exit
fi

forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0
h_24hours=1
h_real=1
h_wind=1
h_rain=1
h_snow=1
h_ice=1
h_uv=1
h_cloud=1
h_humid=1
h_dew=1
h_visib=1

for i in $*
	do
		if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 && $i != -h_12h && $i != -h_no_real && $i != -h_no_wind && $i != -h_no_rain && $i != -h_no_snow && $i != -h_no_ice && $i != -h_no_uv && $i != -h_no_cloud && $i != -h_no_humid && $i != -h_no_dew && $i != -h_no_visib ]]; then
			echo "Invalid arguments!"
			exit
		fi
		case $i in
			-f)
				forecast0=1
			;;
			-f2015)
				forecast2015=1
			;;
			-f2016)
				forecast2016=1
			;;
			-h)
				hourly0=1
			;;
			-h2015)
				hourly2015=1
			;;
			-h2016)
				hourly2016=1
			;;
			-h_12h)
				h_24hours=0
			;;
			-h_no_real)
				h_real=0
			;;
			-h_no_wind)
				h_wind=0
			;;
			-h_no_rain)
				h_rain=0
			;;
			-h_no_snow)
				h_snow=0
			;;
			-h_no_ice)
				h_ice=0
			;;
			-h_no_uv)
				h_uv=0
			;;
			-h_no_cloud)
				h_cloud=0
			;;
			-h_no_humid)
				h_humid=0
			;;
			-h_no_dew)
				h_dew=0
			;;
			-h_no_visib)
				h_visib=0
			;;
		esac
	done

if [[ $forecast0 == 1 ]]; then
	forecast2015=0
	forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
	hourly2015=0
	hourly2016=0
fi


last_number=$(echo $address|sed 's/^.*\///')


#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then

	#function: convert_time
	convert_time ()
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		minutes=$(echo $1|awk -F ":| " '{print $2}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
		if [[ $am_or_pm == "" ]]; then
			echo $1
			return 0
		elif [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:$minutes
		echo $time_24
	}

	#function: test_wind
	test_wind () {
	    case $1 in
	         CLM)
	           echo -
	         ;;
	         S)
	           echo 1
	         ;;
	         SSW)
	           echo 2
	         ;;
	         SW)
	           echo 3
	         ;;
	         WSW)
	           echo 4
	         ;;
	         W)
	           echo 5
	         ;;
	         WNW)
	           echo 6
	         ;;
	         NW)
	           echo 7
	         ;;
	         NNW)
	           echo 8
	         ;;
	         N)
	           echo 9
	         ;;
	         NNE)
	           echo :
	         ;;
	         NE)
	           echo ;
	         ;;
	         ENE)
	           echo \<
	         ;;
	         E)
	           echo =
	         ;;
	         ESE)
	           echo \>
	         ;;
	         SE)
	           echo ?
	         ;;
	         SSE)
	           echo @
	         ;;
	    esac
	}

	curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o /media/5/Conky/Accuweather_conky_script/curr_cond_raw "$curr_addr"

	daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o /media/5/Conky/Accuweather_conky_script/daily_forecast "$daily_addr"

	if [[ $forecast2015 == 1 ]]; then
		rm /media/5/Conky/Accuweather_conky_script/forecast_2015/forecast_*.png
	fi
	if [[ $forecast2016 == 1 ]]; then
		rm /media/5/Conky/Accuweather_conky_script/forecast_2016/forecast_*.png
	fi

	#current conditions
	if [[ -s /media/5/Conky/Accuweather_conky_script/curr_cond_raw ]]; then
		sed '/conditions-card card panel conditions/,/class="card-button "/!d' /media/5/Conky/Accuweather_conky_script/curr_cond_raw > /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		sed -i -e '/\.svg"\|&#xB0\|phrase\|: /!d' -e '/style="transform: /d' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		sed -i -e 's/^.*weathericons\///' -e 's/\.svg.*$//' -e 's/&#xB0.*$//g' -e 's/^[ ,\t]*//g' -e 's/^.*phrase">//' -e 's/<\/div>//' -e 's/: /\n/g' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		sed -i -e '20s/\(.*\) /\1\n/' -e 's/ at /\n/g' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		sed -n 1,3p /media/5/Conky/Accuweather_conky_script/curr_cond_temp > /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 5p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 9,10p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 14p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 18p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 7p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 20p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 16p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 22p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond

		moonrise=1
		moonset=1
		sed '/<div class="panel-1"><div class="sunrise">/,/<div class="temp-history">/!d' /media/5/Conky/Accuweather_conky_script/curr_cond_raw > /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		if (( $(grep '"section-header">Moonrise' /media/5/Conky/Accuweather_conky_script/curr_cond_temp|wc -l) == 0 )); then
			moonrise=0
		fi
		if (( $(grep '"section-header">Moonset' /media/5/Conky/Accuweather_conky_script/curr_cond_temp|wc -l) == 0 )); then
			moonset=0
		fi
		sed -i '/:[0-9][0-9]/!d' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		sed -i -e 's/^.*content">//g' -e 's/^[ ,\t]*//g' -e 's/<\/span>//g' -e 's/ hr//g' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		if (( $moonrise == 0 )); then
			sed -i '3s/$/\n-/' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
			sed -i '5s/$/\n-/' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		fi
		if (( $moonset == 0 )); then
			sed -i '4s/$/\n-/' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
			sed -i '5s/$/\n-/' /media/5/Conky/Accuweather_conky_script/curr_cond_temp
		fi
		sed -n 1,3p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sed -n 4,6p /media/5/Conky/Accuweather_conky_script/curr_cond_temp >> /media/5/Conky/Accuweather_conky_script/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> /media/5/Conky/Accuweather_conky_script/curr_cond
		rm /media/5/Conky/Accuweather_conky_script/curr_cond_temp

	    image=$(sed -n 1p /media/5/Conky/Accuweather_conky_script/curr_cond)
	    echo $(test_image $image) >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 14p /media/5/Conky/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 15p /media/5/Conky/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 18p /media/5/Conky/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> /media/5/Conky/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 19p /media/5/Conky/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> /media/5/Conky/Accuweather_conky_script/curr_cond
		wind=$(sed -n 5p /media/5/Conky/Accuweather_conky_script/curr_cond)
		echo $(test_wind $wind) >> /media/5/Conky/Accuweather_conky_script/curr_cond
        if (( $(sed -n 14p /media/5/Conky/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '14s/^/0/' /media/5/Conky/Accuweather_conky_script/curr_cond
		fi
		if (( $(sed -n 15p /media/5/Conky/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '15s/^/0/' /media/5/Conky/Accuweather_conky_script/curr_cond
		fi
		if (( $(sed -n 18p /media/5/Conky/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '18s/^/0/' /media/5/Conky/Accuweather_conky_script/curr_cond
		fi
		if (( $(sed -n 19p /media/5/Conky/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '19s/^/0/' /media/5/Conky/Accuweather_conky_script/curr_cond
		fi
	    if [[ $forecast2015 == 1 ]]; then
			cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 1p /media/5/Conky/Accuweather_conky_script/curr_cond).png /media/5/Conky/Accuweather_conky_script/forecast_2015/forecast_0.png
			cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 5p /media/5/Conky/Accuweather_conky_script/curr_cond).png /media/5/Conky/Accuweather_conky_script/forecast_2015/wind_0.png
		fi
		if [[ $forecast2016 == 1 ]]; then
			cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 1p /media/5/Conky/Accuweather_conky_script/curr_cond).png /media/5/Conky/Accuweather_conky_script/forecast_2016/forecast_0.png
			cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 5p /media/5/Conky/Accuweather_conky_script/curr_cond).png /media/5/Conky/Accuweather_conky_script/forecast_2016/wind_0.png
		fi
	fi

	#Daily forecast
	if [[ -s /media/5/Conky/Accuweather_conky_script/daily_forecast ]]; then
		sed -i '/forecast-list-card forecast-card  today/,/card-button centered nav-card next/!d' /media/5/Conky/Accuweather_conky_script/daily_forecast
		sed -i -e 's/^.*weathericons\///g' -e 's/\.svg.*$//g' -e 's/^.*high"> //g' -e 's/^.*low"> \/ //g' -e 's/&#xB0;.*$//g' -e 's/^.*<p>//g' -e 's/<\/p>.*$//g' -e '/<\|>\|class\|href/d' -e 's/^ \|\t*//g' -e '/^$/d' -e '/Precip/d' -e 's/Sun$/Sunday/g' -e 's/Mon$/Monday/g' -e 's/Tue$/Tuesday/g' -e 's/Wed$/Wednesday/g' -e 's/Thu$/Thursday/g' -e 's/Fri$/Friday/g' -e 's/Sat$/Saturday/g' /media/5/Conky/Accuweather_conky_script/daily_forecast
		sed -i '106,$d' /media/5/Conky/Accuweather_conky_script/daily_forecast
		for (( i=3; i<=101; i+=7 ))
		  do
	          image=$(sed -n "${i}"p /media/5/Conky/Accuweather_conky_script/daily_forecast)
	          echo $(test_image $image) >> /media/5/Conky/Accuweather_conky_script/daily_forecast
		  done
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=3; i<=101; i+=7 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/daily_forecast).png /media/5/Conky/Accuweather_conky_script/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/daily_forecast).png /media/5/Conky/Accuweather_conky_script/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
fi


#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################

if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then

	#Hourly: 24h

	if [[ $hourly2015 == 1 ]]; then
		rm /media/5/Conky/Accuweather_conky_script/hourly_2015/hourly_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm /media/5/Conky/Accuweather_conky_script/hourly_2016/hourly_*.png
	fi

	hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
	hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=2
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o /media/5/Conky/Accuweather_conky_script/hourly_raw1 "$hourly_addr1"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o /media/5/Conky/Accuweather_conky_script/hourly_raw2 "$hourly_addr2"

	if [[ -s /media/5/Conky/Accuweather_conky_script/hourly_raw1 && -s /media/5/Conky/Accuweather_conky_script/hourly_raw2 ]]; then
		sed -i '/<div class=\"hourly-wrapper\">/,/day=/!d' /media/5/Conky/Accuweather_conky_script/hourly_raw1
		sed -i -e 's/\.svg.*$//g' -e 's/^.*weathericons\///g' -e '/div\|=/d' -e 's/<p>/<p>\n/g' -e 's/<\/p>/\n<\/p>/g' /media/5/Conky/Accuweather_conky_script/hourly_raw1
		sed -i -e '/<\|>/d' -e '/^[ ,\t]*$/d' -e 's/^[ ,\t]*//g' -e 's/&#xB0;//g' -e 's/ km\/h//g' -e 's/ mph//g' -e 's/ (/\n/g' -e 's/)//g' /media/5/Conky/Accuweather_conky_script/hourly_raw1

		sed -i '/<div class=\"hourly-wrapper\">/,/day=/!d' /media/5/Conky/Accuweather_conky_script/hourly_raw2
		sed -i -e 's/\.svg.*$//g' -e 's/^.*weathericons\///g' -e '/div\|=/d' -e 's/<p>/<p>\n/g' -e 's/<\/p>/\n<\/p>/g' /media/5/Conky/Accuweather_conky_script/hourly_raw2
		sed -i -e '/<\|>/d' -e '/^[ ,\t]*$/d' -e 's/^[ ,\t]*//g' -e 's/&#xB0;//g' -e 's/ km\/h//g' -e 's/ mph//g' -e 's/ (/\n/g' -e 's/)//g' /media/5/Conky/Accuweather_conky_script/hourly_raw2
		cat /media/5/Conky/Accuweather_conky_script/hourly_raw1 /media/5/Conky/Accuweather_conky_script/hourly_raw2 > /media/5/Conky/Accuweather_conky_script/hourly

		sed -i '769,$d' /media/5/Conky/Accuweather_conky_script/hourly

		for (( i=3; i<=768; i+=32 ))
		  do
	          image=$(sed -n "${i}"p /media/5/Conky/Accuweather_conky_script/hourly)
	          echo $(test_image $image) >> /media/5/Conky/Accuweather_conky_script/hourly
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=3; i<=768; i+=32 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly).png /media/5/Conky/Accuweather_conky_script/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp /media/5/Conky/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly).png /media/5/Conky/Accuweather_conky_script/hourly_2016/hourly_$j.png
				fi
		    	((j++))
			  done
		fi
	fi


	# Full info, next 24h - altogether24 file
	rm /media/5/Conky/Accuweather_conky_script/{altogether24,altogether24_2015,altogether24_2016}

	#TIME
	echo "\${color1}TIME\${goto 100}$(sed -n 1p /media/5/Conky/Accuweather_conky_script/hourly)" > /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=160
	for (( i=33; i<=384; i+=32 ))
		do
			time=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "1s/$/\${goto $jump_to}$time/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=385; i<=768; i+=32 ))
			do
				time=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "1s/$/\${goto $jump_to}$time/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	sed -i '1s/$/\n\n\n/' /media/5/Conky/Accuweather_conky_script/altogether24

	#FORECAST
	echo "\${color1}FORECAST\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=5; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=389; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly|awk '{print $1}'|cut -c1-8)
				sed -i "5s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi
	sed -i '5s/$/\n/' /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=5; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=389; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly|awk '{print $2}'|cut -c1-8)
				sed -i "6s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#TEMPERATURE
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "TEMPER.\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=4; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "8s/$/\${goto $jump_to}$messg°/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=388; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "8s/$/\${goto $jump_to}$messg°/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#REAL FEEL
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "REAL FEEL\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=9; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "10s/$/\${goto $jump_to}$messg°/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=393; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "10s/$/\${goto $jump_to}$messg°/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#WIND
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "WIND\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=11; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "12s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=395; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "12s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#RAIN
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "RAIN\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=24; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "14s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=408; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "14s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#SNOW
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "SNOW\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=26; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "16s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=410; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "16s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#ICE
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "ICE\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=28; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "18s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=412; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "18s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#UV INDEX
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "UV INDEX\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=19; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "20s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=403; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "20s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#CLOUD COVER
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "CLOUD COV.\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=22; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "22s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=406; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "22s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#HUMIDITY
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "HUMIDITY\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=15; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "24s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=399; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "24s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#DEW POINT
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "DEW POINT\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=17; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "26s/$/\${goto $jump_to}$messg°/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=401; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "26s/$/\${goto $jump_to}$messg°/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#VISIBILITY
	echo "\${color1}\${goto 100}\${hr 1}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	echo "VISIBILITY\${color}" >> /media/5/Conky/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=30; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
			sed -i "28s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=414; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)
				sed -i "28s/$/\${goto $jump_to}$messg/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#IMAGES
	if [[ $hourly0 == 0 ]]; then
		if [[ $hourly2015 == 1 ]]; then
					jump_to=75
					cp /media/5/Conky/Accuweather_conky_script/altogether24 /media/5/Conky/Accuweather_conky_script/altogether24_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
					jump_to=85
					cp /media/5/Conky/Accuweather_conky_script/altogether24 /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
		rm /media/5/Conky/Accuweather_conky_script/altogether24
		hours=$((12+$h_24hours*12))
		for (( i=1; i<=$hours; i+=1 ))
			do
				if [[ $hourly2015 == 1 ]]; then
					sed -i "4s/$/\${image \/media/5/Conky\/Accuweather_conky_script\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" /media/5/Conky/Accuweather_conky_script/altogether24_2015
				fi
				if [[ $hourly2016 == 1 ]]; then
					sed -i "4s/$/\${image \/media/5/Conky\/Accuweather_conky_script\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" /media/5/Conky/Accuweather_conky_script/altogether24_2016
				fi
				((jump_to+=60))
			done
	fi

	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' /media/5/Conky/Accuweather_conky_script/altogether24
		jump_to=95
		for (( i=769; i<=780; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)/" /media/5/Conky/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
		if [[ $h_24hours == 1 ]]; then
			for (( i=781; i<=792; i+=1 ))
				do
					sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p /media/5/Conky/Accuweather_conky_script/hourly)/" /media/5/Conky/Accuweather_conky_script/altogether24
					((jump_to+=60))
				done
		fi
		sed -i '4s/$/\${font}/' /media/5/Conky/Accuweather_conky_script/altogether24
		sed -i '2,3d' /media/5/Conky/Accuweather_conky_script/altogether24
	fi

	#DELETE UNWANTED VARIABLES
	if [[ $h_real == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '7,8s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_wind == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_rain == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_snow == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi


	if [[ $h_ice == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi


	if [[ $h_uv == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_cloud == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_humid == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_dew == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_visib == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' /media/5/Conky/Accuweather_conky_script/altogether24_2016
		fi
	fi

	sed -i '/VOID/d' /media/5/Conky/Accuweather_conky_script/{altogether24,altogether24_2015,altogether24_2016}

fi

#Resume weather conky
pkill -CONT -xf "$weather_conky_launch_command"

=====================================
Also would it not be easier to have all of these:

/media/5/Conky/Accuweather_conky_script

setup as a variable:

thefiles="/media/5/Conky/Accuweather_conky_script"

EXAMPLE:

		sed -i '/:[0-9][0-9]/!d' $thefiles/curr_cond_temp
		sed -i -e 's/^.*content">//g' -e 's/^[ ,\t]*//g' -e 's/<\/span>//g' -e 's/ hr//g' $thefiles/curr_cond_temp
		if (( $moonrise == 0 )); then
			sed -i '3s/$/\n-/' $thefiles/curr_cond_temp
			sed -i '5s/$/\n-/' $thefiles/curr_cond_temp
		fi
		if (( $moonset == 0 )); then
			sed -i '4s/$/\n-/' $thefiles/curr_cond_temp
			sed -i '5s/$/\n-/' $thefiles/curr_cond_temp

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3269 2020-03-12 18:37:28

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

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

Sorry for being late guys, lot of work the last couple of days...

unklar wrote:

Teo,  smile
can you possibly conky "brake"?

Conky is just too fast for the work of your script.
I notice this again and again especially at the start of Conky and the changes of "Today", "Tonight", "Tomorrow" etc. The complete data is only available at the second run.
So, after 8.333333... minutes.

Please, it's just a question to your expertise.   cool

I'm well aware of this unklar and I admit that I have yet to find a solution. It happens to me as well.
It's a nuisance, especially on the first run when you have to wait until the first conky update to see a full conky, but I've grown accustomed to it.
I'll try to investigate it a bit more, you know what they say, once you get used to it it doesn't bother you any more.
So it's good that you remind me that it's a real problem...

@S11
When you run the accuweather script on your terminal without any arguments it will return the error code you get.
Otherwise, I don't see any problem with your scripts, everything should work fine.

As for the path being setup in a variable, this would totally break git I think, you know, whenever you update.


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

#3270 2020-03-12 22:11:04

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

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

Hello, my friend Sector11,
Hello, El Conkystador  angel

with great pleasure I can tell you, a splendid weather conky has been created. Thanks to your excellent ideas, I was able to complete the work without any problems. It was really not difficult because of your preparations. clapping.gif
I thank you!

CHIMO!

2020-03-12-20-27-18_scrot.th.png 2020-03-12-20-26-51_scrot.th.png

BL-Weather.com  wink

-- https://forums.bunsenlabs.org/viewtopic.php?pid=1545#p1545
-- after a design idea from 2015 by @Sector11
-- https://forums.mageia.org/de/download/file.php?id=1352&mode=view
-- @unklar 2020-03-10
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
	background = false,--true,
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	own_window_class = 'Conky',
--	own_window_color = '000000',
--	own_window_argb_visual = true,
--	own_window_argb_value = 200,

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,
	no_buffers = true,

-- fiddle with window
	use_spacer = 'none', --right',left',
	use_xft = true,
	xftalpha = 1.0,
	font = 'monofur:size=8',
	uppercase = false,

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

-- Minimum size of text area
	minimum_width = 205, minimum_height = 740,
	maximum_width = 205,

	override_utf8_locale = true,

	draw_shades = false, --true,
	draw_outline = false, --true,
	draw_borders = false,
	stippled_borders = 0,
	draw_graph_borders = false,
	border_inner_margin = 10,
	border_outer_margin = 0,
	border_width = 0,

-- Default colors and also border colors, grey90 == #e5e5e5
	default_color = 'ffffff',
	color1 = 'ffffff', --949494',
	color2 = 'cyan',
	color3 = 'ed2323',

-- 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 = -5, -- ←|→
	gap_y = 80, -- ↑|↓

--imlib_cache_size = 0,
	imlib_cache_flush_interval = 900,
	max_user_text = 48552,

};

conky.text = [[${image $HOME/bin/com5-20.png -p -10,-10 -s 205x740}\
${color1}${voffset -6}${font monofur:size=12}${alignc 20}WETTER ${color}${texeci 500 bash $HOME/Weather_com_conky_script/weather_com}
${image $HOME/Weather_com_conky_script/Forecast_Images/now.png -p 5,90 -s 40x40}\
${font monofur:size=10}${color1}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days} ${color}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/now}°C(${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/now}°C)
${font}${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/10days}
${goto 50}MOND${color}${alignr 40} ${texeci 600 sed -n '17p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}${font}Hoch / Tief${color}${alignr 40} ${texeci 600 sed -n '4p' $HOME/Weather_com_conky_script/now}° / ${texeci 600 sed -n '5p' $HOME/Weather_com_conky_script/now}°
${goto 50}${color1}WIND${color}${alignr 40} ${texeci 600 sed -n '7p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}UV INDEX${color}${alignr 40} ${texeci 600 sed -n '6p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Sonnenaufgang${color}${alignr 40} ${texeci 600 sed -n '13p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Sonnenuntergang${color}${alignr 40} ${texeci 600 sed -n '15p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Luftdruck${color}${alignr 40} ${texeci 600 sed -n '10p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Mondaufgang${color}${alignr 40} ${texeci 600 sed -n '19p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Monduntergang${color}${alignr 40} ${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Fernsicht${color}${alignr 40} ${texeci 600 sed -n '11p' $HOME/Weather_com_conky_script/now}
${goto 50}${color1}Rel.Luftfeuchte${color}${alignr 40} ${texeci 600 sed -n '8p' $HOME/Weather_com_conky_script/now} %
${goto 50}${color1}Taupunkt${color}${alignr 40} ${texeci 600 sed -n '9p' $HOME/Weather_com_conky_script/now} °C
${color3}${swapbar 0,165}${color}
${image $HOME/1_pixel_images/white_1.png -p 90,202 -s 1x335}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h2.png -p 105,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h3.png -p 105,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h4.png -p 105,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h5.png -p 105,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h6.png -p 105,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h7.png -p 105,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h8.png -p 105,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h9.png -p 105,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/h10.png -p 105,505 -s 30x30}\
${if_match "${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}" == "Heute"}
${goto 50}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 160}${tztime GMT-2 %H} h
${goto 45}${texeci 600 sed -n '71p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 150}${tztime GMT-3 %H} h
${goto 45}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 150}${tztime GMT-4 %H} h
${goto 45}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 150}${tztime GMT-5 %H} h
${goto 45}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 150}${tztime GMT-6 %H} h
${goto 45}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 150}${tztime GMT-7 %H} h
${goto 45}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 150}${tztime GMT-8 %H} h
${goto 45}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 150}${tztime GMT-9 %H} h
${goto 45}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 150}${tztime GMT-10 %H} h
${goto 45}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color3}${swapbar 0,165}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${else}
${goto 50}${execi 3600 date  --date='1 day' '+%a. %e'}${goto 150}${tztime GMT-2 %H} h
${goto 45}${texeci 600 sed -n '40p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '3p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='2 day' '+%a. %e'}${goto 150}${tztime GMT-3 %H} h
${goto 45}${texeci 600 sed -n '133p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='3 day' '+%a. %e'}${goto 150}${tztime GMT-4 %H} h
${goto 45}${texeci 600 sed -n '195p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '61p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='4 day' '+%a. %e'}${goto 150}${tztime GMT-5 %H} h
${goto 45}${texeci 600 sed -n '257p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '90p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='5 day' '+%a. %e'}${goto 150}${tztime GMT-6 %H} h
${goto 45}${texeci 600 sed -n '319p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '119p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='6 day' '+%a. %e'}${goto 150}${tztime GMT-7 %H} h
${goto 45}${texeci 600 sed -n '381p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '148p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='7 day' '+%a. %e'}${goto 150}${tztime GMT-8 %H} h
${goto 45}${texeci 600 sed -n '443p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '177p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='8 day' '+%a. %e'}${goto 150}${tztime GMT-9 %H} h
${goto 45}${texeci 600 sed -n '505p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '206p' $HOME/Weather_com_conky_script/hourly}°
${color1}${swapbar 0,165}
${goto 50}${execi 3600 date  --date='9 day' '+%a. %e'}${goto 150}${tztime GMT-10 %H} h
${goto 45}${texeci 600 sed -n '567p' $HOME/Weather_com_conky_script/10days}°${goto 150}${texeci 600 sed -n '235p' $HOME/Weather_com_conky_script/hourly}°
${image $HOME/Weather_com_conky_script/Forecast_Images/d2.png -p 10,210 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d3.png -p 10,252 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d4.png -p 10,288 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d5.png -p 10,325 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d6.png -p 10,360 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d7.png -p 10,400 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d8.png -p 10,435 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d9.png -p 10,470 -s 30x30}\
${image $HOME/Weather_com_conky_script/Forecast_Images/d10.png -p 10,505 -s 30x30}\
${color3}${swapbar 0,165}${color}
${font monofur:size=10}${texeci 600 sed -n '1p' $HOME/Weather_com_conky_script/10days}${font}
${texeci 600 sed -n '21p' $HOME/Weather_com_conky_script/10days | fold -s35}
${font monofur:size=10}${texeci 600 sed -n '32p' $HOME/Weather_com_conky_script/10days|tr a-z A-Z}${font}
${color}${texeci 600 sed -n '52p' $HOME/Weather_com_conky_script/10days | fold -s35}
${endif}

]];

Offline

#3271 2020-03-12 22:23:50

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

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

TeoBigusGeekus wrote:

...
So it's good that you remind me that it's a real problem...

Thanks Teo, for your clear opinion. I will always be here if you need a tester.   wink


Sector11 wrote:

last: weather_com

 12 Mar 20 @ 13:25:01 ~
   $ /media/5/Conky/Weather_com_conky_script/weather_com
rm: cannot remove '/media/5/Conky/Weather_com_conky_script/Forecast_Images/*.svg': No such file or directory
 
 12 Mar 20 @ 13:25:10 ~
   $ 

Tell me if you can help and what you might need and you got it.

This is related to the problem mentioned above. Conky is (still) too fast for Teo's script.  big_smile

Offline

#3272 2020-03-14 00:43:01

manuel-909
Member
Registered: 2017-10-09
Posts: 93

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

try this my friend open synaptic serch inxscape click and mark recommended for installation python-scour do the same to imagemagick-6.q16 install libmagickcore-6.q16-6-extra....

Offline

#3273 2020-03-14 18:26:54

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

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

TeoBigusGeekus wrote:

Sorry for being late guys, lot of work the last couple of days...

I was going into panic mode here.

I had inadvertently turned off notifications.

I was thinking CV-19 got Teo. PANIC  My friend ... MORE PANIC ....

SOOOOOOOOOOOO glad to see you.

Work is good - Work is Great news!

Now let me continue about conky stuff and read the rest now that the priorities are out of the way.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3274 2020-03-14 18:49:17

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

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

@ unklar

Der Konkystador und Freund unklar

Awesome ... so glad I could help.
Had to use a combination of tricks picked up from other problems.
They worked quite well together, so believe me, it was my pleasure.
I learned as I tested and tweaked things for that conky.

CHIMO!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3275 2020-03-14 19:34:15

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

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

TeoBigusGeekus wrote:

@S11
When you run the accuweather script on your terminal without any arguments it will return the error code you get.
Otherwise, I don't see any problem with your scripts, everything should work fine.

Face palm!  DUH!

Of course I knew that I just forgot I knew that!

As for the path being setup in a variable, this would totally break git I think, you know, whenever you update.

Well, it would break mine anyway as I put them in /media/5/Conky/

So would would it hurt to that in my scripts?
Any script or place it will not work that you can think of?

let's face it:

accufiles="/media/5/Conky/Accuweather_conky_script"

		sed '/conditions-card card panel conditions/,/class="card-button "/!d' /media/5/Conky/Accuweather_conky_script/curr_cond_raw > /media/5/Conky/Accuweather_conky_script/curr_cond_temp

		sed '/conditions-card card panel conditions/,/class="card-button "/!d' $accufiles/curr_cond_raw > $accufiles/curr_cond_temp

makes for shorter cleaner line - see the second line.

Plus I have to rename the directory anyway from:

/media/5/Conky/Accuweather_conky_script_master/

to

/media/5/Conky/Accuweather_conky_script/

to match the code in the script:

$HOME/Accuweather_conky_script/curr_cond

so:
accufiles
moonfiles
wcomfiles

see a natural for me.

You know me, I gotta be different  big_smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

Board footer

Powered by FluxBB