Conky

Bureaux,conky et autres personnalisations esthétiques.
Répondre
zeb
Messages : 16473
Enregistré le : ven. 19 juin 2015 22:13
Localisation : plus ici

Re: Conky

Message par zeb »

Dernier message de la page précédente :

Merci pour les images, ça aide à voir les résultats, qui sont vraiment pas mal ;)
dagonh a écrit :Tu devrais changer de pseudo pour « Tchaïkovski ». :lol:
c'est trop classique pour moi :D

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

Re: Conky

Message par loutch »

Hello



Conky accuweather pour les 16 prochaines heures .Les informations sont à prendre sur la page english j'ai traduit en Français ce que j'ai pu

Pour les traductions qui manquent il suffit de mettre à la suite dans le fichier 1c dans la partie traduction. Le pack du site bunsenlabs est à prendre ici et à extraire dans le home .

http://bit.ly/1c_12-2-14



mon conkyrc modifier :

Code : Tout sélectionner

 
 
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 6.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1050 150
maximum_width 1050
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 ff0000 #LightSalmon
default_outline_color black
alignment tl
gap_x 280
gap_y 720
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0
text_buffer_size 4096

lua_load ~/.conky/lua/image.lua

# stuff after 'TEXT' will be formatted on screen
TEXT
${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}
${voffset -10}Heures${goto 95} ${time %H} h${goto 160} ${execi 30 echo `date --date="1 hour" | awk '{print $4}'` | cut -c-2} h${goto 220} ${execi 30 echo `date --date="2 hour" | awk '{print $4}'` | cut -c-2} h${goto 280} ${execi 30 echo `date --date="3 hour" | awk '{print $4}'` | cut -c-2} h${goto 340} ${execi 30 echo `date --date="4 hour" | awk '{print $4}'` | cut -c-2} h${goto 400} ${execi 30 echo `date --date="5 hour" | awk '{print $4}'` | cut -c-2} h${goto 460} ${execi 30 echo `date --date="6 hour" | awk '{print $4}'` | cut -c-2} h${goto 520} ${execi 30 echo `date --date="7 hour" | awk '{print $4}'` | cut -c-2} h${goto 580} ${execi 30 echo `date --date="8 hour" | awk '{print $4}'` | cut -c-2} h${goto 640}${execi 30 echo `date --date="9 hour" | awk '{print $4}'` | cut -c-2} h${goto 700} ${execi 30 echo `date --date="10 hour" | awk '{print $4}'` | cut -c-2} h${goto 760} ${execi 30 echo `date --date="11 hour" | awk '{print $4}'` | cut -c-2} h${goto 820} ${execi 30 echo `date --date="12 hour" | awk '{print $4}'` | cut -c-2} h${goto 880} ${execi 30 echo `date --date="13 hour" | awk '{print $4}'` | cut -c-2} h${goto 940} ${execi 30 echo `date --date="14 hour" | awk '{print $4}'` | cut -c-2} h${goto 1000} ${execi 30 echo `date --date="15 hour" | awk '{print $4}'` | cut -c-2} h

${voffset 15}Conditions${color}\
${goto 100}${execpi 600 sed -n '21p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 160}${execpi 600 sed -n '25p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 220}${execpi 600 sed -n '29p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 280}${execpi 600 sed -n '33p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 340}${execpi 600 sed -n '37p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 400}${execpi 600 sed -n '41p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 460}${execpi 600 sed -n '45p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 520}${execpi 600 sed -n '49p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 580}${execpi 600 sed -n '21p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 640}${execpi 600 sed -n '25p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 700}${execpi 600 sed -n '29p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 760}${execpi 600 sed -n '33p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 820}${execpi 600 sed -n '37p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 880}${execpi 600 sed -n '41p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 940}${execpi 600 sed -n '45p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 1000}${execpi 600 sed -n '49p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}
${goto 100}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 160}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 220}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 280}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 340}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 400}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 460}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 520}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr | cut -c1-7}${goto 580}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 640}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 700}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 760}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 820}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 880}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 940}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}${goto 1000}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr | cut -c1-7}
${execpi 600 sed -n '2p' $HOME/1c_accuweather_images_hourly/altogether}
${execpi 600 sed -n '4p' $HOME/1c_accuweather_images_hourly/altogether}
${execpi 600 sed -n '8p' $HOME/1c_accuweather_images_hourly/altogether}
${execpi 600 sed -n '14p' $HOME/1c_accuweather_images_hourly/altogether}
${execpi 600 sed -n '16p' $HOME/1c_accuweather_images_hourly/altogether}

####  icones #### 
${lua fDrawImage $HOME/1c_accuweather_images_hourly/20.png  80 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/23.png 140 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/26.png 200 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/29.png 260 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/32.png 320 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/35.png 380 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/38.png 440 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/41.png 500 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/120.png 560 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/123.png 620 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/126.png 680 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/129.png 740 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/132.png 800 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/135.png 860 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/138.png 920 30 65 40}\
${lua fDrawImage $HOME/1c_accuweather_images_hourly/141.png 980 30 65 40}


le fichier 1c

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/°/°/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/®|°//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/^.*row">|</th>//g' -e 's/®|°//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>
/:/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})/1n/" $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/°/°/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/®|°//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/^.*row">|</th>//g' -e 's/®|°//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>
/:/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})/1n/" $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.(°C)${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 "Réel.(°C)${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 "HUMIDITEE${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 "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 "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 "GIVRE${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(km/h)${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 "ROSEE (°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
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_raw21-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
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 que ça donne:

Image
@+
Modifié en dernier par Invité le mer. 29 avr. 2020 15:25, modifié 1 fois.
Raison : image mise sur FFLMpics
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

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

Re: Conky

Message par zeb »

Très joli, merci loutch ;)

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

Re: Conky

Message par loutch »

Hello

Autre conky meteo du site wunderground (par contre ici il faut une inscription pour un code api ) à éxtraire dans votre home.

le pack ici :
http://bit.ly/2b_14-1-16

mon conkyrc francisé (en faite le conkyrc3 du pack)

Code : Tout sélectionner

 
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1240 00
maximum_width 1240
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 ff0000 #LightSalmon
default_outline_color black
alignment tl
gap_x 270
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0 
 uppercase no

 lua_load ~/.conky/lua/image.lua
 
 
 
TEXT

${execi 1800 bash $HOME/2b_Wunderground_API/2b}	
${font URW Chancery L:style=Bold:size=16}${voffset -30}${goto 15}${time %A, %d %B %Y}${voffset -30}${font}\
${voffset 20}${goto 570}${execi 600  sed -n '5p' $HOME/2b_Wunderground_API/Conditions}     ${goto 830}Mise à jour ${execi 600  sed -n '53p' $HOME/2b_Wunderground_API/Conditions}\
${goto 260}${color7}${execi 600  sed -n '6p' $HOME/2b_Wunderground_API/Moon_Sun}   Visibilitée : ${execi 600  sed -n '2p' $HOME/2b_Wunderground_API/Moon_Sun} %    Age : ${execi 600  sed -n '4p' $HOME/2b_Wunderground_API/Moon_Sun} Jours${color}
${voffset 10}${color5}${goto 380}${execi 600 echo `date --date="0 day" | awk '{print $1" "$3}'`}\
		${goto 460}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3} {}'`}\
		${goto 530}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3} {}'`}\
		${goto 600}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3} {}'`}\
		${goto 670}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3} {}'`}\
		${goto 740}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3} {}'`}\
		${goto 810}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3} {}'`}\
		${goto 880}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3} {}'`}\
		${goto 950}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3} {}'`}\
		${goto 1020}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3} {}'`}${color}${voffset -10}
  ${color5}${execi 600  sed -n '63p' $HOME/2b_Wunderground_API/Conditions-fr}${color}
  Pression ${execi 600  sed -n '85p' $HOME/2b_Wunderground_API/Conditions}mb\
	${goto 160}Index UV  ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Conditions}
  Pt. Rosée     ${execi 600  sed -n '95p' $HOME/2b_Wunderground_API/Conditions}°\
	${goto 160}Humiditée  ${execi 600  sed -n '69p' $HOME/2b_Wunderground_API/Conditions}
  Visibilitée  ${execi 600  sed -n '117p' $HOME/2b_Wunderground_API/Conditions}km\
	${goto 160}Pluie  ${execi 600  sed -n '133p' $HOME/2b_Wunderground_API/Conditions}mm
  Vent        ${execi 600  sed -n '81p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 160}${execi 600  sed -n '73p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 200}${execi 600  sed -n '75p' $HOME/2b_Wunderground_API/Conditions}°		
  Heu.Lev.: ${color8}${execi 600  sed -n '16p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '18p' $HOME/2b_Wunderground_API/Moon_Sun} \
${goto 150}${color} Heur Cou.: ${color8}${execi 600  sed -n '21p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '23p' $HOME/2b_Wunderground_API/Moon_Sun}${color}\
${voffset -35}${goto 240} Temp. ${goto 310}Res.
	${goto 250}${font URW Chancery L:style=Bold :size=12}${color3}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Conditions}°${color}\
	${goto 305}${color3}±${execi 600  sed -n '113p' $HOME/2b_Wunderground_API/Conditions}°${color}${font}${voffset 35}\
	${voffset -60}\
${goto 350}Temp.:${color9}${goto 400}${execi 600  sed -n '39p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	          ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 350}Vent.: ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 350}Vit.: ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 60}

${voffset -20}${goto 14}${execi 600  sed -n '157p' $HOME/2b_Wunderground_API/Hourly} : ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Hourly} h\
  ${goto 85}${execi 600  sed -n '391p' $HOME/2b_Wunderground_API/Hourly} : ${execi 600  sed -n '355p' $HOME/2b_Wunderground_API/Hourly} h\
  ${goto 155}${execi 600  sed -n '625p' $HOME/2b_Wunderground_API/Hourly} : ${execi 600  sed -n '589p' $HOME/2b_Wunderground_API/Hourly} h\
  ${goto 225}${execi 600  sed -n '859p' $HOME/2b_Wunderground_API/Hourly}  : ${execi 600  sed -n '823p' $HOME/2b_Wunderground_API/Hourly} h\
  ${goto 295}${execi 600  sed -n '1093p' $HOME/2b_Wunderground_API/Hourly} : ${execi 600  sed -n '1057p' $HOME/2b_Wunderground_API/Hourly} h ${voffset 20}
${voffset -90}${color5}${goto 380}${execi 600 echo `date --date="0 day" | awk '{print $1" "$3}'`}\
	${goto 460}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3} {}'`}\
	${goto 530}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3} {}'`}\
	${goto 600}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3} {}'`}\
	${goto 670}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3} {}'`}\
	${goto 740}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3} {}'`}\
	${goto 810}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3} {}'`}\
	${goto 880}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3} {}'`}\
	${goto 950}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3} {}'`}\
	${goto 1020}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3} {}'`}${voffset 90}
${voffset -30}${goto 13}Hum${goto 50}±\
${goto 84}Hum${goto 120}±\
${goto 153}Hum${goto 190}±\
${goto 222}Hum${goto 260}±\
${goto 292}Hum${goto 330}±\
	${color}${voffset 50}
	${voffset -50}\
	${goto 13}${execi 600  sed -n '202p' $HOME/2b_Wunderground_API/Hourly}%${goto 50}${execi 600  sed -n '217p' $HOME/2b_Wunderground_API/Hourly}°\
	${goto 84}${execi 600  sed -n '436p' $HOME/2b_Wunderground_API/Hourly}%${goto 120}${execi 600  sed -n '451p' $HOME/2b_Wunderground_API/Hourly}°\
	${goto 153}${execi 600  sed -n '670p' $HOME/2b_Wunderground_API/Hourly}%${goto 190}${execi 600  sed -n '685p' $HOME/2b_Wunderground_API/Hourly}°\
	${goto 222}${execi 600  sed -n '904p' $HOME/2b_Wunderground_API/Hourly}%${goto 260}${execi 600  sed -n '919p' $HOME/2b_Wunderground_API/Hourly}°\
	${goto 292}${execi 600  sed -n '1138p' $HOME/2b_Wunderground_API/Hourly}%${goto 330}${execi 600  sed -n '1153p' $HOME/2b_Wunderground_API/Hourly}°${voffset -50}
${voffset -5}\
	${goto 350}Temp.:${color3}${goto 400}${execi 600  sed -n '44p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 470}${execi 600  sed -n '150p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 540}${execi 600  sed -n '256p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 610}${execi 600  sed -n '362p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 680}${execi 600  sed -n '468p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 750}${execi 600  sed -n '574p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 820}${execi 600  sed -n '680p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	                  ${goto 890}${execi 600  sed -n '786p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 960}${execi 600  sed -n '892p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 1030}${execi 600  sed -n '998p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 350}Vent.: ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 350}Vit.: ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 65}
	
${lua fDrawImage $HOME/2b_Wunderground_API/Moon_phase.png 220 2 40 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 240 45 100 60}\
${lua fDrawImage $HOME/2b_Wunderground_API/d1.png 367 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d2.png 436 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d3.png 506 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d4.png 576 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d5.png 646 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d6.png 721 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d7.png 791 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d8.png 861 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d9.png 931 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d10.png 1001 60 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n1.png 367 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n2.png 436 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n3.png 506 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n4.png 576 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n5.png 646 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n6.png 721 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n7.png 791 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n8.png 861 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n9.png 931 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n10.png 1001 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h2.png 10 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h4.png 80 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h6.png 150 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h8.png 220 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h10.png 290 170 66 40}

${voffset -150} 
le script 2b

address="http://api.wunderground.com/api/XXXXXXX ... mines.json"
le code est à mettre entre /api/ et /conditions/ et bien sure remplacer Sarreguemines par votre ville

Code : Tout sélectionner

#!/bin/bash

#put your hemisphere here: n for north, s for south
hemisphere=n

#put your Weather Underground address API here
address="http://api.wunderground.com/api/XXXXXXXXXXX/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.json"

wun_icon_to_png () {
    if [[ $1 == day ]]; then
        case $2 in
            chanceflurries)
                echo 21
            ;;
            chancerain)
                echo 14
            ;;
            chancesleet)
                echo 26
            ;;
            chancesnow)
                echo 20
            ;;
            chancetstorms)
                echo 17
            ;;
            clear)
                echo 1
            ;;
            cloudy)
                echo 7
            ;;
            flurries)
                echo 21
            ;;
            fog)
                echo 11
            ;;
            hazy)
                echo 5
            ;;
            mostlycloudy)
                echo 6
            ;;
            mostlysunny)
                echo 4
            ;;
            partlycloudy)
                echo 4
            ;;
            partlysunny)
                echo 6
            ;;
            sleet)
                echo 26
            ;;
            rain)
                echo 18
            ;;
            snow)
                echo 22
            ;;
            sunny)
                echo 1
            ;;
            tstorms)
                echo 15
            ;;
            unknown)
                echo 0
            ;;
        esac
    elif [[ $1 == night ]]; then
        case $2 in
            chanceflurries)
                echo 43
            ;;
            chancerain)
                echo 39
            ;;
            chancesleet)
                echo 40
            ;;
            chancesnow)
                echo 43
            ;;
            chancetstorms)
                echo 41
            ;;
            clear)
                echo 33
            ;;
            cloudy)
                echo 38
            ;;
            flurries)
                echo 43
            ;;
            fog)
                echo 11
            ;;
            hazy)
                echo 37
            ;;
            mostlycloudy)
                echo 36
            ;;
            mostlysunny)
                echo 35
            ;;
            partlycloudy)
                echo 35
            ;;
            partlysunny)
                echo 36
            ;;
            sleet)
                echo 40
            ;;
            rain)
                echo 40
            ;;
            snow)
                echo 44
            ;;
            sunny)
                echo 33
            ;;
            tstorms)
                echo 41
            ;;
            unknown)
                echo 0
            ;;
        esac
    fi
    }

rm $HOME/2b_Wunderground_API/*.png

killall -STOP conky
killall wget

wget -O $HOME/2b_Wunderground_API/raw_data $address

#Conditions feature
sed -n '/,	"current_observation": {/,/,	"satellite": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Conditions
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Conditions
sed -i '/current_observation\|image":\|logo_\|title":\|link":\|^[ \t]*},$\|^[ \t]*}$\|temperature_string\|forecast_url\|history_url\|ob_url\|satellite":/d' $HOME/2b_Wunderground_API/Conditions
sed -i -e 's/":"/\n/g' -e 's/",\|": {$//g' -e 's/"precip_1hr_string/\nprecip_1hr_string/g' -e 's/":/\n/g' -e 's/,$//g' $HOME/2b_Wunderground_API/Conditions
sed -i -e 's/^http.*\/c\/k\///g' -e '/gif/s/_.*$//g' $HOME/2b_Wunderground_API/Conditions
day_or_night=$(sed -n 137p $HOME/2b_Wunderground_API/Conditions)
if [[ $day_or_night == nt ]]; then
	cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n 135p $HOME/2b_Wunderground_API/Conditions)).png $HOME/2b_Wunderground_API/Now.png
else 
	cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n 135p $HOME/2b_Wunderground_API/Conditions)).png $HOME/2b_Wunderground_API/Now.png
fi

#Satellite feature, commented out by default, uncomment if you wish so
#sed -n '/,	"satellite": {/,/"forecast":{/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Satellite
#sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Satellite
#sed -i -e '/image/!d' -e 's/^.*": "//g' -e 's/".*$//g' $HOME/2b_Wunderground_API/Satellite
#for (( i=1; i<=3; i++ ))
#	  do
#         wget -O $HOME/2b_Wunderground_API/sat_pic$i.png $(sed -n ${i}p $HOME/2b_Wunderground_API/Satellite)
#	  done

#Forecast feature: Forecast
sed -n '/"forecast":{/,/"simpleforecast": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Forecast
sed -i -e '/"period":\|icon_url/d' $HOME/2b_Wunderground_API/Forecast
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Forecast
sed -i -e '/period\|icon\|title\|fcttext/!d' -e 's/":"/\n/g' -e 's/":/\n/g' -e 's/",//g' -e 's/,$//g' -e 's/nt_//g' $HOME/2b_Wunderground_API/Forecast

#Forecast feature: Simple Forecast
sed -n '/"simpleforecast": {/,/"hourly_forecast": \[/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Simple_Forecast
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i '/hourly_forecast\|simpleforecast\|forecastday\|{"date"\|period\|icon_url\|^[ \t]*},$\|^[ \t]*}$\|^[ \t]*,$\|^[ \t]*\]$/d' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i -e 's/":"/\n/g' -e 's/":/\n/g' -e 's/",$//g' -e 's/,$//g' -e 's/"$//g' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i '/^[ \t]*{/d' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i -e 's/^[ \t]*"//g' -e 's/^[ \t]*//g' $HOME/2b_Wunderground_API/Simple_Forecast
for (( i=2; i<=146; i+=16 ))
    do
        cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n ${i}p $HOME/2b_Wunderground_API/Forecast)).png $HOME/2b_Wunderground_API/d$(( 1+(i-2)/16 )).png
        j=$(( i+8 ))
        cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n ${j}p $HOME/2b_Wunderground_API/Forecast)).png $HOME/2b_Wunderground_API/n$(( 1+(i-2)/16 )).png
    done

#Forecast feature: Hourly
sed -n '/"hourly_forecast": \[/,/"moon_phase": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/^[ \t]*"//g' -e 's/^[ \t]*//g' $HOME/2b_Wunderground_API/Hourly
sed -i '/hourly_forecast\|FCTTIME\|^{$\|^},$\|^}$\|^,$\|^]$\|moon_phase/d' $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/": /\n/g' -e 's/","/\n/g' -e 's/", "/\n/g' $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/^""//g' -e 's/^"//g' -e 's/^{"//g' -e 's/"},$//g' -e 's/",$//g' $HOME/2b_Wunderground_API/Hourly 
sed -i -e 's/^},//g' -e 's/"}$//g' -e 's/^,//g' $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/^icon_url.*\/c\/k\///g' -e '/gif/s/_.*$//g' $HOME/2b_Wunderground_API/Hourly
sed -i -e '/min_unpadded\|UTCDATE/,+1d' $HOME/2b_Wunderground_API/Hourly
for (( i=64; i<=4212; i+=117 ))
    do
		j=$(( i+1 ))
		day_or_night=$(sed -n ${j}p $HOME/2b_Wunderground_API/Hourly)
		if [[ $day_or_night == nt ]]; then
			cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n ${i}p $HOME/2b_Wunderground_API/Hourly)).png $HOME/2b_Wunderground_API/h$(( 1+(i-64)/117 )).png
		else 
			cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n ${i}p $HOME/2b_Wunderground_API/Hourly)).png $HOME/2b_Wunderground_API/h$(( 1+(i-64)/117 )).png
		fi
    done
    
#Forecast feature: Moon_Sun
sed -n '/"moon_phase": {/,/"sun_phase": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Moon_Sun
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Moon_Sun
sed -i '/moon_phase\|^[ \t]*},$\|sun_phase\|^[ \t]*}$/d' $HOME/2b_Wunderground_API/Moon_Sun
sed -i -e 's/":"/\n/g' -e 's/".*$//g' $HOME/2b_Wunderground_API/Moon_Sun
moon_phase=$(sed -n 6p $HOME/2b_Wunderground_API/Moon_Sun)
if [[ $moon_phase == "Waning Crescent" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"21.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waxing Crescent" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"04.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waning Gibbous" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"17.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waxing Gibbous" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"09.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "First Quarter" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"07.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Last Quarter" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"19.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "New Moon" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"24.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Full Moon" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"13.png" $HOME/2b_Wunderground_API/Moon_phase.png
fi

 ## English to French
cp $HOME/2b_Wunderground_API/Conditions $HOME/2b_Wunderground_API/Conditions-fr
if [[ -s $HOME/2b_Wunderground_API/Conditions-fr ]]; then
	sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Turning cloudy and less humid/Moins nuageux et moins humide/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A couple of showers/Averses éparses/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mostly cloudy/Ciel plutôt nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/2b_Wunderground_API/Conditions-fr	
	sed -i -e 's/Cloudy/Nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A few a.m. showers,/Pluies l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Showers around in th/Quelques averses l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/breezy/Venteux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A little morning rai/Faible pluie le matin/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/a little morning rai/Faible pluie le matin/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A touch of afternoon/Faible pluie l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Periods of rain/Pluies intermittentes/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain shover/Averses de pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light Rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light/Faible/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Foggy/Brumeux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Dense fog/Brouillard dense/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light fog/Léger brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mist/Brume/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light rain shower/Pluie faible/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly cloudy/Partiellement nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly Cloudy/Partiellement nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly/Partiellement/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/shower/averses/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Som sun,then turni/Mitigé/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Sunny/Ensoleillé/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Clear/Clair/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light Freezing Fog/Léger brouillard givrant/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mostly/Peu/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Fog/Brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Scattered Clouds/Nuages épars/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Drizzle/Bruine/' $HOME/2b_Wunderground_API/Conditions-fr
fi
	
	 sed -i -e 's/New Moon/Nouvelle Lune/g' -e 's/Waxing Crescent/Lune Montante/g' -e 's/First Quarter/Premier Quartier/g' -e 's/Waxing Gibbous/Gibeuse Croissante/g' -e 's/Full/Pleine Lune/g' -e 's/Waning Gibbous/Gibeuse Décroissante/g' -e 's/Last Quarter/Dernier Quartier/g' -e 's/Waning Crescent/Lune Déscendante/g' /$HOME/2b_Wunderground_API/Moon_Sun
         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/2b_Wunderground_API/Simple_Forecast
         sed -i -e 's/Mon/Lun/g' -e 's/Tue/Mar/g' -e 's/Wed/Mer/g' -e 's/Thu/Jeu/g' -e 's/Fri/Ven/g' -e 's/Sat/Sam/g' -e 's/Sun/Dim/g' /$HOME/2b_Wunderground_API/Conditions
         sed -i -e 's/Feb/Fév/g' -e 's/Apr/Avr/g' -e 's/May/Mai/g' -e 's/Jun/Jui/g' -e 's/Jul/Jui/g' -e 's/Aug/Aou/g' /$HOME/2b_Wunderground_API/Conditions
         sed -i -e 's/Mon/Lun/g' -e 's/Tue/Mar/g' -e 's/Wed/Mer/g' -e 's/Thu/Jeu/g' -e 's/Fri/Ven/g' -e 's/Sat/Sam/g' -e 's/Sun/Dim/g' /$HOME/2b_Wunderground_API/Hourly
	
	
	killall -CONT conky

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

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

Re: Conky

Message par zeb »

Pas hors sujet, mais pas de conky sur ce message :roll:

Alors voila, je suis en train de personnaliser ma mint qui me sert à faire des essais.
J'installe conky manager (pas envie de me prendre la tête à faire un code), je le personnalise, jusque-là tout va bien.
Pour des raisons de MIAM :mrgreen: j'appuie sur les touches (clavier logitech) FN+F12 pour la mise en veille et là niet, rien, seule solution (trouvé au bout de quelques minutes :geek: :lol: ) ouvrir une fenêtre (n'importe quoi comme fenêtre, mais un truc actif sur le bureau :evil: ), je commence par rebooter avec une autre noyau, toujours rien :evil: .
Me vient l'idée de killer conky manager, et surprise, ça refonctionne :D

Certainement une config à faire :shock: :?:
Je ne cherche pas de solution, je vais simplement faire conky à la mimine ;)

Voila, juste ce petit message pour signaler le bug, ça pourra peut être aider ;)
@+

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

Re: Conky

Message par zeb »

Hello,
Mon conky me fait de petites misères :cry:
Les icônes arrivent à se glisser dessous, et là je sèche :?
Voici mon code avant text:

Code : Tout sélectionner

background yes
use_xft yes
xftfont Sans:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 500
maximum_width 1500
text_buffer_size 1024
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_outline_color white
alignment top_right
gap_x 20
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 4
net_avg_samples 4
override_utf8_locale yes
#
color1 white
#
color2 orange
#
color3 6495ee
#
color4 green
#cornflowerblue
color5 red
color6 yellow
# Lua Load
#lua_load ~/.conky/draw_bg.lua
#lua_draw_hook_pre draw_bg
#lua_load ~/.conky/conky_grey.lua
#lua_draw_hook_pre main
lua_load ~/.conky/tous/tous.lua #chemin du .lua
lua_draw_hook_post main_rings #ordre de lancement si demande de plusieurs lua
Si quelqu'un a une idée ;)

Avatar du membre
tyrry
modérateur
Messages : 5730
Enregistré le : mar. 21 juil. 2015 07:42
Localisation : à l'ouest

Re: Conky

Message par tyrry »

Slt ,
remplace :
own_window yes par own_window no
et double_buffer yes par double_buffer no

ou si tu utilise compiz , il faut lancer conky qu'après que compiz soit entièrement charger bref temporisé l'affichage de conky

@+
Distro: Debian 12 Bookworm Desktop: LXDE
Kernel: 6.1.0-19-amd64 Drive: Intel Nvme 240
CPU: Ryzen 3 PRO 2200GE RAM: 16 go Graphics Card: AMD ATI Radeon Vega Series
L'experience est quelque chose que vous obtenez, juste après que vous en ayez besoin

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

Re: Conky

Message par zeb »

Hello le campeur ;)
tyrry a écrit :own_window yes par own_window no
et double_buffer yes par double_buffer no
C'est l'anarchie dans l'affichage, une vrai partouze d’icône et de conky :o
Gestion des fenêtres :macro+compton
Je vais quand même retarder le démarrage de conky de 10 à 20 secondes, je verrai au prochain démarrage, demain.

A la demande de mon ami le campeur :mrgreen:
On voit que l’icône peut passer derrière le conky.
Image

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

Mon Conky

Message par virusdunil »

Voila mon conky...simple et complet sur 3 feuilles ;)

Image

RC1

Code : Tout sélectionner

#Fonctionnement de conky 
  total_run_times 0		#temps en secondes ; 0 = toujours actif
  background no		#Pour que conky tourne en arrière plan ; no = pour les tests

#Réglages système
  cpu_avg_samples 1		#Nb d'échantillons pour calculer la moyenne d'utilisation CPU
  net_avg_samples 2		#Nb d'échantillons pour calculer la moyenne d'utilisation CPU

#Mémoire
  double_buffer yes		#Éviter le clignotement
  no_buffers yes		#Soustraire les mémoires tampons...
  text_buffer_size 1024		#...de la mémoire utilisée

#Affichage
  out_to_console no		#Affiche le texte sur la sortie standard
  update_interval 1		#Taux de rafraîchissement de la fenêtre (s)

#Fenêtre conky
alignment top_left
 #---
minimum_size 400 600
  maximum_width 400		#Largeur maximum (px)
 #---
gap_x 20
gap_y 5
 #---
  draw_shades no		#Afficher les ombres
  draw_outline no		#Afficher les contours de fenêtre
  draw_borders no		#Afficher des contours autour des blocs de texte
  border_width 1		#Largeur du contour
  border_inner_margin 1		#Largeur des marges
 #---
  own_window yes
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
own_window_type sticky

#Mise en forme
  use_xft yes			#Utiliser Xft (polices lissées etc)
  xftalpha .1			#Utiliser Xft
  override_utf8_locale yes 	#Force l'UTF8
  uppercase no			#Tout le texte en majuscule
  use_spacer yes		#Ajoute des espaces après certains objets (qu'avec des polices fixes)
 #---
  xftfont saxMono:size=10 	#Police par défaut
 #---


#Couleurs
  default_color 0080FF		#Couleur par défaut

 
 #---
  color1 0080FF			#Gris
  color2 BF0A0D 		#Rouge
  color3 7AA6CC 		#Bleu
  color4 FFFF00			#jaune

own_window_transparent yes
own_window_colour 000000
TEXT
${font Visitor TT1 BRK : pixelsize=18}${color4}${exec cat /etc/lsb-release | grep "DES" | cut -d "=" -f2 | sed 's/"//g' | sed 's/ /_/g'}
${font Visitor TT1 BRK : pixelsize=12}${color3}${voffset -5}${hr}
${offset 15}${color1}Heure : ${color3}${time %H : %M : %S}
${offset 15}${color1}Date : ${time %A %d %B %Y}
${offset 15}Semaine: ${color2}${time %V} ${color1}de 53

${font Visitor TT1 BRK : pixelsize=12}${color4}Systeme${font}
${color3}${voffset -5}${hr}
${offset 15}${color1}Uptime  : ${color3}${uptime}
${offset 15}${color1}Kernel  : ${sysname} ${color2}${kernel}
${offset 15}${color1}Machine : ${nodename} ${machine}

${font Visitor TT1 BRK : pixelsize=12}${color4}Temperatures
${color3}${voffset -5}${hr}
${offset 15}${color1}TEMP. Processeur 1: ${hwmon temp 2}°C ${alignr}TEMP. Processeur 2: ${hwmon temp 3}°C
${offset 15}Temp Disque Dur: ${execpi 10 hddtemp -n /dev/sda}°C ${alignr}Temp GPU Radeon: ${hwmon 1 temp 1}°C 
${offset 15}Temp Memoires: ${hwmon 1 temp 2}°C${alignr}Temp Carte mere: ${hwmon 1 temp 3}°C
${offset 15}Temp Carte mere: ${hwmon 1 temp 4}°C

${font Visitor TT1 BRK : pixelsize=12}${color4}Vitesse Ventilateurs
${color3}${voffset -5}${hr}
${color1}${exec sensors | grep 'RPM'}

${color2}${font StyleBats:size=16}${font}${font Visitor TT1 BRK : pixelsize=12}${color4}Activité CPU${color3}${alignc}Moyenne/Minute ${cpu cpu}%${font}
${color3}${voffset -5}${hr}
${offset 15}${color1}Core 1 : ${freq_g 1} GHz - ${color3}${cpu cpu1}% ${color2}${cpubar cpu1}
${offset 15}${color1}${cpugraph cpu1  20,375  176e88 2E9AFE}
${offset 15}Core 2 : ${freq_g 2} GHz - ${color3}${cpu cpu2}% ${color2}${cpubar cpu2}
${offset 15}${color1}${cpugraph cpu2  20,375 176e88 2E9AFE}
${font StyleBats:size=16}${font Visitor TT1 BRK : pixelsize=12}${color4}Activité Memoire${font}
${color3}${voffset -5}${hr}
${color1}RAM : $mem / $memmax   ${alignr}${color4}$memperc% Utilisé
${color2}${alignr}${membar 5,375}
${font Visitor TT1 BRK : pixelsize=12}${color4}Activité Disque${font}
${color3}${voffset -5}${hr}
${offset 15}${color1}sda1 activité /racine
${offset 30}Lecture: ${color2}${diskio_read sda1}${goto 172}${color1}

${offset 30}${color1}${diskiograph_read sda1 20,350 176e88 66FF00}
Ecriture : ${color2}${diskio_write sda1}
${offset 30}${color1}${diskiograph_write sda1 20,350 176e88 66FF00}
${color4}Systeme de Fichier
${hr}
${font Visitor TT1 BRK : pixelsize=12}${color3}Disque Dur Principal-SDA${font}${alignr}${fs_used_perc /}% Utilisé
${color3}${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color4}Entropie: ${entropy_perc}% ${color4}- ${color3}${entropy_bar}




RC2

Code : Tout sélectionner

 #Fonctionnement de conky 
  total_run_times 0		#temps en secondes ; 0 = toujours actif
  background yes		#Pour que conky tourne en arrière plan ; no = pour les tests

#Réglages système
  cpu_avg_samples 1		#Nb d'échantillons pour calculer la moyenne d'utilisation CPU
  net_avg_samples 2		#Nb d'échantillons pour calculer la moyenne d'utilisation CPU

#Mémoire
  double_buffer yes		#Éviter le clignotement
  no_buffers yes		#Soustraire les mémoires tampons...
  text_buffer_size 1024		#...de la mémoire utilisée

#Affichage
  out_to_console no		#Affiche le texte sur la sortie standard
  update_interval 1		#Taux de rafraîchissement de la fenêtre (s)

#Fenêtre conky
alignment top_middle

 #---
gap_x 725
gap_y 15
 #---
  draw_shades no		#Afficher les ombres
  draw_outline no		#Afficher les contours de fenêtre
  draw_borders no		#Afficher des contours autour des blocs de texte
  border_width 1		#Largeur du contour
  border_inner_margin 1		#Largeur des marges
 #---
  own_window yes
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
own_window_type normal


#Mise en forme
  use_xft yes			#Utiliser Xft (polices lissées etc)
  xftalpha .1			#Utiliser Xft
  override_utf8_locale yes 	#Force l'UTF8
  uppercase no			#Tout le texte en majuscule
  use_spacer yes		#Ajoute des espaces après certains objets (qu'avec des polices fixes)
 #---
  xftfont saxMono:size=10	#Police par défaut
 #---
  stippled_borders 5		#Taille des pointillés

#Couleurs
  default_color FFFFFF 		#Couleur par défaut
  default_shade_color 333333	#Couleur des ombres
  default_outline_color black	#Couleur des contours
 #---
  color1 0080FF		#Gris
  color2 BF0A0D 		#Rouge
  color3 7AA6ff 		#Bleu
  color4 FFFF00			#jaune

own_window_argb_value 0
own_window_colour 000000
own_window_transparent yes
minimum_size 400 600
TEXT
${font Visitor TT1 BRK : pixelsize=12}${color4}Utilisation Reseau
${hr 1}
${color3}${voffset -5}${hr}
${offset 15}${color1}Upload : ${color3}${upspeed eth0}ko/s
${offset 15}${color1}${upspeedgraph eth0  176e88 66FF00}
${offset 15}Download : ${color3}${downspeed eth0}ko/s
${offset 15}${color1}${downspeedgraph eth0  176e88 66FF00}
${color lightblue}Downloads${goto 150}${color3}${alignr}Uploads

${color lightblue}Actuel : $color3${goto 60}${execi 300 vnstat -i eth0 | grep "today" | awk '{print $2 $3}'}${goto 150}${color lightblue}${alignr}Actuel : $color3${goto 210}${alignr}${execi 300 vnstat -i eth0 | grep "today" | awk '{print $5 $6}'}
${color lightblue}Hier: $color3${texeci 300 vnstat -i eth0 | grep "yesterday" | awk '{print $2 $3}'} $color ${goto 145}${goto 150}${color lightblue}${alignr}Hier : $color3${alignr}${texeci 300 vnstat -i eth0 | grep "yesterday" | awk '{print $5 $6}'} 
${color lightblue}Semaine : $color3${execi 300 vnstat -i eth0 -w | grep "current week" | awk '{print $3 $4}'}${goto 150}${color lightblue}${alignr}Semaine : $color3${goto 210}${alignr}${execi 300 vnstat -i eth0 -w | grep "current week" | awk '{print $6 $7}'} 
${color lightblue}Mois : $color3${texeci 300 vnstat -m -i eth0 | grep "'" | tail -n 1 | awk '{print $3 $4}'}$color ${goto 145}${color lightblue}${alignr}Mois : $color3${alignr}${texeci 300 vnstat | grep "tx:" | awk '{print $5 $6}'}

${if_existing /proc/net/route eth0}${font Visitor TT1 BRK : pixelsize=12}${color4}Reseautage${alignc}${color3}${wireless_link_qual eth0}%${font}
${color3}${voffset -5}${hr}
${color3}Ports Ouverts: ${color4}${tcp_portmon 1 65535 count}${alignc}${color3}Entrant :  ${color4}${tcp_portmon 1 32767 count}${alignr}${color3}Sortant: ${color4}${tcp_portmon 32768 65535 count}
${offset 15}${color3}Interface : ${color4}${gw_iface}
${offset 15}${color3}I.P. Loc. : ${alignr}${color3}${addr eth0}
${offset 15}${color3}I.P. Pas. : ${alignr}${color3}${gw_ip}
${offset 15}${color3}I.P. Pub. : ${alignr}${color3}${exec wget http://ipinfo.io/ip -qO -}${else}${font Visitor TT1 BRK : pixelsize=12}${color1}
RC3

Code : Tout sélectionner

 #Fonctionnement de conky 
  total_run_times 0		#temps en secondes ; 0 = toujours actif
  background yes		#Pour que conky tourne en arrière plan ; no = pour les tests

#Réglages système
  cpu_avg_samples 1		#Nb d'échantillons pour calculer la moyenne d'utilisation CPU
  net_avg_samples 2		#Nb d'échantillons pour calculer la moyenne d'utilisation CPU

#Mémoire
  double_buffer yes		#Éviter le clignotement
  no_buffers yes		#Soustraire les mémoires tampons...
  text_buffer_size 1024		#...de la mémoire utilisée

#Affichage
  out_to_console no		#Affiche le texte sur la sortie standard
  update_interval 1		#Taux de rafraîchissement de la fenêtre (s)

#Fenêtre conky
alignment top_middle
 #---
minimum_size 400 600
  maximum_width 400		#Largeur maximum (px)
 #---
gap_x 200
gap_y 5
 #---
  draw_shades no		#Afficher les ombres
  draw_outline no		#Afficher les contours de fenêtre
  draw_borders no		#Afficher des contours autour des blocs de texte
  border_width 1		#Largeur du contour
  border_inner_margin 1		#Largeur des marges
 #---
  own_window yes
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0
own_window_type normal

#Mise en forme
  use_xft yes			#Utiliser Xft (polices lissées etc)
  xftalpha .1			#Utiliser Xft
  override_utf8_locale yes 	#Force l'UTF8
  uppercase no			#Tout le texte en majuscule
  use_spacer yes		#Ajoute des espaces après certains objets (qu'avec des polices fixes)
 #---
  xftfont saxMono:size=10 	#Police par défaut
 #---
  stippled_borders 5		#Taille des pointillés

#Couleurs
  default_color 0080FF		#Couleur par défaut
  default_shade_color 333333	#Couleur des ombres
  default_outline_color black	#Couleur des contours
 #---
  color1 0080FF			#Gris
  color2 BF0A0D 		#Rouge
  color3 7AA6CC 		#Bleu
  color4 FFFF00			#jaune

own_window_transparent yes
own_window_colour 000000
TEXT
${color4}Top CPU
${hr 1}
Name              PID   ${alignc}CPU%   ${alignr}MEM%
${color red} ${top name 1} ${top pid 1} ${alignc}${top cpu 1} ${alignr}${top mem 1}
${color lightblue} ${top name 2} ${top pid 2} ${alignc}${top cpu 2} ${alignr}${top mem 2}
${color lightblue} ${top name 3} ${top pid 3} ${alignc}${top cpu 3} ${alignr}${top mem 3}
${color lightblue} ${top name 4} ${top pid 4} ${alignc}${top cpu 4} ${alignr}${top mem 4}
${color lightblue} ${top name 5} ${top pid 5} ${alignc}${top cpu 5} ${alignr}${top mem 5}

${color4}Top MEM
${hr 1}
Name              PID   ${alignc}CPU%   ${alignr}MEM%
${color red} ${top_mem name 1} ${top_mem pid 1} ${alignc}${top_mem cpu 1} ${alignr}${top_mem mem 1}
${color lightblue} ${top_mem name 2} ${top_mem pid 2} ${alignc}${top_mem cpu 2} ${alignr}${top_mem mem 2}
${color lightblue} ${top_mem name 3} ${top_mem pid 3} ${alignc}${top_mem cpu 3} ${alignr}${top_mem mem 3}
${color lightblue} ${top_mem name 4} ${top_mem pid 4} ${alignc}${top_mem cpu 4} ${alignr}${top_mem mem 4}
${color lightblue} ${top_mem name 5} ${top_mem pid 5} ${alignc}${top_mem cpu 5} ${alignr}${top_mem mem 5}


${color4}Connections WEB
${hr 1}
${color red}Entrante: ${tcp_portmon 1 32767 count} ${alignc}Sortante: ${tcp_portmon 32768 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}

${color red}Connections Entrantes ${alignr} LService Local/Port$color
${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}

${color red}Connections Sortantes ${alignr} Service Distant/Port$color

${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${tcp_portmon 32768 61000 rhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
${tcp_portmon 32768 61000 rhost 6} ${alignr} ${tcp_portmon 32768 61000 rservice 6}
${tcp_portmon 32768 61000 rhost 7} ${alignr} ${tcp_portmon 32768 61000 rservice 7}
${tcp_portmon 32768 61000 rhost 8} ${alignr} ${tcp_portmon 32768 61000 rservice 8}
${tcp_portmon 32768 61000 rhost 9} ${alignr} ${tcp_portmon 32768 61000 rservice 9}

amusez vous bien ;)
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 : 11564
Enregistré le : mar. 14 juil. 2015 18:22
Localisation : Lorraine France

Re: Mon Conky

Message par débitant »

j'en connais certain qui vont bien s'amuser :lol:

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

Re: Mon Conky

Message par zeb »

Merci virus ;)
J'ai bien envie de fusionner avec https://forum-francophone-linuxmint.fr/ ... ?f=14&t=34" onclick="window.open(this.href);return false; qui pourrait être comme "nos bureaux" mais pour les conky (en même temps c'est déjà le cas :D ).

Qu'en pensez vous (débitant et virus)

Répondre