Conky 2019

Bureaux,conky et autres personnalisations esthétiques.
Avatar du membre
ato-mike
Messages : 131
Enregistré le : mer. 5 oct. 2016 15:42
Localisation : Bruges-Capbis-Mifaget

Re: Conky 2019

Message par ato-mike »

Dernier message de la page précédente :

Merci t'es un chef
Pc : Lenovo ideapad 330-17AST
Part 1 :DE: Linux Mint 22.3 Cinnamon 6.6.9 / Xfce 4.18
Part 1 :Noyau : 7.0.0.28
Part 2 :DE: CachyOs Cosmic 1.5 / KDE Plasma 6.7.3
Part 2 :Noyau : 7.1.6-1
CPU : AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G × 2
Ram : 8Gb DDR4 2133
GPU : AMD Radeon R4 Graphics [Integrated]
Avatar du membre
loutch
Messages : 525
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

de rien ,amuse toi bien :D

J'ai modifié le script parce que j'utilise une adresse avec /fr/Fr et pas une avec en/FR


@+
HP Pavilion g 7 1357 sf avec ssd Xia xfce Mageia 9 xfce
Asus ROG avec ubuntu 18.04 xfce et ubuntu 24.04 xfce

Image
Avatar du membre
ato-mike
Messages : 131
Enregistré le : mer. 5 oct. 2016 15:42
Localisation : Bruges-Capbis-Mifaget

Re: Conky 2019

Message par ato-mike »

Merci Loutch voilà le résultat
Image
Pc : Lenovo ideapad 330-17AST
Part 1 :DE: Linux Mint 22.3 Cinnamon 6.6.9 / Xfce 4.18
Part 1 :Noyau : 7.0.0.28
Part 2 :DE: CachyOs Cosmic 1.5 / KDE Plasma 6.7.3
Part 2 :Noyau : 7.1.6-1
CPU : AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G × 2
Ram : 8Gb DDR4 2133
GPU : AMD Radeon R4 Graphics [Integrated]
Avatar du membre
loutch
Messages : 525
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

Image

Bienvenu jeune "conkystador"

Ça en jette

Image
HP Pavilion g 7 1357 sf avec ssd Xia xfce Mageia 9 xfce
Asus ROG avec ubuntu 18.04 xfce et ubuntu 24.04 xfce

Image
Avatar du membre
loutch
Messages : 525
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

Hello


un de mes vieux ensemble de conky mis en version 1.10

pas de lecteurs jouant

Image

avec audacious

Image

avec radiotray-ng

Image

conkyrcs

time & weather

Code : Tout sélectionner


conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=9',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 470, minimum_height = 170,
        maximum_width = 470,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_outline_color = 'white',
	alignment = 'top_right',
	gap_x = 30,
	gap_y = 10,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#ffffff',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[
${execi 180 bash $HOME/1_accuweather/1_accuweather -f}
${font Liberation Sans:size=26}${alignc 20}${time %a %d %b %H:%M}${font}
${goto 70}----------------------------------------------------------------------------
${goto 30}Aujourdh'ui ${goto 110}demain\
${goto 190}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $2}'`}\
${goto 270}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $2}'`}${voffset -14} 
${goto 360}${execi 3600 echo `date --date="4 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="4 day" | awk '{print $2}'`}
${font conkyweather:size=30}${voffset -30}
${goto 40}${execi 600  sed -n '601p' $HOME/1_accuweather/daily_forecast}\
${goto 110}${execi 600  sed -n '602p' $HOME/1_accuweather/daily_forecast}\
${goto 190}${execi 600  sed -n '603p' $HOME/1_accuweather/daily_forecast}\
${goto 270}${execi 600  sed -n '604p' $HOME/1_accuweather/daily_forecast}\
${goto 360}${execi 600  sed -n '605p' $HOME/1_accuweather/daily_forecast}${font}
${goto  40}${texeci 600 sed -n '68p' $HOME/1_accuweather/daily_forecast}°/${texeci 600 sed -n '47p' $HOME/1_accuweather/daily_forecast}°\
${goto 110}${texeci 600 sed -n '108p' $HOME/1_accuweather/daily_forecast}°/${texeci 600 sed -n '87p' $HOME/1_accuweather/daily_forecast}°\
${goto 190}${texeci 600 sed -n '148p' $HOME/1_accuweather/daily_forecast}°/${texeci 600 sed -n '127p' $HOME/1_accuweather/daily_forecast}°\
${goto 270}${texeci 600 sed -n '188p' $HOME/1_accuweather/daily_forecast}°/${texeci 600 sed -n '167p' $HOME/1_accuweather/daily_forecast}°\
${goto 360}${texeci 600 sed -n '228p' $HOME/1_accuweather/daily_forecast}°/${texeci 600 sed -n '207p' $HOME/1_accuweather/daily_forecast}°\
${lua fDrawImage ~/.conky/diamond/pix/bg1.png 0 0 440 180 }
]];

cpu

Code : Tout sélectionner


conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=9',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 470, minimum_height = 280,
        maximum_width = 470,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_outline_color = 'white',
	alignment = 'top_right',
	gap_x = 00,
	gap_y = 210,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#ffffff',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[
${voffset 30}${offset 50}Cpu1:${color DDF2FF} ${offset 3}${cpu cpu1}%${alignr 90}${voffset -5}${color #DBDBDB}${cpugraph cpu1 20,240 f1f1f1 DBDBDB}${color}
${voffset -3}${offset 50}CPU Step: ${alignr 80}${color DDF2FF}${freq_g} GHz${color}
${voffset 12}${offset 50}Cpu2:${color DDF2FF} ${offset 3}${cpu cpu2}%${alignr 90}${voffset -9}${color #DDF2FF}${cpugraph cpu2 20,240 f1f1f1 DBDBDB}${color}
${voffset -5}${alignc 10}---------------------------------------------------------------------------------
${voffset 15}${offset 50}RAM: ${alignr 80} $mem/${color #DDF2FF}$memmax${color}
${offset 50}${color #DDF2FF}${membar 5,340}${color}
${offset 50}Swap: ${alignr 80} $swap / ${color #DDF2FF}$swapmax${color}
${offset 50}${color #DDF2FF}${swapbar 5,340}${color}
${offset 50}ROOT:${color #DDF2FF} ${alignr 80} ${fs_free /} / ${fs_size /}
${offset 50}${fs_bar 5,340 /}${color}
${lua fDrawImage ~/.conky/diamond/pix/bg1.png 0 0 439 270}
]];

network

Code : Tout sélectionner


conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=9',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 470, minimum_height = 170,
        maximum_width = 470,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_outline_color = 'white',
	alignment = 'top_right',
	gap_x = 30,
	gap_y = 470,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#ffffff',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[

${offset 25}${font Liberation Sans:size=11}SSID:${font} ${wireless_essid wlo1} ${goto 190}${font Liberation Sans:size=11}Sortant:${font} ${upspeed wlo1}
${offset 25}${font Liberation Sans:size=11}Bitrate:${font} ${wireless_bitrate wlo1} ${goto 190}${font Liberation Sans:size=11}Entrant:${font} ${downspeed wlo1}
${offset 25}${font Liberation Sans:size=11}Local:${font} ${addr wlo1} ${goto 190}${font Liberation Sans:size=11}Signal:${font} ${wireless_link_qual_perc wlo1}%
${lua fDrawImage ~/.conky/diamond/pix/bg1.png  0 0 440 102}
${if_match "${wireless_link_qual_perc wlo1}"<"1"} ${lua fDrawImage ~/.conky/diamond/pix/nonetwork.png  300 25 45 45}${else}
${if_match "${wireless_link_qual_perc wlo1}"<"20"}${lua fDrawImage ~/.conky/diamond/pix/networklow.png 300 25 45 45}${else}
${if_match "${wireless_link_qual_perc wlo1}"<"50"}${lua fDrawImage ~/.conky/diamond/pix/networkmid.png 300 25 45 45}${else}
${if_match "${wireless_link_qual_perc wlo1}"<"80"}${lua fDrawImage ~/.conky/diamond/pix/wlan80.png     300 25 45 45}${else}
${lua fDrawImage ~/.conky/diamond/pix/networkhigh.png 300 25 45 45}${endif}${endif}${endif}${endif}

]];
audacious

Code : Tout sélectionner


conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=9',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 470, minimum_height = 280,
        maximum_width = 470,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_outline_color = 'white',
	alignment = 'top_right',
	gap_x = 30,
	gap_y = 580,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#ffffff',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[${if_running audacious}
${execi 3 ~/.conky/audacious/scripts/cover.sh}
${voffset -40}${font GE Inspira :size=12}
${goto 160}${execi 3 audtool current-song-tuple-data artist}${font}
${goto 160}${execi 3 audtool current-song-tuple-data title}
${goto 160}${execi 3 audtool current-song-tuple-data album}
${voffset 10}${goto 160}${execi 1 audtool current-song-output-length}  ${goto 358}${execi 1 audtool current-song-length}\
${goto 184}${execbar 2, 168 expr 100 \* $(audtool --current-song-output-length-seconds) \/ $(audtool --current-song-length-seconds)}
${lua fDrawImage ~/.conky/diamond/pix/bg1.png  0 0 440 102}
${lua fDrawImage ~/.conky/audacious/audacious.png 44 14 68 70}
${else}
${if_running radiotray-ng}
${texeci 3 ~/.conky/radiotrayng/pochette.sh}${lua fDrawImage ~/.conky/diamond/pix/bg1.png  0 0 440 102}
${voffset -36}${alignc -80}${font GE Inspira:size=12}${execi 5 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}$font                                                  
${voffset 33}${alignc -20}${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.artist'}
             ${alignc -20}${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.title'}

${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "RTL"}            ${lua fDrawImage ~/.conky/radiotrayng/logos/rtl.png 222 32 50 50}         ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "Hotmixradio 80"} ${lua fDrawImage ~/.conky/radiotrayng/logos/hotmix80.png 228 28 35 35}    ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "Maxi 80"}        ${lua fDrawImage ~/.conky/radiotrayng/logos/maxi80.png 230 29 35 35}      ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "RTL2"}           ${lua fDrawImage ~/.conky/radiotrayng/logos/rtl2.png 222 32 45 45}        ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "MAGNUM LA RADIO"}${lua fDrawImage ~/.conky/radiotrayng/logos/magnumradio.png 184 26 120 40}${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "radio swiss pop"}${lua fDrawImage ~/.conky/radiotrayng/logos/rspop.png 244 30 35 35}       ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "rfm"}            ${lua fDrawImage ~/.conky/radiotrayng/logos/rfm.png 224 35 45 45}         ${endif}
${endif}${endif}${endif}${endif}${endif}${endif}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.title'}" == ""}${lua fDrawImage ~/.conky/radiotrayng/logos/radio.png 30 10 78 78}
${else}
${lua fDrawImage ~/.conky/diamond/pochette.png 40 14 68 70}${endif}

${else}
${endif}

]];
@+
HP Pavilion g 7 1357 sf avec ssd Xia xfce Mageia 9 xfce
Asus ROG avec ubuntu 18.04 xfce et ubuntu 24.04 xfce

Image
zeb
Messages : 16098
Enregistré le : ven. 19 juin 2015 22:13
Localisation : plus ici

Re: Conky 2019

Message par zeb »

Merci Loutch de ta contribution 8-) ;)
Avatar du membre
ato-mike
Messages : 131
Enregistré le : mer. 5 oct. 2016 15:42
Localisation : Bruges-Capbis-Mifaget

Re: Conky 2019

Message par ato-mike »

Loutch Help...... j'ai l'impression que ça ne fonctionne plus depuis quelques jours ????
Pc : Lenovo ideapad 330-17AST
Part 1 :DE: Linux Mint 22.3 Cinnamon 6.6.9 / Xfce 4.18
Part 1 :Noyau : 7.0.0.28
Part 2 :DE: CachyOs Cosmic 1.5 / KDE Plasma 6.7.3
Part 2 :Noyau : 7.1.6-1
CPU : AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G × 2
Ram : 8Gb DDR4 2133
GPU : AMD Radeon R4 Graphics [Integrated]
Avatar du membre
loutch
Messages : 525
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

Hello


OUi accu commence à mer...... voici mon script modifié fonctionne pour le moment combien de temps encore ......


1_accuweather

Code : Tout sélectionner

#!/usr/bin/env bash

#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="conky -b"


#####################################
# Put your Accuweather address here #
#####################################
#address="http://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="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
address="http://www.accuweather.com/fr/fr/sarreguemines/135050/weather-forecast/135050"

#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 == 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"
	wget -U "Oh hi Mark!" -O $HOME/1_accuweather/curr_cond_raw "$curr_addr"

	daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
	wget -U "Oh hi Mark!" -O $HOME/1_accuweather/daily_forecast "$daily_addr"

	if [[ $forecast2015 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2015/forecast_*.png
	fi
	if [[ $forecast2016 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2016/forecast_*.png
	fi

	#current conditions
	if [[ -s $HOME/1_accuweather/curr_cond_raw ]]; then
		sed -i '/var sunMoon\|var curCon/!d' $HOME/1_accuweather/curr_cond_raw
		sed -i -e 's/^.*extended":{"//' -e 's/^.*moon":{"//' -e 's/,/:/g' -e 's/{"category.*value":/"/' -e 's/}:/":/g' -e 's/icon":/icon":"/' -e 's/:"now/":"now/' -e 's/"};//' -e 's/windDeg":/windDeg":"/' -e 's/°//g' -e 's/":"sun":{/:/' -e 's/"}};//' $HOME/1_accuweather/curr_cond_raw
		awk 'FNR==2 { print $38 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw > $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $46 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $44 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $42 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $34 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw|awk '{ print $3 }' >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $34 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw|awk '{ print $1, $2 }' >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $10 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $26 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $30 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $4 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $2 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $6 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==2 { print $18 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==1 { print $10 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==1 { print $12 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==1 { print $8 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> $HOME/1_accuweather/curr_cond
		awk 'FNR==1 { print $4 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==1 { print $6 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		awk 'FNR==1 { print $2 }' FS="\":\"" $HOME/1_accuweather/curr_cond_raw >> $HOME/1_accuweather/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> $HOME/1_accuweather/curr_cond

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

#AJOUT remplacement des accents
	    sed -i -e 's/\&#234;/ê/g' -e 's/\&#233;/é/g' -e 's/\&#244;/ô/g' -e 's/\&#232;/è/g' -e 's/\&#39;/'"'"'/g' $HOME/1_accuweather/curr_cond
            sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' $HOME/1_accuweather/curr_cond

	#Daily forecast
	if [[ -s $HOME/1_accuweather/daily_forecast ]]; then
		sed -i '/var dailyForecast/!d' $HOME/1_accuweather/daily_forecast
		sed -i -e 's/var dailyForecast = \[//' -e 's/","\|":"/\n/g' -e 's/icon":/icon\n/g' -e 's/,"phrase/\nphrase/g' -e 's/temp":/temp\n/g' -e 's/},"dow/\ndow/g' -e 's/":{"dTemp/\ndTemp/g' $HOME/1_accuweather/daily_forecast
		sed -i -e 's/}}.*,"date/\ndate/' -e 's/}}];//g' -e '1s/^.*$/date/' -e 's/°//g' $HOME/1_accuweather/daily_forecast
	    sed -i '601,$d' $HOME/1_accuweather/daily_forecast
	    for (( i=9; i<=569; i+=40 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/daily_forecast)
	          echo $(test_image $image) >> $HOME/1_accuweather/daily_forecast
		  done
		for (( i=30; i<=590; i+=40 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/daily_forecast)
	          echo $(test_image $image) >> $HOME/1_accuweather/daily_forecast
		  done
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=9; i<=569; i+=40 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/daily_forecast).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/daily_forecast).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
			for (( i=30; i<=590; i+=40 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/daily_forecast).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/daily_forecast).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
                sed -i -e 's/\&#234;/ê/g' -e 's/\&#233;/é/g' -e 's/\&#244;/ô/g' -e 's/\&#232;/è/g' -e 's/\\u0027/'"'"'/g' $HOME/1_accuweather/daily_forecast
            sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' $HOME/1_accuweather/daily_forecast

fi
# icone direction vent 
wind_direction=$(sed -n 1p $HOME/1_accuweather/vent)
if [[ $wind_direction == " S" ]]; then
	cp $HOME/1_accuweather/vents/"02.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "South" ]]; then
	cp $HOME/1_accuweatherI/vents/"02.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SSO" ]]; then
	cp $HOME/1_accuweather/vents/"03.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SO" ]]; then
	cp $HOME/1_accuweather/vents/"04.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "OSO" ]]; then
	cp $HOME/1_accuweather/vents/"05.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "O" ]]; then
	cp $HOME/1_accuweather/vents/"06.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "West" ]]; then
	cp $HOME/1_accuweather/vents/"06.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ONO" ]]; then
	cp $HOME/1_accuweather/vents/"07.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NO" ]]; then
	cp $HOME/1_accuweather/vents/"08.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NNO" ]]; then
	cp $HOME/1_accuweather/vents/"09.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/1_accuweather/vents/"10.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "North" ]]; then
	cp $HOME/1_accuweather/vents/"10.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/1_accuweather/vents/"11.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/1_accuweather/vents/"12.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/1_accuweather/vents/"13.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/1_accuweather/vents/"14.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "East" ]]; then
	cp $HOME/1_accuweather/vents/"14.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/1_accuweather/vents/"15.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/1_accuweather/vents/"16.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/1_accuweather/vents/"17.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
	cp $HOME/1_accuweather/vents/"00.png" $HOME/1_accuweather/Wind1.png
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 $HOME/1_accuweather/hourly_2015/hourly_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm $HOME/1_accuweather/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
	wget -U "Oh hi Mark!" -O $HOME/1_accuweather/hourly_raw1 "$hourly_addr1"
	wget -U "Oh hi Mark!" -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr2"

	if [[ -s $HOME/1_accuweather/hourly_raw1 && -s $HOME/1_accuweather/hourly_raw2 ]]; then
		sed -i '/var hourlyForecast/!d' $HOME/1_accuweather/hourly_raw1
		sed -i -e 's/var hourlyForecast = \[//' -e 's/","\|":"/\n/g' $HOME/1_accuweather/hourly_raw1
		sed -i -e 's/°.*ceiling/\nceiling/g' -e 's/{"extended":{"//' -e 's/":{"category//g' $HOME/1_accuweather/hourly_raw1
		sed -i -e 's/":\|},"/\n/g' -e 's/,"localDate/\nlocaldate/g' -e 's/"}];//g' -e 's/°//g' -e 's/ km\/h\| mph//g' $HOME/1_accuweather/hourly_raw1

		sed -i '/var hourlyForecast/!d' $HOME/1_accuweather/hourly_raw2
		sed -i -e 's/var hourlyForecast = \[//' -e 's/","\|":"/\n/g' $HOME/1_accuweather/hourly_raw2
		sed -i -e 's/°.*ceiling/\nceiling/g' -e 's/{"extended":{"//' -e 's/":{"category//g' $HOME/1_accuweather/hourly_raw2
		sed -i -e 's/":\|},"/\n/g' -e 's/,"localDate/\nlocaldate/g' -e 's/"}];//g' -e 's/°//g' -e 's/ km\/h\| mph//g' $HOME/1_accuweather/hourly_raw2

		cat $HOME/1_accuweather/hourly_raw1 $HOME/1_accuweather/hourly_raw2 > $HOME/1_accuweather/hourly
		sed -i '961,$d' $HOME/1_accuweather/hourly

		for (( i=28; i<=948; i+=40 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=28; i<=948; i+=40 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi
		    	((j++))
			  done
		fi
	fi


	# Full info, next 24h - altogether24 file
	rm $HOME/1_accuweather/{altogether24,altogether24_2015,altogether24_2016}

	#TIME
	echo "\${color1}Heure\${goto 100}$(sed -n 32p $HOME/1_accuweather/hourly)" > $HOME/1_accuweather/altogether24
	jump_to=160
	for (( i=72; i<=472; i+=40 ))
		do
			time=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=512; i<=952; i+=40 ))
			do
				time=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	sed -i '1s/$/\n\n\n/' $HOME/1_accuweather/altogether24

	#FORECAST
	echo "\${color1}Condition\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=34; i<=474; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=514; i<=954; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly|awk '{print $1}'|cut -c1-8)
				sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi
	sed -i '5s/$/\n/' $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=34; i<=474; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=514; i<=954; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly|awk '{print $2}'|cut -c1-8)
				sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#TEMPERATURE
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "\${color1}Temp.\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=40; i<=480; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=520; i<=960; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#REAL FEEL
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "REAL FEEL\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=38; i<=478; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=518; i<=958; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#WIND
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "WIND\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=24; i<=464; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=504; i<=944; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#RAIN
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "RAIN\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=14; i<=454; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=494; i<=934; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#SNOW
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "SNOW\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=16; i<=456; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=496; i<=936; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#ICE
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "ICE\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=12; i<=452; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=492; i<=932; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#UV INDEX
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "UV INDEX\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=20; i<=460; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=500; i<=940; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#CLOUD COVER
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "CLOUD COV.\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=4; i<=444; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=484; i<=924; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#HUMIDITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "HUMIDITY\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=10; i<=450; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=490; i<=930; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#DEW POINT
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "DEW POINT\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=6; i<=446; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=486; i<=926; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

	#VISIBILITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether24
	echo "VISIBILITY\${color}" >> $HOME/1_accuweather/altogether24
	jump_to=100
	for (( i=22; i<=462; i+=40 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
			sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=502; i<=942; i+=40 ))
			do
				messg=$(sed -n ${i}p $HOME/1_accuweather/hourly)
				sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
	fi

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

	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/1_accuweather/altogether24
		jump_to=95
		for (( i=961; i<=972; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly)/" $HOME/1_accuweather/altogether24
				((jump_to+=60))
			done
		if [[ $h_24hours == 1 ]]; then
			for (( i=973; i<=984; i+=1 ))
				do
					sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly)/" $HOME/1_accuweather/altogether24
					((jump_to+=60))
				done
		fi
		sed -i '4s/$/\${font}/' $HOME/1_accuweather/altogether24
		sed -i '2,3d' $HOME/1_accuweather/altogether24
	fi

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

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

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

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


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


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

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

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

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

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

	sed -i '/VOID/d' $HOME/1_accuweather/{altogether24,altogether24_2015,altogether24_2016}
sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' $HOME/1_accuweather/hourly

fi

#Resume weather conky
pkill -CONT -xf "$weather_conky_launch_command"
HP Pavilion g 7 1357 sf avec ssd Xia xfce Mageia 9 xfce
Asus ROG avec ubuntu 18.04 xfce et ubuntu 24.04 xfce

Image
Avatar du membre
ato-mike
Messages : 131
Enregistré le : mer. 5 oct. 2016 15:42
Localisation : Bruges-Capbis-Mifaget

Re: Conky 2019

Message par ato-mike »

Merci Loutch......ça refonctionne :D
Pc : Lenovo ideapad 330-17AST
Part 1 :DE: Linux Mint 22.3 Cinnamon 6.6.9 / Xfce 4.18
Part 1 :Noyau : 7.0.0.28
Part 2 :DE: CachyOs Cosmic 1.5 / KDE Plasma 6.7.3
Part 2 :Noyau : 7.1.6-1
CPU : AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G × 2
Ram : 8Gb DDR4 2133
GPU : AMD Radeon R4 Graphics [Integrated]
Avatar du membre
loutch
Messages : 525
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

:D
HP Pavilion g 7 1357 sf avec ssd Xia xfce Mageia 9 xfce
Asus ROG avec ubuntu 18.04 xfce et ubuntu 24.04 xfce

Image
Avatar du membre
ato-mike
Messages : 131
Enregistré le : mer. 5 oct. 2016 15:42
Localisation : Bruges-Capbis-Mifaget

Re: Conky 2019

Message par ato-mike »

Loutch ...petite question , je n'arrive pas à faire fonctionner le script conky de TeoBigusGeekus j'ai vu que tu étais sur le forum ,
il n'y a pas de fichier curr_cond ou curr_cond_raw etc....le script est intéressant car il va récupérer les infos sur weather.com et non accuweather qui fait c...r en ce moment.
De plus le conky de unklar je le trouve sympa (page 123 ) message au dessus du tien
Merci
Pc : Lenovo ideapad 330-17AST
Part 1 :DE: Linux Mint 22.3 Cinnamon 6.6.9 / Xfce 4.18
Part 1 :Noyau : 7.0.0.28
Part 2 :DE: CachyOs Cosmic 1.5 / KDE Plasma 6.7.3
Part 2 :Noyau : 7.1.6-1
CPU : AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G × 2
Ram : 8Gb DDR4 2133
GPU : AMD Radeon R4 Graphics [Integrated]
Répondre