Conky version 1.10

Bureaux,conky et autres personnalisations esthétiques.
Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Conky version 1.10

Message par loutch »

Hello

Voila j'ouvre un nouveau sujet conky vu que sur certaines distributions comme Sarah et autres il est passé en version 1.10 .

Normalement la nouvelle version lance les anciens conky mais il peut y avoir des ratés surtout s'il y a du lua.

Pour savoir qu'elle version nous avons :

terminal:

Code : Tout sélectionner

conky -v
ce qui donne ceci:

Code : Tout sélectionner

loutch@loutch-HP-Pavilion-g7-Notebook-PC ~ $ conky -v
conky 1.10.1 compiled Wed Jan  6 17:11:44 UTC 2016 for Linux 3.19.0-43-generic x86_64

Compiled in features:

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


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256
@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

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

Re: Conky version 1.10

Message par loutch »

Hello

conky-meteo du site accuweather
il faut Deux packs de ThéoBiGus pris ici :

https://forums.bunsenlabs.org/viewtopic.php?id=189

1b1)Accuweather - Images - 1b1_29-10-15 http://bit.ly/1b1_29-10-15

et

1c)Accuweather Hourly Forecast - 1c_14-3-16 http://bit.ly/1c_14-3-16

@ décompresser dans /home/......

Mon tarz pour les icones du vent http://www.mageialinux-online.org/upload/vents_tar.gz

@ décompresser dans ~/1b_accuweather_images


le conkyrc (en version 1.10)

Code : Tout sélectionner

conky.config = {	
    own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'skip_taskbar,skip_pager,undecorated,below',
	own_window_colour = '#000000',
	
	minimum_width = 650, minimum_height = 160,
	maximum_width = 655,

	gap_x = 450,--# l|r
	gap_y = 254,--# u|d
	alignment = 'top_left',

	use_xft = true,
	font = 'GE Inspira:size=9',

	xftalpha = 1.0,

	override_utf8_locale = true,

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

	default_color = '#ffffff',--# MintCream
	color1 = '#778899',--# LightSlateGray
	color2 = '#FFA07A',--# LightSalmon
	color3 = '#87CEFA',--# LightSkyBlue
	color4 = '#48D1CC',--# MediumTurquoise
	color5 = '#FFDEAD',--# NavajoWhite
	color6 = '#00BFFF',--# DeepSkyBlue
	color7 = '#ffffff',--# PowderBlue
	color8 = '#FFD700',--# Gold
	color9 = '#ffffff',--# IndianRed

	draw_borders = false,

	stippled_borders = 5,

	border_inner_margin = 5,
	border_outer_margin = 0,

	border_width = 2,

	draw_graph_borders = false,

	background = false,

	use_spacer = 'none',


	no_buffers = true,

	double_buffer = true,

	update_interval = 1,

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

conky.text = [[
#### Lancement du script récupérant les données météo ####
${execi 600 bash $HOME/1b1_accuweather_images/1b1}${execi 700 bash $HOME/1c_accuweather_images_hourly/1c}
##### Heure #####
${voffset -35}${font GE Inspira:size=55}${time %H}:${time %M}${font GE Inspira:size=20}${color 808080}${goto 180}${time %S}$color$font
##### Date #####
${voffset -55}${font GE Inspira:size=14}${alignc -50}${time %A, %d %B %Y}$font
##### Affichage infos vent ######
${goto 310}${font GE Inspira:size=12}Vent : ${execi 90 sed -n '31p' $HOME/1b1_accuweather_images/curr_cond} à ${execi 90 sed -n '38p' $HOME/1b1_accuweather_images/curr_cond}
${goto 310}Humiditée : ${execi 90 sed -n '32p' $HOME/1b1_accuweather_images/curr_cond}
${goto 310}Préssion : ${execi 90 sed -n '33p' $HOME/1b1_accuweather_images/curr_cond}
#### Ville ####
${voffset -5}${font GE Inspira:size=14}Sarreguemines : ${font} ${execi 90 sed -n '1p' $HOME/1b1_accuweather_images/messages-fr} 
${font GE Inspira:size=18}${goto 135}${execi 90 sed -n '29p' $HOME/1b1_accuweather_images/curr_cond} °C ${font} Ressentie :  ${voffset -12}${font GE Inspira:size=18}${execi 90 sed -n '30p' $HOME/1b1_accuweather_images/curr_cond} °C 
${goto 555}${voffset -124}${font ubuntu:size=11}N $font
${goto 522}${voffset 8}${font Ubuntu:size=6}NNO ${goto 583}NNE$font
${goto 493}${voffset -6}${font Ubuntu:size=9}NO ${goto 611}NE$font
${goto 486}${voffset 10}${font Ubuntu:size=6}ONO ${goto 618}ENE$font
${goto 468}${voffset 5}${font Ubuntu:size=11}O ${goto 641}E$font
${goto 486}${voffset 9}${font Ubuntu:size=6}OSO ${goto 618}ESE
${goto 493}${voffset 16}${font Ubuntu:size=9}SO ${goto 611}SE$font
${goto 522}${voffset -4}${font Ubuntu:size=6}SSO ${goto 583}SSE
${goto 555}${voffset 4}${font Ubuntu:size=11}S $font
#### Affichage trois prochaines heures et trois prochains jours ####
${voffset -60}${goto 20}${time %H} h\
${goto 95}${tztime GMT-3 %H} h\
${goto 170}${tztime GMT-4 %H} h\
${goto 245}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$2}'`}\
${goto 320}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$2}'`}\
${goto 400}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$2}'`}
##### Affichage temperatures #####
${voffset 25}
T${goto 20}${execpi 90 sed -n '52p' $HOME/1c_accuweather_images_hourly/hourly_raw1}\
${goto 95}${execi 90 sed -n '53p' $HOME/1c_accuweather_images_hourly/hourly_raw1}\
${goto 170}${execi 90 sed -n '54p' $HOME/1c_accuweather_images_hourly/hourly_raw1}\
${goto 245}${color9}${execi 90 sed -n '8p' $HOME/1b1_accuweather_images/first_days}°${color}/${color7}${execi 90 sed -n '9p' $HOME/1b1_accuweather_images/first_days}°${color}\
${goto 320}${color9}${execi 90 sed -n '13p' $HOME/1b1_accuweather_images/first_days}°${color}/${color7}${execi 90 sed -n '14p' $HOME/1b1_accuweather_images/first_days}°${color}\
${goto 400}${color9}${execi 90 sed -n '18p' $HOME/1b1_accuweather_images/first_days}°${color}/${color7}${execi 90 sed -n '19p' $HOME/1b1_accuweather_images/first_days}°${color}
#### icones conditions actuelles et vent ####
${lua fDrawImage $HOME/1b1_accuweather_images/cc.png 180 5 132 70 0}${lua fDrawImage $HOME/1b1_accuweather_images/Wind1.png 465 -10 190 190 0}\
#### icones 3 prochaines heures et tois prochains jours ####
${lua fDrawImage $HOME/1c_accuweather_images_hourly/20.png 0 120 70 40 0}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/23.png 75 120 70 40 0}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/26.png 150 120 70 40 0}\
${lua fDrawImage $HOME/1b1_accuweather_images/6.png 225 120 70 40 0}\
${lua fDrawImage $HOME/1b1_accuweather_images/11.png 300 120 70 40 0}\
${lua fDrawImage $HOME/1b1_accuweather_images/16.png 380 120 70 40 0}
${voffset -800}
]];
fichier 1b1.sh

Code : Tout sélectionner

#!/bin/bash

#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
address="http://www.accuweather.com/en/fr/sarreguemines/57200/weather-forecast/135050"
#address="http://www.accuweather.com/en/us/new-york-ny/10017/weather-forecast/349727"

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

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"

addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
addr2="$addr1"?day=6

kill -STOP $(pidof conky)
killall wget

wget --save-cookies $HOME/1b1_accuweather_images/cookie -O $HOME/1b1_accuweather_images/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1b1_accuweather_images/cookie -O $HOME/1b1_accuweather_images/first_days_raw $addr1
wget --load-cookies $HOME/1b1_accuweather_images/cookie -O $HOME/1b1_accuweather_images/last_days_raw $addr2

#Current Conditions - curr_cond file
if [[ -s $HOME/1b1_accuweather_images/curr_cond_raw ]]; then

    egrep -i '"detail-tab-panel |>Today<\/a>|>Tonight<\/a>|>Early AM<\/a>|>Overnight<\/a>|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|icons-wind\/.*gif|text-align:center\;\">.*h</div>|Humidity: |Pressure: |Cloud Cover: |UV Index: |Dew Point: |Precipitation(1 hr): |Visibility: |"start">|"finish">' $HOME/1b1_accuweather_images/curr_cond_raw > $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' -e 's/RealFeel/\n/g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^.*"#">//g' -e 's/^.*<strong class="temp"//g' -e 's/^>//g' -e 's/<span>&deg.*$//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/<\/a>.*$//g' -e 's/\/span> //g' -e 's/"temp">/\n/g' -e 's/^.*icons-wind\///g' -e 's/^.*text-align:center\;\">//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^.*"start">//g' -e 's/^.*"finish">//g' -e 's/<li>//g' -e 's/<strong>//g' -e 's/<<span.*$//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/<\/span>//g' -e 's/<\/strong><\/li>//g' -e 's/ "><\/div>//g' -e 's/'\''//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/"><\/div>//g' -e 's/^.*; //g' -e 's/&#.*$//g' -e 's/ i-alarm.*$//g' -e 's/;//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/Humidity: //g' -e 's/Pressure: //g' -e 's/Cloud Cover: //g' -e 's/UV Index: //g' -e 's/Dew Point: //g' -e 's/Visibility: //g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/">//g' -e 's/\r//g' -e 's/ *$//g' -e 's/mb.*$/mb/g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/-s\|-xl.*$//g' -e 's/in &.*$/in/g' -e 's/\.gif.*$//g' -e 's/<\/div>.*$//g' $HOME/1b1_accuweather_images/curr_cond
    time=$(sed -n 1p $HOME/1b1_accuweather_images/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 3a- $HOME/1b1_accuweather_images/curr_cond
	fi
    line35=$(sed -n 35p $HOME/1b1_accuweather_images/curr_cond)
    sed -i '35d' $HOME/1b1_accuweather_images/curr_cond
    sed -i 35a$line35 $HOME/1b1_accuweather_images/curr_cond
	cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n 27p $HOME/1b1_accuweather_images/curr_cond).png $HOME/1b1_accuweather_images/cc.png
fi


#First 5days - first_days file 
if [[ -s $HOME/1b1_accuweather_images/first_days_raw ]]; then

    sed -i '/<div class="column-1 clearfix">/,/<div id=\"feature-history\">/!d' $HOME/1b1_accuweather_images/first_days_raw
    egrep -i '>Today<|<p>[a-z]|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' $HOME/1b1_accuweather_images/first_days_raw > $HOME/1b1_accuweather_images/first_days

    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' $HOME/1b1_accuweather_images/first_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' $HOME/1b1_accuweather_images/first_days
    sed -i -e 's/<p>//g' -e 's/<\/p>//g' -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e '/realfeel/s/^.*; //g' $HOME/1b1_accuweather_images/first_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' $HOME/1b1_accuweather_images/first_days
	sed -i -e 's/Today/TODAY/' -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' $HOME/1b1_accuweather_images/first_days
    sed -i 's/-s\|-l\|-xl.*$//g' $HOME/1b1_accuweather_images/first_days
    time=$(sed -n 1p $HOME/1b1_accuweather_images/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 2a- $HOME/1b1_accuweather_images/first_days
	fi
	L1=$(sed -n 1p $HOME/1b1_accuweather_images/first_days)
    if [[ $L1 == TODAY ]]; then
        sed -i 1d $HOME/1b1_accuweather_images/first_days
	fi
    for (( i=6; i<=21; i+=5 ))
	  do
	      cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n ${i}p $HOME/1b1_accuweather_images/first_days).png $HOME/1b1_accuweather_images/$i.png
	  done
	cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n 25p $HOME/1b1_accuweather_images/first_days).png $HOME/1b1_accuweather_images/tod.png
	cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n 30p $HOME/1b1_accuweather_images/first_days).png $HOME/1b1_accuweather_images/ton.png

fi


#Last 5days - last_days file 
if [[ -s $HOME/1b1_accuweather_images/last_days_raw ]]; then

    sed -i '/<div class="column-1 clearfix">/,/<div id=\"feature-history\">/!d' $HOME/1b1_accuweather_images/last_days_raw
    egrep -i '>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' $HOME/1b1_accuweather_images/last_days_raw > $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' $HOME/1b1_accuweather_images/last_days
	sed -i -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' $HOME/1b1_accuweather_images/last_days
    sed -i 's/-s\|-l\|-xl.*$//g' $HOME/1b1_accuweather_images/last_days
    for (( i=2; i<=22; i+=5 ))
	  do
	      cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n ${i}p $HOME/1b1_accuweather_images/last_days).png $HOME/1b1_accuweather_images/last_$i.png
	  done

fi

#messages file
sed -n 28p $HOME/1b1_accuweather_images/curr_cond | cut -c -20 > $HOME/1b1_accuweather_images/messages
sed -n 29p $HOME/1b1_accuweather_images/first_days | cut -c -20 >> $HOME/1b1_accuweather_images/messages
sed -n 34p $HOME/1b1_accuweather_images/first_days | cut -c -20 >> $HOME/1b1_accuweather_images/messages
for (( i=7; i<=22; i+=5 ))
  do
      sed -n ${i}p $HOME/1b1_accuweather_images/first_days | cut -c -20 >> $HOME/1b1_accuweather_images/messages
  done
for (( i=3; i<=23; i+=5 ))
  do
      sed -n ${i}p $HOME/1b1_accuweather_images/last_days | cut -c -20 >> $HOME/1b1_accuweather_images/messages
  done
  
# icone direction vent 
wind_direction=$(sed -n 31p $HOME/1b1_accuweather_images/curr_cond)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"02.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "South" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"02.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "SSW" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"03.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "SW" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"04.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "WSW" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"05.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "W" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"06.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "West" ]]; then
	cp $HOME/1b1_accuweather_images/"06.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "WNW" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"07.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "NW" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"08.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "NNW" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"09.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"10.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "North" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"10.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"11.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"12.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"13.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"14.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "East" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"14.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"15.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"16.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"17.png" $HOME/1b1_accuweather_images/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
	cp $HOME/1b1_accuweather_images/vents/"00.png" $HOME/1b1_accuweather_images/Wind1.png
fi

  
## English to French
cp $HOME/1b1_accuweather_images/messages $HOME/1b1_accuweather_images/messages-fr
if [[ -s $HOME/1b1_accuweather_images/messages-fr ]]; then
	sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Turning cloudy and less humid/Moins nuageux et moins humide/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/A couple of showers/Averses éparses/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Mostly cloudy/Ciel plutôt nuageux/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/1b1_accuweather_images/messages-fr	
	sed -i -e 's/Cloudy/Nuageux/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/A few a.m. showers,/Pluies l'\''après-midi/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Showers around in th/Quelques averses l'\''après-midi/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/breezy/Venteux/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/A little morning rai/Faible pluie le matin/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/a little morning rai/Faible pluie le matin/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/A touch of afternoon/Faible pluie l'\''après-midi/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Periods of rain/Pluies intermittentes/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Rain shover/Averses de pluie/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Rain/Pluie/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Light rain/Pluie/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Foggy/Brumeux/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Dense fog/Brouillard dense/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Light fog/Léger brouillard/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Mist/Brume/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Light rain shower/Pluie faible/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Partly cloudy/Partiellement nuageux/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/shower/averses/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Som sun,then turni/Mitigé/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Sunny/Ensoleillé/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Freezing rain/Pluie verglaçante/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Partly sunny/Partiellement ensoleillé/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/Clear/Clair/' $HOME/1b1_accuweather_images/messages-fr
	sed -i -e 's/snow/neige/' $HOME/1b1_accuweather_images/messages-fr
fi


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/1b1_accuweather_images/curr_cond

kill -CONT $(pidof conky)
fichier 1c.sh

Code : Tout sélectionner

#!/bin/bash

#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
address="http://www.accuweather.com/en/fr/sarreguemines/57200/weather-forecast/135050"

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

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"

kill -STOP $(pidof conky)
killall wget
rm $HOME/1c_accuweather_images_hourly/*.png

wget --save-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw1 $addr1
 
#First 8hrs - hourly_raw1 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1).png $HOME/1c_accuweather_images_hourly/$i.png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			fi
	  done
fi

addr2=$(sed -n 1p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw2 $addr2

#Next 8hrs - hourly_raw2 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2).png $HOME/1c_accuweather_images_hourly/$(( $i+100 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			fi
	  done
fi


# Full info - altogether file
rm $HOME/1c_accuweather_images_hourly/altogether
#TEMP
echo "\${color ffffff}\${goto 10}\${hr 1}" > $HOME/1c_accuweather_images_hourly/altogether
echo "Temp.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=52; i<=59; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "2s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=52; i<=59; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "2s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#REALFEEL
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Res.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=61; i<=68; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "4s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=61; i<=68; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "4s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#HUMIDITY
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Humiditée\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=70; i<=77; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "6s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=70; i<=77; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "6s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#RAIN
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Prob.pluie\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=79; i<=86; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=79; i<=86; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#SNOW
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Prob.neige\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=88; i<=95; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "10s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=88; i<=95; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "10s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#ICE
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Gelée\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=97; i<=104; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "12s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=97; i<=104; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "12s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#WIND
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Vent\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=106; i<=113; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "14s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=106; i<=113; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "14s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#UV INDEX
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Index uv\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=115; i<=122; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "16s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=115; i<=122; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "16s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#CLOUD COVER
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Couv. Nuage\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=124; i<=131; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "18s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=124; i<=131; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "18s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#DEW POINT
echo "\${color ffffff}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Point rosée (°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=133; i<=140; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "20s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=133; i<=140; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "20s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
 
  ## English to French
cp $HOME/1c_accuweather_images_hourly/hourly_raw1 $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1-fr ]]; then
	sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/A couple of showers/Averses éparses/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr	
	sed -i -e 's/cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Mostly Cloudy/Ciel plutôt nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr		
	sed -i -e 's/Showers/Averses/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/breezy/Venteux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Rain shover/Averses de pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Light rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Mostly cloudy/Peu nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Mostly/Peu/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Partly/Partiel./' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Sunny/Ensoleillé/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Clear/Clair/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Fog/Brouillard/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Snow/Neige/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Flurrie/Bourasque/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/s/Neige/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Freezing Rain/Pluie verglassante/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Freezin/Verglas/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/g Rain/et pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
	sed -i -e 's/Freezing Rain/Pluie verglassante/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
fi

 ## English to French
cp $HOME/1c_accuweather_images_hourly/hourly_raw2 $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2-fr ]]; then
	sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/A couple of showers/Averses éparses/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr	
	sed -i -e 's/cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Mostly Cloudy/Ciel plutôt nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr		
	sed -i -e 's/Showers/Averses/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/breezy/Venteux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Rain shover/Averses de pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Light rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Mostly cloudy/Peu nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Mostly/Peu/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Partly/Partiel./' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Sunny/Ensoleillé/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Clear/Clair/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Fog/Brouillard/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Snow/Neige/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Flurrie/Bourasque/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/s/Neige/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Freezing Rain/Pluie verglassante/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Freezing/Verglas/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/g Rain/et pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	sed -i -e 's/Freezing Rain/Pluie verglassante/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
	
fi
       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' /$HOME/1c_accuweather_images_hourly/altogether
       
 
kill -CONT $(pidof conky)

Ce qui donne ceci :


Image

@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
virusdunil
Messages : 227
Enregistré le : dim. 14 août 2016 11:53
Localisation : Lac -st-Jean --- Quebec

Re: Conky version 1.10

Message par virusdunil »

Merci pour l'info ;)
HP Compaq dc7700p La plus puissante au mondeMobo: Hewlett-Packard model: 0A54h Bios: Hewlett-Packard v: 786E1 v03.07 date: 08/11/2011
Distro: Puissant Linux Mint KDE - 17.3
Kernel: 4.1.2-040102-generic Desktop: KDE Plasma 4.14.2
Dual core Intel Core2 6400 (-MCP-) cache: 2048 KB clock speeds: max: 2133 MHz
ATI/Radeon HD5400 Series-1024mo/650MHZ

Avatar du membre
débitant
modérateur
Messages : 11557
Enregistré le : mar. 14 juil. 2015 18:22
Localisation : Lorraine France

Re: Conky version 1.10

Message par débitant »

juste une pinaillerie il n'y a pas d'accent à : pression, ni de e final à humidité ;)

Avatar du membre
mylapk
Messages : 617
Enregistré le : dim. 17 avr. 2016 14:22

Re: Conky version 1.10

Message par mylapk »

débitant a écrit :
juste une pinaillerie il n'y a pas d'accent à : pression, ni de e final à humidité ;)
Moi qui me demandait si c'était bien de faire des pinailleries! :roll:
Asus VivoBook Linux Mint 20.2 Uma Xfce Kernel: 5.4.0-89-generic x86_64

Avatar du membre
virusdunil
Messages : 227
Enregistré le : dim. 14 août 2016 11:53
Localisation : Lac -st-Jean --- Quebec

Re: Conky version 1.10

Message par virusdunil »

De mon cotè je ne ferai pas la maj pour l'instant...tout ba bien sur mes affichage et...chanceux comme je suis...suffit de mettre a jour et vla les zemmerdes :lol: :mrgreen:
HP Compaq dc7700p La plus puissante au mondeMobo: Hewlett-Packard model: 0A54h Bios: Hewlett-Packard v: 786E1 v03.07 date: 08/11/2011
Distro: Puissant Linux Mint KDE - 17.3
Kernel: 4.1.2-040102-generic Desktop: KDE Plasma 4.14.2
Dual core Intel Core2 6400 (-MCP-) cache: 2048 KB clock speeds: max: 2133 MHz
ATI/Radeon HD5400 Series-1024mo/650MHZ

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

Re: Conky version 1.10

Message par loutch »

Hello

Conky accuweather (depuis changement du site ) ça donne ceci :

Ici version pour nos amis du Québec


Image

J'attend un peu (terminer la francisation avant de faire un pack.)

@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

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

Re: Conky version 1.10

Message par loutch »

Hello

Donc voici le pack méteo accuweather @ décompresser dans votre Home

https://drive.google.com/open?id=0Bygxc ... jNOU1hUbEU

Image

La francisation n'est pas complète mais il suffit d'ouvrir le fichier 1_accuweather et de francisé le texte à la suite de la lgne 275 comme celle-ci pour exemple Cloudy

Code : Tout sélectionner

sed -i -e 's/Cloudy/Nuageux/' $HOME/1_accuweather/curr_cond-fr

@+

edit :

changer ceci :

Code : Tout sélectionner

${execi 600 bash $HOME/1_accuweather/1_accuweather -f}
par ceci :

Code : Tout sélectionner

${execi 600 bash $HOME/1_accuweather/1_accuweather -f -h}
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
toryx
Messages : 194
Enregistré le : dim. 11 sept. 2016 21:57

Re: Conky version 1.10

Message par toryx »

super boulot loutch :P

je tiens à préciser que je débute sous linux :D mais windows est deja asser loin derriere lol
perso j'ai des problèmes de scripts lua, peut etre parce que qu'il me manque le script image.lua ?!
j'ai remédié à ce problème en remplaçant les instructions "${lua fDrawImage" par "${image "
et ça marche à merveille, enfin apparemment.
je poste les modifs au cas ou ça pourrait servir à quelqu'un

Code : Tout sélectionner

#### premier cadre ####
${image $HOME/1_accuweather/fond/base.png -p 0,40 -s 450x110}
${image $HOME/1_accuweather/fond/flip_bg.png -p 22,3 -s 100x100}
${image $HOME/1_accuweather/fond/flip_bg.png -p 132,3 -s 100x100}
#### Second cadre ####
${image $HOME/1_accuweather/fond/base.png -p 0,155 -s 450x85}
#### Troisième cadre ####
${image $HOME/1_accuweather/fond/base.png -p 0,250 -s 450x85}
#### icônes premier cadre ####
${image $HOME/1_accuweather/0.png -p 205,70 -s 132x70 0}\
#### icônes Second cadre ####
${image $HOME/1_accuweather/1.png -p -15,170 -s 90x55}\
${image $HOME/1_accuweather/2.png  -p 60,170 -s 90x55}\
${image $HOME/1_accuweather/3.png -p 135,170 -s 90x55}\
${image $HOME/1_accuweather/4.png -p 215,170 -s 90x55}\
${image $HOME/1_accuweather/5.png -p 290,170 -s 90x55}\
${image $HOME/1_accuweather/6.png -p 370,170 -s 90x55}
${voffset - 800}
]];
dual-boot: archlinux-cinnamon - windows11
CPU: i5 10600k - CM: MPG Z490 GP - RAM: Corsair Vengeance LPX DDR4 3200 MHz CL16 (4X 8GO)
GPU: NVIDIA GeForce RTX 3060 LH
NVIDIA GeForce GTX 1050 Ti (pasthrough vers qemu/kvm)
KVM: Windows 11 - MacOS Monterey

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

Re: Conky version 1.10

Message par zeb »

Salut toryx ;)
Merci pour le tuyau.
J'ai modifié tes balises, ca passe mieux comme ca ;)

Et bienvenue sur le forum :D

Répondre