#826 Le 06/05/2012, à 06:09
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Re-gag
klingons en embuscade
Hors ligne
#827 Le 07/05/2012, à 09:58
- ragamatrix
Re : [Conky] Alternative à weather.com (2)
@jpdipsy
Bonjour, ramdisk apparait sur ton bureau, utilises tu une carte sd pour augmenter la mémoire vive ?
(limite HS désolé...)
Hors ligne
#828 Le 07/05/2012, à 10:49
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
@jpdipsy
Bonjour, ramdisk apparait sur ton bureau, utilises tu une carte sd pour augmenter la mémoire vive ?
(limite HS désolé...)
Hello
Non simplement un disk virtuel defini via grub
ex: linux /vmlinuz root=LABEL=System64 ro vga=792 quiet splash vt.handoff=7 ramdisk_size=1000000
A+
Ps (limite HS désolé...) ne refait jamais ça
Hors ligne
#829 Le 07/05/2012, à 10:53
- Didier-T
Re : [Conky] Alternative à weather.com (2)
Bonjour @ tous et toutes,
J'ai adopté Voyager, et comme bien sure je m’ennuyait, je me suis lancé dans le développement d'un petit script le conky-control et nous aurions besoins de testeurs, si sa vous intéresses voici le lien pour suivre la discutions faite attention tous de même le script d'installation ne fonctionneras pour le moment pas cher vous sauf si vous êtes sur Voyager, je le modifierais ce soir où demains et vous referais signe.
bien sure il peut faire fonctionner le conky météo.
Hors ligne
#830 Le 07/05/2012, à 13:03
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Distortions spaciaux temporels
convert image-originale -alpha on -virtual-pixel transparent +distort Barrel '0,0,0,1 0,0,-.10,1.2 232,123' -gravity North -crop 465x245+0+0\! -background transparent -compose Over -flatten Imagefinale.png
Dernière modification par jpdipsy (Le 07/05/2012, à 13:16)
Hors ligne
#831 Le 07/05/2012, à 17:45
- jlfh0816
Re : [Conky] Alternative à weather.com (2)
@ Didier-T
Bonjour,
J'ai essayé de modifier ton conky météo afin de l'adapter aux désirs de ma moitié qui ne souhaite qu'un conky plus simple et plus "basique" (elle utilise Voyager 11.10). En démarrant ma session avec ton conky puis en éditant le fichier conkyrc_meteo_lua et en le modifiant petit à petit, je suis arrivé à ceci qui me convient à peu près :
http://pix.toile-libre.org/?img=1336408235.png
Le problème est que dès que j'éteins le PC et que je le rallume, le conky météo se résume à l'affichage de l'heure, comme ceci:
http://pix.toile-libre.org/?img=1336408381.png
Je n'obtiens pas mieux si je lance le conky dans un terminal :
┌─( voyager ) - ( 3.0.0-19-generic ) - ( ~ )
└─> conky -c ~/conky/conkyrc_meteo_lua
Conky: forked to background, pid is 13366
┌─( voyager ) - ( 3.0.0-19-generic ) - ( ~ )
└─>
Conky: desktop window (1400003) is subwindow of root window (152)
Conky: window type - desktop
Conky: drawing to created window (0x3000001)
Conky: drawing to double buffer
version = v4
web = http://www.accuweather.com/fr/fr/plougonvelin/158035/weather-forecast/158035
Pévision Nb jours = 5
Pévision Matin = non
Pévision Après Midi = oui
Pévision Soirée = non
Pévision Nuit = oui
Délais = 300
Chemin de travail = /tmp
Palier = 20
Chemin de sauvegarde = /home/voyager/conky/meteo/
Accepterai-tu, s'il-te-plait, lorsque tu auras un peu de temps (aucune urgence ! ) et si cela ne t'ennuie pas, de regarder mon fichier conkyrc_meteo_lua et de me dire où ai-je commis une erreur ?
Voici mon conkyrc_meteo_lua:
# -- Conky settings -- #
background yes
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
# -- Window specifications -- #
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
minimum_size 280 100
maximum_width 310
alignment tl
gap_x 0
gap_y 40
# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
# -- Text settings -- #
use_xft yes
xftfont MaiandraGD:size=24
xftalpha 0.4
uppercase no
default_color 8b8b8b
# -- Déclaration template -- #
template0 ${image ~/conky/script/images/\1 -p \2 -s \3} # -- images fond -- #
template1 ${lua Meteo_\1 \2 \3 \4 \5 \6} # -- gestion météo --#
template2 ${lua_parse Meteo_\1 \2 \3 \4 60 \5} # -- icônes météo -- \2=répertoire icônes \3=position \4=taille \5=jour (pour les prévisions) #
template3 ${lua Lune_\1}
template4 ${lua_parse Images_\1 \2 \3 60 \4} # -- Appelle image -- \2=position \3=taille \4=jour (pour les prévisions) #
lua_load ~/conky/script/meteo.lua
lua_startup_hook init ~/conky/script/meteo.cfg
TEXT
#### Lancement du script récupérant les données météo ####
${template1 Maj}
#### Premier cadre ####
##### Heure #####
${voffset -16}${font LED_mono :style=Medium:size=60}${color 434343}${goto 30}${time %H}${goto 140}${time %M}${font LED_mono :size=25:style=Medium}${color 808080}${goto 235}${time %S}
##### Date #####
${voffset 8}${color yellow}${font URW Chancery L:style=Bold:size=18}${alignc}${exec date "+%A %d %B %Y"|sed 's/^.\| [a-z]/\U&/g'}
##### ville #####
${voffset -10}${goto 5}${color ffe595}${template1 Ville}
##### température actuelle #####
${voffset -10}${goto 15}${font URW Chancery L:style=Bold:size=30}${if_match ${template1 TempAct}<5}${color lightblue}${blink ${template1 TempAct}°}${else}${color white}${template1 TempAct}°${endif}
##### Affichage conditions météo #####
${voffset -25}${font URW Chancery L:style=Bold:size=12}${color white}${alignc}${template1 CondMeteo}
##### Affichage infos vent ######
${voffset -45}${color ffe595}${font Helvetica LT Std:style=Bold:size=10}${alignr}${template1 VentDirP}
${color ffe595}${font Helvetica LT Std:style=Bold:size=10}${goto 210}${template1 VentForce} km/h
#### Second cadre ####
##### Affichage temperature #####
${voffset 74}${goto 27}${font Ubuntu :size=10:style=bold}${color red}${template1 Jour_Temp 2}°${color white}/${color lightblue}${template1 Nuit_Temp 2}°${goto 97}${color red}${template1 Jour_Temp 3}°${color white}/${color lightblue}${template1 Nuit_Temp 3}°${goto 167}${color red}${template1 Jour_Temp 4}°${color white}/${color lightblue}${template1 Nuit_Temp 4}°${goto 237}${color red}${template1 Jour_Temp 5}°${color white}/${color lightblue}${template1 Nuit_Temp 5}°
##### Affichage vitesse du vent #####
${voffset -1}${font Ubuntu :size=9:style=bold}${color ffe595}${goto 27}${template1 Jour_VentForce 2}${font Ubuntu :size=6:style=bold} km/h${goto 97}${voffset -4}${font Ubuntu :size=9:style=bold}${template1 Jour_VentForce 3}${font Ubuntu :size=6:style=bold} km/h${goto 167}${voffset -4}${font Ubuntu :size=9:style=bold}${template1 Jour_VentForce 4}${font Ubuntu :size=6:style=bold} km/h${goto 237}${voffset -4}${font Ubuntu :size=9:style=bold}${template1 Jour_VentForce 5}${font Ubuntu :size=6:style=bold} km/h
##### Affichage Date #####
${voffset 1}${font Ubuntu :size=8:style=bold}${color white}${goto 28}${template1 Jour %a_%d 2}${goto 95}${template1 Jour %a_%d 3}${goto 168}${template1 Jour %a_%d 4}${goto 235}${template1 Jour %a_%d 5}
#### Affichage des cadres utilisés dans le conky ####
${voffset -935}
#### premier cadre ####
${template0 base.png 0,40 280x170}
${template0 flip_bg.png 24,10 100x100}
${template0 flip_bg.png 134,10 100x100}
#### Second cadre ####
${template0 base.png 0,245 280x50}
#### icônes premier cadre ####
${template2 IconeM ~/conky/meteo/icones 74,120 132x79}
${template2 IconeV ~/conky/meteo/icones/vent 235,130 44x44}
#### icônes Second cadre ####
${template2 AM_IconeM ~/conky/meteo/icones 0,225 86x52 2}
${template2 AM_IconeM ~/conky/meteo/icones 70,225 86x52 3}
${template2 AM_IconeM ~/conky/meteo/icones 140,225 86x52 4}
${template2 AM_IconeM ~/conky/meteo/icones 210,225 86x52 5}
Je te remercie vivement par avance
Xubuntu - Voyager 18.04 et 22.04
Hors ligne
#832 Le 07/05/2012, à 20:13
- Didier-T
Re : [Conky] Alternative à weather.com (2)
@jlfh0816,
Tu devrais jouer sur le ${voffset -935}, en diminuant le chiffre.
Commence par le mettre en remarque (#${voffset -935}), si tu ne met pas de conky où d’icônes en dessous de ce conky sa ne sera pas gênant.
Hors ligne
#833 Le 08/05/2012, à 07:36
- Didier-T
Re : [Conky] Alternative à weather.com (2)
Bonjour @ tous et toutes,
J'ai adopté Voyager, et comme bien sure je m’ennuyait, je me suis lancé dans le développement d'un petit script le conky-control et nous aurions besoins de testeurs, si sa vous intéresses voici le lien pour suivre la discutions faite attention tous de même le script d'installation ne fonctionneras pour le moment pas cher vous sauf si vous êtes sur Voyager, je le modifierais ce soir où demains et vous referais signe.
bien sure il peut faire fonctionner le conky météo.
Pour ceux qui sont intéressés, le script d'installation est modifié, apparemment tous fonctionne comme il faut sous gnome et xfce, reste à tester unity (mais sa devrais aller), KDE et lxde (pour ces deux là, j'ai un vieux doute)
P.S. : le lien est sur le post #2 de cette discutions
Hors ligne
#834 Le 08/05/2012, à 08:32
- jlfh0816
Re : [Conky] Alternative à weather.com (2)
@Didier-T
Merci beaucoup de ta suggestion. Je teste dès que possible (là, je ne suis pas chez moi) et je te tiendrai au courant du résultat.
Plus tard, j'installerai la version 12.04 de Voyager (j'ai tout mon /home 11.10 à sauvegarder et divers pilotes à ré-installer manuellement...) ce qui me permettra de tester également ton nouveau script pour conky-control. En tout cas, je suis ravi de te voir désormais sous Voyager !
Xubuntu - Voyager 18.04 et 22.04
Hors ligne
#835 Le 08/05/2012, à 14:12
- jlfh0816
Re : [Conky] Alternative à weather.com (2)
@Didier_T
Super, c'était bien ${voffset -935} qu'il fallait modifier. J'ai procéder par approximations successives et finalement la valeur ${voffset -285} est tout à fait correcte pour obtenir l'affichage du conky minimaliste souhaité.
Un grand merci à toi Didier_T, tes conseils sont toujours avisés et efficaces !
Xubuntu - Voyager 18.04 et 22.04
Hors ligne
#836 Le 08/05/2012, à 16:22
- manu1964
Re : [Conky] Alternative à weather.com (2)
Salut vous tous, @ jpdipsy encore moi il y avait bien un espace en trop ici
# creation rose
# "{{Images_Rose 0,0 169x169 60 100}}" laissez le commentaire du début sinon bash essaierea d'interpreter
entre le 60 et 100
merci ça va mieux, j'ai modifier un peu les couleurs des aiguilles en plus grand http://pix.toile-libre.org/upload/origi … 489275.png
c'est pas mal dur avec Gimp, je ne peux pas changer de fond d'écran car le météo graph ne s'affiche plus et pas de message d'erreur
sur le terminal. Depuis le début j'utilise conky_fond_ecran_xplanetFX et malgré ça le conky ne fonctionne pas en changeant de fond
d'écran. J'appelle le conky avec cette commande sur le terminal
conky -c ~/conky/Meteo-Lua/scripts
/conky_fond_ecran_xplanetFX
quand je le relance avec cette commande il réapparaît mais avec le fond d'écran
d'avant. Avez-vous une idée? merci d'avance
Dernière modification par manu1964 (Le 08/05/2012, à 16:24)
Hors ligne
#837 Le 08/05/2012, à 17:23
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Avez-vous une idée? merci d'avance
Hello content que ça avance.
Première chose dans creationmodule tu as ceci:
# Modifiez si besoin est les références à vos répertoires
path=~/conky/Meteo-Lua
#-----------------------------------------------------
source $path/configs/images_meteo.cfg 2>/dev/null
source $path/configs/meteo.cfg 2>/dev/null
rep=`echo $web | cut -d / -f6-7`
repertimages=$TempShell/$rep
fondbase=$repsauv/fond-base.png
fondtravail=$repsauv/fond-travaille.png
imagetemp=$repertimages/$temp.png
nomdufichier="Données"
la ligne imagetemp=$repertimages/$temp.png contient une erreur ( c'est ma faute ) corrige en
imagetemp=$repertimages/temp.png
ensuite apparement tu n'utilises pas xplanetFX ou je me trompe ? auquel cas c'est conkyrc.meteo.sh que tu dois utiliser
dans un terminal lance ~/conky/Meteo-Lua/scripts/verif_fond.sh et vois si le fond change
si tu utilises xfplanetFX dans les préférences tu dois ajouter ce qui suit
On l'aura un jour on l'aura.........
PS sur un forum le tutoiement est implicite
Hors ligne
#838 Le 08/05/2012, à 22:23
- manu1964
Re : [Conky] Alternative à weather.com (2)
bonsoir @ jpdipsy
la ligne imagetemp=$repertimages/$temp.png contient une erreur ( c'est ma faute sad ) corrige en
imagetemp=$repertimages/temp.png
fait
ensuite apparement tu n'utilises pas xplanetFX ou je me trompe
tu ne te trompe pas je n'utilise pas xplaneteFX car à chaque fois qu'il faisait une mise à jour le conky graph disparaîsait.
dans un terminal lance ~/conky/Meteo-Lua/scripts/verif_fond.sh et vois si le fond change
voilà le résultat
manuel1964@manuzouzou:~$ ~/conky/Meteo-Lua/scripts/verif_fond.sh
'file:////home/manuelsds/conky/Meteo-Lua/sauvegardes/fond-meteo.png'
manu1964@manuzouzou:~$
j'ouvre le conky graph avec la commande conky -c ~/conky/Meteo-Lua/scripts/conky_fond_ecran et ça donne ceci
Conky: forked to background, pid is 14563 manu1964@manuzouzou:~$
Conky: desktop window (1a00095) is subwindow of root window (1ad)
Conky: window type - override
Conky: drawing to created window (0x4c00001)
Conky: drawing to double buffer
version = v4
web = http://www.accuweather.com/fr/fr/thiers/132165/weather-forecast/132165
Pévision Nb jours = 6
Pévision Matin = oui
Pévision Après Midi = oui
Pévision Soirée = oui
Pévision Nuit = oui
Délais = 900
Chemin de travail = /tmp
Palier = 10
Chemin de sauvegarde = /home/manu1964/conky/Meteo-Lua/sauvegardes/
Mode = fondecran
et à mesure des mises à jour le terminal se remplis avec des lignes de Mode = fondecran mais là tout de suite rien ne va plus (faites vos jeux) ça recommence
composite: impossible d'ouvrir l'image `/home/manu1964/conky/Meteo-Lua/sauvegardes/fond-travaille.png': Am@r$
15&@[IB
qq
L"e2UT E @ error/blob.c/OpenBlob/2489.
composite: impossible d'ouvrir le fichier `/home/manu1964/conky/Meteo-Lua/sauvegardes/fond-travaille.png' @ error/png.c/ReadPNGImage/2951.
composite: nom de fichier d'image absent `/home/manu1964/conky/Meteo-Lua/sauvegardes/fond-travaille.png' @ error/composite.c/CompositeImageCommand/1607.
cp: impossible d'évaluer «/home/manu1964/conky/Meteo-Lua/sauvegardes/fond-travaille.png»: Aucun fichier ou dossier de ce type
ho ho il se fait tard je me remettrais à chercher un espace demain. Bonne nuit les petits
Hors ligne
#839 Le 12/05/2012, à 07:48
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
hello girls & boys
cogitations de la semaine
explications.
conky meteo mode fond d'écran avec un image_météo modifié
image de fond de la nasa retravaillée pour les couleurs (le rouge c'est violent mais s'adapte avec presque tout)
ajout des vaisseaux enterprise et klingon gérer par xplanetFX
si çà intéresse faire signe ?
Hors ligne
#840 Le 12/05/2012, à 07:53
- Didier-T
Re : [Conky] Alternative à weather.com (2)
Bonjour jpdipsy,
Je doit avouer que ça me plaît bien
Hors ligne
#841 Le 12/05/2012, à 08:42
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Bonjour jpdipsy,
Je doit avouer que ça me plaît bien
Merci
tiens je te met image météo modifié avec la correction de bug concernant l'affichage des icônes jour la nuit pour les deux scripts
en cause
if os.date("%H%M", os.time()) <= InfoJour[1].CoucherSoleilH..InfoJour[1].CoucherSoleilM and os.date("%H%M", os.time()) >= "0"..InfoJour[1].LeverSoleilH..InfoJour[1].LeverSoleilM then
voir post corrections
-- Créé par Didier-T (forum.ubuntu-fr.org), pour jpdipsy
-- Nécessite imagemagick http://apt.ubuntu.com/p/imagemagick
require "io"
require "os"
local Version = "v2"
local conditionJour = {}
local conditionNuit = {}
local conditionMatin = {}
local conditionAM = {}
local conditionSoiree = {}
local conditionNoct = {}
local InfoJour = {}
local conditioncourante = {}
local Thermometre = {}
local ThermometresRond = {}
local init_thermo = {}
local init_thermo_res = {}
local init_rose = {}
local init_rose_raf = {}
local lunaison = {}
local Barometre = {}
local Rep, cmd, jours, matin, apresmidi, soiree, nuit, delais, r, repsauv, l, Rep_Therm, Rep_Rose, Palier, t1, MAJHold, maj1, Nb_Thermo, Rep_Lune, Rep_Barometre, Rep_ThermRond, Nb_ThermRond, palier1, palier2, palier3, palier4, mise_en_page, fich_creationmodule
-- Création rose des vent par jpdipsy
function Rose(i, dp, v, nom, taille, opacite)
local angle, couleur, f ,couleurfont
local vitesse = "'"..v.." km/h'"
if v ~= nil then
f = tonumber(v)
else
f = 0
end
if f <= Palier then
couleur = palier1
couleurfont = palier1coulfont
elseif f <= Palier*2 then
couleur = palier2
couleurfont = palier2coulfont
elseif f <= Palier*3 then
couleur = palier3
couleurfont = palier3coulfont
elseif f >= (Palier*3)+1 then
couleur = palier4
couleurfont = palier4coulfont
end
if i == "Calme" then
angle = nil
elseif i == "N" then
angle = 0
elseif i == "NNE" then
angle = 22.5
elseif i == "NE" then
angle = 45
elseif i == "ENE" then
angle = 67.5
elseif i == "E" then
angle = 90
elseif i == "ESE" then
angle = 112.5
elseif i == "SE" then
angle = 135
elseif i == "SSE" then
angle = 157.5
elseif i == "S" then
angle = 180
elseif i == "SSO" then
angle = 202.5
elseif i == "SO" then
angle = 225
elseif i == "OSO" then
angle = 247.5
elseif i == "O" then
angle = 270
elseif i == "ONO" then
angle = 292.5
elseif i == "NO" then
angle = 315
elseif i == "NNO" then
angle = 337.5
else
angle = nil
end
if angle ~= nil then
os.execute(' convert -background transparent '..Rep_Rose..'/'..couleur..' -rotate '..angle..' '..Rep..'/dir_rot.png && composite -compose Over -gravity Center '..Rep..'/dir_rot.png '..Rep_Rose..'/base.png '..Rep..'/'..nom..'.png')
--os.execute(' convert -background transparent '..Rep_Rose..'/Calme.png -rotate -'..angle..' '..Rep..'/dir_rot.png && composite -compose Over -gravity Center '..Rep..'/dir_rot.png '..Rep_Rose..'/'..couleur..' '..Rep..'/'..nom..'.png')
else
os.execute(' composite -compose Over -gravity Center '..Rep_Rose..'/Calme.png '..Rep_Rose..'/base.png '..Rep..'/'..nom..'.png')
end
os.execute(' convert '..Rep..'/'..nom..'.png -font '..repfonts..'/AlteHaasGroteskBold.ttf -fill '..couleurfont..' -pointsize 40 -gravity center -annotate +0+0 '..vitesse..' '..Rep..'/'..nom..'.png && mogrify -resize '..taille..'! '..Rep..'/'..nom..'.png && composite -blend 0x'..opacite..' null: '..Rep..'/'..nom..'.png -matte '..Rep..'/'..nom..'.png')
end
-- Récupération des infos à afficher
function Recup(info)
local num = info:match("%d+")
if num ~= nil then
info = string.gsub(info, num, "")
num = tonumber(num)
end
info = string.gsub(info, " ", "")
if info == "TempRes" then
T1 = conditioncourante.Tempr
elseif info == "TempAct" then
T1 = conditioncourante.Temp
elseif info == "Rose" then
T1 = conditioncourante.PointRosee
elseif info == "Pression" then
T1 = conditioncourante.Pression
elseif info == "Jour_Temp" then
T1 = conditionJour[num].Temp
elseif info == "Jour_TempRes" then
T1 = conditionJour[num].TempRes
elseif info == "Nuit_Temp" then
T1 = conditionNuit[num].Temp
elseif info == "Nuit_TempRes" then
T1 = conditionNuit[num].TempRes
elseif info == "Histo_Max" then
T1 = InfoJour[num].Histo_Max
elseif info == "Histo_Min" then
T1 = InfoJour[num].Histo_Min
elseif info == "Matin_TempMax" then
T1 = conditionMatin[num].TempMax
elseif info == "Matin_TempMin" then
T1 = conditionMatin[num].TempMin
elseif info == "Matin_TempMaxRes" then
T1 = conditionMatin[num].TempMaxR
elseif info == "Matin_TempMinRes" then
T1 = conditionMatin[num].TempMinR
elseif info == "Matin_Rose" then
T1 = conditionMatin[num].PointRosee
elseif info == "AM_TempMax" then
T1 = conditionAM[num].TempMax
elseif info == "AM_TempMin" then
T1 = conditionAM[num].TempMin
elseif info == "AM_TempMaxRes" then
T1 = conditionAM[num].TempMaxR
elseif info == "AM_TempMinRes" then
T1 = conditionAM[num].TempMinR
elseif info == "AM_Rose" then
T1 = conditionAM[num].PointRosee
elseif info == "Soiree_TempMax" then
T1 = conditionSoiree[num].TempMax
elseif info == "Soiree_TempMin" then
T1 = conditionSoiree[num].TempMin
elseif info == "Soiree_TempMaxRes" then
T1 = conditionSoiree[num].TempMaxR
elseif info == "Soiree_TempMinRes" then
T1 = conditionSoiree[num].TempMinR
elseif info == "Soiree_Rose" then
T1 = conditionSoiree[num].PointRosee
elseif info == "Noct_TempMax" then
T1 = conditionNoct[num].TempMax
elseif info == "Noct_TempMin" then
T1 = conditionNoct[num].TempMin
elseif info == "Noct_TempMaxRes" then
T1 = conditionNoct[num].TempMaxR
elseif info == "Noct_TempMinRes" then
T1 = conditionNoct[num].TempMinR
elseif info == "Noct_Rose" then
T1 = conditionNoct[num].PointRosee
end
T1 = tonumber(T1)
if T1 <= -30 then
T1 = -30
elseif T1 >= 50 then
T1 = 50
end
return T1
end
-- Création thermomètre par jpdipsy
function CreaThermometre(TherNb)
local NbPlot
local Tbase = Thermometre[TherNb].base
local Alcool = Thermometre[TherNb].mercure
Alcool = string.gsub(Alcool, " ", "")
local InfoAlcool = Recup(Thermometre[TherNb].mercure_info)
local Plot = {}
local InfoPlot = {}
if Thermometre[TherNb].plot ~= "" then
local PlotCherche = Thermometre[TherNb].plot
PlotCherche = string.gsub(PlotCherche, " ", "")
local InfoPlotCherche = Thermometre[TherNb].plot_info
local pos1 = 0
NbPlot = 0
while pos1 ~= nil do
local pos2 = string.find(PlotCherche, ",", pos1+1)
NbPlot = NbPlot+1
if pos2 ~= nil then
Plot[NbPlot] = string.sub(PlotCherche, pos1+1, pos2-1)
else
Plot[NbPlot] = string.sub(PlotCherche, pos1+1)
end
pos1 = pos2
end
pos1 = 0
NbPlot = 0
while pos1 ~= nil do
local pos2 = string.find(InfoPlotCherche, ",", pos1+1)
NbPlot = NbPlot+1
if pos2 ~= nil then
InfoPlot[NbPlot] = Recup(string.sub(InfoPlotCherche, pos1+1, pos2-1))
else
InfoPlot[NbPlot] = Recup(string.sub(InfoPlotCherche, pos1+1))
end
pos1 = pos2
end
end
if InfoAlcool > -30 then
local T1 = (InfoAlcool*5)+150
os.execute( "convert "..Rep_Therm.."/"..Alcool.." -resize 20x"..T1.."! "..Rep.."/colonne.png && composite -compose Over -geometry -0+108 -gravity South "..Rep.."/colonne.png "..Rep_Therm.."/"..Tbase.." "..Rep.."/Thermo"..TherNb..".png" )
else
os.execute( "cp "..Rep_Therm.."/"..Tbase.." "..Rep.."/Thermo"..TherNb..".png" )
end
if NbPlot ~= nil then
for i = 1, NbPlot do
T2 = InfoPlot[i]
local pos_T2 = (T2*5) +258
os.execute("composite -compose Over -geometry -0+"..pos_T2.." -gravity South "..Rep_Therm.."/"..Plot[i].." "..Rep.."/Thermo"..TherNb..".png "..Rep.."/Thermo"..TherNb..".png")
end
end
os.execute('mogrify -resize '..Thermometre[TherNb].taille..'! '..Rep..'/Thermo'..TherNb..'.png && composite -blend 0x'..Thermometre[TherNb].opacite..' null: '..Rep..'/Thermo'..TherNb..'.png -matte '..Rep..'/Thermo'..TherNb..'.png')
end
function CreaThermometreRond(TherNb)
local val
os.execute(' cp '..Rep_ThermRond..'/base.png '..Rep..'/Thermorond'..TherNb..'.png')
if ThermometresRond[TherNb].bleu ~= nil then
val = Recup(ThermometresRond[TherNb].bleu)
val = string.gsub(val, " ", "")
cree("ind-bleu", val, TherNb)
end
if ThermometresRond[TherNb].rouge ~= nil then
val = Recup(ThermometresRond[TherNb].rouge)
val = string.gsub(val, " ", "")
cree("ind-rouge", val, TherNb)
end
if ThermometresRond[TherNb].vert ~= nil then
val = Recup(ThermometresRond[TherNb].vert)
val = string.gsub(val, " ", "")
cree("ind-vert", val, TherNb)
end
if ThermometresRond[TherNb].jaune ~= nil then
val = Recup(ThermometresRond[TherNb].jaune)
val = string.gsub(val, " ", "")
cree("ind-jaune", val, TherNb)
end
if ThermometresRond[TherNb].blanc ~= nil then
val = Recup(ThermometresRond[TherNb].blanc)
val = string.gsub(val, " ", "")
cree("ind-blanc", val, TherNb)
end
if ThermometresRond[TherNb].aiguille ~= nil then
val = Recup(ThermometresRond[TherNb].aiguille)
val = string.gsub(val, " ", "")
cree("aiguille", val, TherNb)
end
os.execute('mogrify -resize '..ThermometresRond[TherNb].taille..'! '..Rep..'/Thermorond'..TherNb..'.png && composite -blend 0x'..ThermometresRond[TherNb].opacite..' null: '..Rep..'/Thermorond'..TherNb..'.png -matte '..Rep..'/Thermorond'..TherNb..'.png')
end
function cree(aiguille, angle, TherNb)
angle = (angle*4)-40
os.execute(' convert -background transparent '..Rep_ThermRond..'/'..aiguille..'.png -rotate '..angle..' '..Rep..'/direction_rot.png && composite -compose Over -gravity Center '..Rep..'/direction_rot.png '..Rep..'/Thermorond'..TherNb..'.png '..Rep..'/Thermorond'..TherNb..'.png')
end
function lune()
local j, h, m = Age:match("(%d+) Jours (%d+)h (%d+)m")
if j == nil then
j, h, m = Age:match("(%d+) Jour (%d+)h (%d+)m")
if j == nil then
h, m = Age:match("(%d+)h (%d+)m")
j = 0
end
end
local angle = ((360/42524)*((((j*24)+h)*60)+m))+180
os.execute(' convert -background transparent '..Rep_Lune..'/indicateur.png -rotate '..angle..' '..Rep..'/indicateur_rot.png && composite -compose Over -gravity Center '..Rep..'/indicateur_rot.png '..Rep_Lune..'/lune-base.png '..Rep..'/lune.png && mogrify -resize '..lunaison.taille..'! '..Rep..'/lune.png && composite -blend 0x'..lunaison.opacite..' null: '..Rep..'/lune.png -matte '..Rep..'/lune.png')
end
function Baro()
local angle = ((conditioncourante.Pression-980)*4.5)-135
---- Aiguille
os.execute('convert -background transparent '..Rep_Barometre..'/aiguille.png -rotate '..angle..' '..Rep..'/aiguille_rot.png && composite -compose Over -gravity Center '..Rep..'/aiguille_rot.png '..Rep_Barometre..'/base.png '..Rep..'/Barometre.png && mogrify -resize '..Barometre.taille..'! '..Rep..'/Barometre.png && composite -blend 0x'..Barometre.opacite..' null: '..Rep..'/Barometre.png -matte '..Rep..'/Barometre.png')
end
-- initialisation création rose des sables
function fonc_init_rose()
for j = 1,jours do
init_rose[j] = {CondCour=nil, Jour=nil, Nuit=nil, Matin=nil, AM=nil, Soiree=nil, Noct=nil}
init_rose_raf[j]= {CondCour=nil, Jour=nil, Nuit=nil, Matin=nil, AM=nil, Soiree=nil, Noct=nil}
end
end
-----Affichage Barometre
function conky_Images_Barometre(p, s, f, o)
if Barometre.taille == nil then
Barometre.opacite = o
Barometre.taille = s
Baro()
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/Barometre.png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/Barometre.png "
end
end
-----Affichage lune
function conky_Images_Lunaison(p, s, f, o)
if lunaison.taille == nil then
lunaison.opacite = o
lunaison.taille = s
lune()
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/lune.png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/lune.png "
end
end
-----Affichage Thermometre
function conky_Images_Thermo(p, s, f, n, o)
n = tonumber(n)
if Thermometre[n].opacite == nil then
Thermometre[n].opacite = o
Thermometre[n].taille = s
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/Thermo"..n..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/Thermo"..n..".png"
end
end
function conky_Images_ThermoRond(p, s, f, n, o, a, b, c, d)
--p=position s=taille f=frequence de rafraichissement n=num therm o=opacité a=info 1 b=info 2 c=info 3 d=info 4
n = tonumber(n)
if ThermometresRond[n] == nil then
ThermometresRond[n] = {}
Nb_ThermRond = n
local pos
if a ~= nil then
a = string.gsub(a, "-", " ")
if string.find(a, 'a=') ~= nil then
pos = string.find(a, '=')
ThermometresRond[n].aiguille = string.sub(a, pos+1)
elseif string.find(a, 'b=') ~= nil then
pos = string.find(a, '=')
ThermometresRond[n].bleu = string.sub(a, pos+1)
elseif string.find(a, 'r=') ~= nil then
pos = string.find(a, '=')
ThermometresRond[n].rouge = string.sub(a, pos+1)
elseif string.find(a, 'v=') ~= nil then
pos = string.find(a, '=')
ThermometresRond[n].vert = string.sub(a, pos+1)
elseif string.find(a, 'j=') ~= nil then
pos = string.find(a, '=')
ThermometresRond[n].jaune = string.sub(a, pos+1)
elseif string.find(a, 'w=') ~= nil then
pos = string.find(a, '=')
ThermometresRond[n].blanc = string.sub(a, pos+1)
end
end
if b ~= nil then
b = string.gsub(b, "-", " ")
if string.find(b, 'a=') ~= nil then
pos = string.find(b, '=')
ThermometresRond[n].aiguille = string.sub(b, pos+1)
elseif string.find(b, 'b=') ~= nil then
pos = string.find(b, '=')
ThermometresRond[n].bleu = string.sub(b, pos+1)
elseif string.find(b, 'r=') ~= nil then
pos = string.find(b, '=')
ThermometresRond[n].rouge = string.sub(b, pos+1)
elseif string.find(b, 'v=') ~= nil then
pos = string.find(b, '=')
ThermometresRond[n].vert = string.sub(b, pos+1)
elseif string.find(b, 'j=') ~= nil then
pos = string.find(b, '=')
ThermometresRond[n].jaune = string.sub(b, pos+1)
elseif string.find(b, 'w=') ~= nil then
pos = string.find(b, '=')
ThermometresRond[n].blanc = string.sub(b, pos+1)
end
end
if c ~= nil then
c = string.gsub(c, "-", " ")
if string.find(c, 'a=') ~= nil then
pos = string.find(c, '=')
ThermometresRond[n].aiguille = string.sub(c, pos+1)
elseif string.find(c, 'b=') ~= nil then
pos = string.find(c, '=')
ThermometresRond[n].bleu = string.sub(c, pos+1)
elseif string.find(c, 'r=') ~= nil then
pos = string.find(c, '=')
ThermometresRond[n].rouge = string.sub(c, pos+1)
elseif string.find(c, 'v=') ~= nil then
pos = string.find(c, '=')
ThermometresRond[n].vert = string.sub(c, pos+1)
elseif string.find(c, 'j=') ~= nil then
pos = string.find(c, '=')
ThermometresRond[n].jaune = string.sub(c, pos+1)
elseif string.find(c, 'w=') ~= nil then
pos = string.find(c, '=')
ThermometresRond[n].blanc = string.sub(c, pos+1)
end
end
if d ~= nil then
d = string.gsub(d, "-", " ")
if string.find(d, 'a=') ~= nil then
pos = string.find(d, '=')
ThermometresRond[n].aiguille = string.sub(d, pos+1)
elseif string.find(d, 'b=') ~= nil then
pos = string.find(d, '=')
ThermometresRond[n].bleu = string.sub(d, pos+1)
elseif string.find(d, 'r=') ~= nil then
pos = string.find(d, '=')
ThermometresRond[n].rouge = string.sub(d, pos+1)
elseif string.find(d, 'v=') ~= nil then
pos = string.find(d, '=')
ThermometresRond[n].vert = string.sub(d, pos+1)
elseif string.find(a, 'j=') ~= nil then
pos = string.find(d, '=')
ThermometresRond[n].jaune = string.sub(d, pos+1)
elseif string.find(d, 'w=') ~= nil then
pos = string.find(d, '=')
ThermometresRond[n].blanc = string.sub(d, pos+1)
end
end
ThermometresRond[n].taille = s
ThermometresRond[n].opacite = o
CreaThermometreRond(n)
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/Thermorond"..n..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/Thermorond"..n..".png"
end
end
-----Affichage rose des sables
--Condition courante
function conky_Images_Rose(p, s, f, o)
j = 1
if init_rose[j].CondCour == nil then
Rose(conditioncourante.VentDir, conditioncourante.VentPlein, conditioncourante.VentForce, "Rose", s, o)
init_rose[j].CondCour = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/Rose.png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/Rose.png"
end
end
--Prévision sur la journée
function conky_Images_Jour_Rose(p, s, f, j, o)
j = tonumber(j)
if init_rose[j].Jour == nil then
Rose(conditionJour[j].VentDir, conditionJour[j].VentP, conditionJour[j].VentForce, "RoseJour"..j, s, o)
init_rose[j].Jour = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseJour"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseJour"..j..".png"
end
end
function conky_Images_Jour_RoseR(p, s, f, j, o)
j = tonumber(j)
if init_rose_raf[j].Jour == nil then
Rose(conditionJour[j].VentDir, conditionJour[j].VentP, conditionJour[j].VentRafales, "RoseJourR"..j, s, o)
init_rose_raf[j].Jour = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseJourR"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseJourR"..j..".png"
end
end
--Prévision sur la nuit
function conky_Images_Nuit_Rose(p, s, f, j, o)
j = tonumber(j)
if init_rose[j].Nuit == nil then
Rose(conditionNuit[j].VentDir, conditionNuit[j].VentP, conditionNuit[j].VentForce, "RoseNuit"..j, s, o)
init_rose[j].Nuit = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseNuit"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseNuit"..j..".png"
end
end
function conky_Images_Nuit_RoseR(p, s, f, j, o)
j = tonumber(j)
if init_rose_raf[j].Nuit == nil then
Rose(conditionNuit[j].VentDir, conditionNuit[j].VentP, conditionNuit[j].VentRafales, "RoseNuitR"..j, s, o)
init_rose_raf[j].Nuit = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseNuitR"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseNuitR"..j..".png"
end
end
--Condition Matinée
function conky_Images_Matin_Rose(p, s, f, j, o)
j = tonumber(j)
if init_rose[j].Matin == nil then
Rose(conditionMatin[j].VentDir, conditionMatin[j].VentP, conditionMatin[j].VentForce, "RoseMatin"..j, s, o)
init_rose[j].Matin = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseMatin"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseMatin"..j..".png"
end
end
--Condition Après midi
function conky_Images_AM_Rose(p, s, f, j, o)
j = tonumber(j)
if init_rose[j].AM == nil then
Rose(conditionAM[j].VentDir, conditionAM[j].VentP, conditionAM[j].VentForce, "RoseAM"..j, s, o)
init_rose[j].AM = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseAM"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseAM"..j..".png"
end
end
--Condition soirée
function conky_Images_Soiree_Rose(p, s, f, j, o)
j = tonumber(j)
if init_rose[j].Soiree == nil then
Rose(conditionSoiree[j].VentDir, conditionSoiree[j].VentP, conditionSoiree[j].VentForce, "RoseSoiree"..j, s, o)
init_rose[j].Soiree = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseSoiree"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseSoiree"..j..".png"
end
end
--Condition Nuit
function conky_Images_Noct_Rose(p, s, f, j, o)
j = tonumber(j)
if init_rose[j].Noct == nil then
Rose(conditionNoct[j].VentDir, conditionNoct[j].VentP, conditionNoct[j].VentForce, "RoseNoct"..j, s, o)
init_rose[j].Noct = 1
end
if Mode ~= "fondecran" then
return "${image "..Rep.."/RoseNoct"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
else
return Rep.."/RoseNoct"..j..".png"
end
end
--Récupération de données
function conky_Images_MAJ(cfg)
local s = '${lua Meteo_etat_MAJ}'
local MAJ = conky_parse( s )
if maj1 == nil then
init(cfg)
maj1 = "ok"
MAJHold = MAJ+1
end
if MAJ ~= MAJHold then
MAJHold = MAJ
--Récupération dernière condition courante
local file = assert(io.open(repsauv.."CondCour", "r") )
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
local t = {"Icone", "Tempr", "Temp", "Cond", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "VentDir", "VentPlein", "VentForce", "VentIcone", "Humidite", "PointRosee", "Pression", "Visibilite", "Date", "Ville", "CouvNuage", "Uv", "QPrec", "latitude", "longitude"}
for i = 1,23 do
conditioncourante[t[i]] = donee[i]
end
time = donee[24]
io.close(file)
--Récupération prévision
for j = 1,jours do
local file = assert(io.open(repsauv.."prevision"..j, "r"))
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
local info = {}
local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "Temp", "TempRes", "ProbPrec", "VentDir", "VentP", "VentForce", "VentRafales", "Uv", "ProbOrage", "NivPrec", "QPluie", "QNeige", "Icone", "VentIcone", "RafalesIcone", "EVerglas"}
conditionJour[j] = {}
for i = 1, 21 do
info[t[i]] = donee[i]
end
conditionJour[j] = info
local info1 = {}
t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "Temp", "TempRes", "ProbPrec", "VentDir", "VentP", "VentForce", "VentRafales", "ProbOrage", "NivPrec", "QPluie", "QNeige", "Icone", "VentIcone", "RafalesIcone", "EVerglas"}
conditionNuit[j] = {}
for i = 22, 41 do
info1[t[i-21]] = donee[i]
end
conditionNuit[j] = info1
local info2 = {}
t= {"Jour", "LeverSoleilH", "LeverSoleilM", "CoucherSoleilH", "CoucherSoleilM", "Histo_Max", "Histo_Min"}
InfoJour[j] = {}
for i = 42, 48 do
info2[t[i-41]] = donee[i]
end
InfoJour[j] = info2
io.close(file)
if matin == "oui" then
local file = assert(io.open(repsauv.."matin"..j, "r"))
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
conditionMatin[j] = {}
local info3 = {}
for i = 1, 21 do
info3[t[i]] = donee[i]
end
conditionMatin[j] = info3
io.close(file)
end
if apresmidi == "oui" then
local file = assert(io.open(repsauv.."ApresMidi"..j, "r"))
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
conditionAM[j] = {}
local info3 = {}
for i = 1, 21 do
info3[t[i]] = donee[i]
end
conditionAM[j] = info3
io.close(file)
end
if soiree == "oui" then
local file = assert(io.open(repsauv.."Soiree"..j, "r"))
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
conditionSoiree[j] = {}
local info3 = {}
for i = 1, 21 do
info3[t[i]] = donee[i]
end
conditionSoiree[j] = info3
io.close(file)
end
if nuit == "oui" then
local file = assert(io.open(repsauv.."Nuit"..j, "r"))
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
conditionNoct[j] = {}
local info3 = {}
for i = 1, 21 do
info3[t[i]] = donee[i]
end
conditionNoct[j] = info3
io.close(file)
end
end
--Récupération lunaison
local file = assert(io.open(repsauv.."lunaison", "r"))
local line = file:read()
local i = 0
local donee = {}
for line in file:lines() do
i = i+1
donee[i] = line
end
ephemerides = donee[1]
ephemerides1 = donee[2]
ephemerides2 = donee[3]
Visibilite = donee[4]
Phases = donee[5]
Phases1 = donee[6]
Phases2 = donee[7]
Noeud_lunaire = donee[8]
Apogee = donee[9]
Perigee = donee[10]
Distance = donee[11]
Age = donee[12]
Lever_LuneHeure = donee[13]
Lever_LuneMinute = donee[14]
Coucher_LuneHeure = donee[15]
Coucher_LuneMinute = donee[16]
Eclipse_partielle = donee[17]
Eclipse_total = donee[18]
io.close(file)
if Barometre.taille ~= nil then Baro() end
if lunaison.taille ~= nil then lune() end
fonc_init_rose()
local i = 0
while i ~= Nb_Thermo do
i = i+1
CreaThermometre(i)
end
i = 0
while i ~= Nb_ThermRond do
i = i+1
CreaThermometreRond(i)
end
if Mode == "fondecran" then
FondEcran_init()
end
if Mode == "fondinactif" then
FondInactif_init()
end
collectgarbage()
end
return ""
end
--initialisation paramètres
function init(cfg)
local home = os.getenv("HOME")
cfg = string.gsub(cfg, "~", home)
cfg = string.gsub(cfg, "$HOME", home)
Nb_Thermo = 0
Nb_ThermRond = 0
local Thermo = false
local ThermRond = false
local file = assert(io.open(cfg, "rb") )
local line = file:read()
for line in file:lines() do
local pos1 = string.find(line, '#')
if pos1 ~= nil then
line = string.sub(line, 1, pos1-1)
end
pos1 = string.find(line, '=')
if string.find(line, 'Therm=') ~= nil then
Rep_Therm = string.sub(line, pos1+1)
elseif string.find(line, 'repfonts=') ~= nil then
repfonts = string.sub(line, pos1+1)
elseif string.find(line, 'ThermRond=') ~= nil then
Rep_ThermRond = string.sub(line, pos1+1)
elseif string.find(line, 'Rose=') ~= nil then
Rep_Rose = string.sub(line, pos1+1)
elseif string.find(line, 'palier1=') ~= nil then
palier1 = string.sub(line, pos1+1)
elseif string.find(line, 'palier2=') ~= nil then
palier2 = string.sub(line, pos1+1)
elseif string.find(line, 'palier3=') ~= nil then
palier3 = string.sub(line, pos1+1)
elseif string.find(line, 'palier4=') ~= nil then
palier4 = string.sub(line, pos1+1)
elseif string.find(line, 'palier1coulfont=') ~= nil then
palier1coulfont = string.sub(line, pos1+1)
elseif string.find(line, 'palier2coulfont=') ~= nil then
palier2coulfont = string.sub(line, pos1+1)
elseif string.find(line, 'palier3coulfont=') ~= nil then
palier3coulfont = string.sub(line, pos1+1)
elseif string.find(line, 'palier4coulfont=') ~= nil then
palier4coulfont = string.sub(line, pos1+1)
elseif string.find(line, 'Lune=') ~= nil then
Rep_Lune = string.sub(line, pos1+1)
elseif string.find(line, 'Barometre=') ~= nil then
Rep_Barometre = string.sub(line, pos1+1)
elseif string.find(line, 'repmeteo=') ~= nil then
repmeteo = string.sub(line, pos1+1)
elseif string.find(line, 'IconesRep=') ~= nil then
IconesRep = string.sub(line, pos1+1)
elseif string.find(line, 'Mode=') ~= nil then
Mode = string.sub(line, pos1+1)
elseif string.find(line, 'MiseEnPage=') ~= nil then
mise_en_page = string.sub(line, pos1+1)
mise_en_page = string.gsub(mise_en_page, "~", home)
mise_en_page = string.gsub(mise_en_page, "$HOME", home)
pos = string.find(mise_en_page, "creationmodules")
fich_creationmodule = string.sub(mise_en_page, pos)..".sh"
end
--debut thermomètre mercure
if string.find(line, 'Thermometres=') ~= nil then
Thermo = true
Nb_Thermo = Nb_Thermo+1
Thermometre[tonumber(Nb_Thermo)] = {}
end
if Thermo ~= false then
if string.find(line, 'base=') ~= nil then
Thermometre[Nb_Thermo].base = string.sub(line, pos1+1)
elseif string.find(line, 'mercure=') ~= nil then
Thermometre[Nb_Thermo].mercure = string.sub(line, pos1+1)
elseif string.find(line, 'mercure_info=') ~= nil then
local pos2 = string.find(line, '}')
if pos2 ~= nil then
Thermometre[Nb_Thermo].mercure_info = string.sub(line, pos1+1, pos2-1)
else
Thermometre[Nb_Thermo].mercure_info = string.sub(line, pos1+1)
end
elseif string.find(line, 'plot=') ~= nil then
Thermometre[Nb_Thermo].plot = string.sub(line, pos1+1)
elseif string.find(line, 'plot_info=') ~= nil then
local pos2 = string.find(line, '}')
Thermometre[Nb_Thermo].plot_info = string.sub(line, pos1+1, pos2-1)
end
pos1 = string.find(line, '}')
if pos1 ~= nil then
line = string.sub(line, pos1)
if string.find(line, ',') == nil then
Thermo = false
else
Nb_Thermo = Nb_Thermo+1
Thermometre[Nb_Thermo] = {}
end
end
end
--fin thermomètre
end
io.close(file)
local fichier_init = conky_parse( "${lua Meteo_fichier_init}" )
local file = assert(io.open(fichier_init, "rb") )
local line = file:read()
for line in file:lines() do
local pos1 = string.find(line, '#')
if pos1 ~= nil then
line = string.sub(line, 1, pos1-1)
end
pos1 = string.find(line, '=')
if string.find(line, 'repsauv=') ~= nil then
repsauv = string.sub(line, pos1+1)
elseif string.find(line, 'TempShell=') ~= nil then
r = string.sub(line, pos1+1)
elseif string.find(line, 'web=') ~= nil then
cmd1 = string.sub(line, pos1+1)
elseif string.find(line, 'periode=') ~= nil then
jours = string.sub(line, pos1+1)
elseif string.find(line, 'matinée=') ~= nil then
matin = string.sub(line, pos1+1)
elseif string.find(line, 'am=') ~= nil then
apresmidi = string.sub(line, pos1+1)
elseif string.find(line, 'soiree=') ~= nil then
soiree = string.sub(line, pos1+1)
elseif string.find(line, 'nuit=') ~= nil then
nuit = string.sub(line, pos1+1)
elseif string.find(line, 'Therm=') ~= nil then
Rep_Therm = string.sub(line, pos1+1)
elseif string.find(line, 'Rose=') ~= nil then
Rep_Rose = string.sub(line, pos1+1)
elseif string.find(line, 'Palier=') ~= nil then
Palier = tonumber(string.sub(line, pos1+1))
elseif string.find(line, 'update=') ~= nil then
delais = string.sub(line, pos1+1)
end
end
io.close(file)
r = string.gsub(r, "~", home)
r = string.gsub(r, "$HOME", home)
repsauv = string.gsub(repsauv, "~", home)
repsauv = string.gsub(repsauv, "$HOME", home)
repsauv = repsauv.."/"
--Création répertoire de travail
l = cmd1:match("/(%d+)")
if string.find(cmd1, 'forecast') ~= nil then
pos1 = string.find(cmd1, '/weather')
cmd = string.sub(cmd1, 0, pos1-1)
else
pos1 = string.find(cmd1, '/current')
cmd = string.sub(cmd1, 0, pos1-1)
end
local bar, bar1
local l1 = string.gsub(cmd, '/'..l, "" )
local b = 1
while bar1 == nil do
b = b+1
bar1 = string.find(l1, '/', -b)
end
l1 = string.sub(l1, bar1+1)
Rep = r.."/"..l1.."/"..l
MAJHold = "10"
return ""
end
------------------------------------------------------------- Fond ecran --------------------------------------------------
function FondEcran_init()
print("","Mode = "..Mode.."\n", "creationmodule = "..fich_creationmodule)
-- etat du script pour verif_fond
os.execute('echo "Maj" >'..Rep..'/statut.txt ')
-- Sauvegarde fond ecran
os.execute(repmeteo..'/scripts/fond.ori.sh sauvegarde')
-- creation des modules externes
creation_module(mise_en_page)
-- Maj du fond d'écran
os.execute(repmeteo..'/scripts/integration.sh')
end
function FondInactif_init()
print("","Mode = "..Mode.."\n", "creationmodule = "..fich_creationmodule)
-- creation des modules externes
creation_module(mise_en_page)
end
function conky_extinction()
-- remise en place fond ecran-effacement des balises
os.execute('rm -f '..Rep..'/pidfond && rm -f '..Rep..'/statut.txt && '..repmeteo..'/scripts/fond.ori.sh restauration')
end
function mise_en_forme(x)
local pos = string.find(x, "{{")
local Nb = 0
local info, pos1
while pos ~= nil do
Nb = Nb+1
if Nb == 1 then
code = string.sub(x, 0, pos-1)
else
code = code..string.sub(x, pos1+2, pos-1)
end
pos1 = string.find(x, "}}", pos+2)
info = string.sub(x, pos+2, pos1-1)
code = code..Recup_info(info)
pos = string.find(x, "{{", pos1+2)
end
if pos1 ~= nil then
code = code..string.sub(x, pos1+2)
else
code = x
end
return code
end
function creation_module(creationmodules)
------------copie et recuperation du fichier
local file = io.open(creationmodules)
local line = file:read()
local file1 = io.open(Rep.."/"..fich_creationmodule, "w+" )
------------- mise en place fichier + entête
file1:write ("#!/bin/bash \n\n")
------------------------------------------------------------------------
for line in file:lines() do
---------------------------------------------------------
file1:write (mise_en_forme(line), "\n")
---------------------------------------------------------
end
------ fermeture et ecriture
io.close(file1)
io.close(file)
------ execution du fichier bash
os.execute('chmod +x '..Rep..'/'..fich_creationmodule..' && '..Rep..'/'..fich_creationmodule)
end
function Recup_info(x)
local info, pos1, pos
pos = string.find(x, " ")
if pos ~= nil then
info = string.sub(x, 0, pos-1)
pos1 = string.find(x, " ", pos+1)
else
info = x
end
if pos ~= nil then
if pos1 ~= nil then
arg1 = string.sub(x, pos+1, pos1-1)
pos = string.find(x, " ", pos1+1)
else
arg1 = string.sub(x, pos+1)
end
if pos1 ~= nil then
if pos ~= nil then
arg2 = string.sub(x, pos1+1, pos-1)
pos1 = string.find(x, " ", pos+1)
else
arg2 = string.sub(x, pos1+1)
end
if pos ~= nil then
if pos1 ~= nil then
arg3 = string.sub(x, pos+1, pos1-1)
pos = string.find(x, " ", pos1+1)
else
arg3 = string.sub(x, pos+1)
end
if pos1 ~= nil then
if pos ~= nil then
arg4 = string.sub(x, pos1+1, pos-1)
pos1 = string.find(x, " ", pos+1)
else
arg4 = string.sub(x, pos1+1)
end
if pos ~= nil then
if pos1 ~= nil then
arg5 = string.sub(x, pos+1, pos1-1)
pos = string.find(x, " ", pos1+1)
else
arg5 = string.sub(x, pos+1)
end
if pos1 ~= nil then
if pos ~= nil then
arg6 = string.sub(x, pos1+1, pos-1)
pos1 = string.find(x, " ", pos+1)
else
arg6 = string.sub(x, pos1+1)
end
if pos ~= nil then
if pos1 ~= nil then
arg7 = string.sub(x, pos+1, pos1-1)
pos = string.find(x, " ", pos1+1)
else
arg7 = string.sub(x, pos+1)
end
if pos1 ~= nil then
if pos ~= nil then
arg8 = string.sub(x, pos1+1, pos-1)
pos1 = string.find(x, " ", pos+1)
else
arg8 = string.sub(x, pos1+1)
end
if pos ~= nil then
if pos1 ~= nil then
arg9 = string.sub(x, pos+1, pos1-1)
pos = string.find(x, " ", pos1+1)
else
arg9 = string.sub(x, pos+1)
end
if pos1 ~= nil then
if pos ~= nil then
arg10 = string.sub(x, pos1+1, pos-1)
pos1 = string.find(x, " ", pos+1)
else
arg10 = string.sub(x, pos1+1)
end
if pos ~= nil then
if pos1 ~= nil then
arg11 = string.sub(x, pos+1, pos1-1)
pos = string.find(x, " ", pos1+1)
else
arg11 = string.sub(x, pos+1)
end
end
end
end
end
end
end
end
end
end
end
end
if info == "Meteo_TempRes" then
return conditioncourante.Tempr
elseif info == "Meteo_TempAct" then
return conditioncourante.Temp
elseif info == "Meteo_CondMeteo" then
return conditioncourante.Cond
elseif info == "Meteo_CondMeteo1" then
return conditioncourante.Cond1
elseif info == "Meteo_CondMeteo2" then
return conditioncourante.Cond2
elseif info == "Meteo_CondMeteo1se" then
return conditioncourante.Cond1se
elseif info == "Meteo_CondMeteo2se" then
return conditioncourante.Cond2se
elseif info == "Meteo_VentDir" then
return conditioncourante.VentDir
elseif info == "Meteo_VentDirP" then
return conditioncourante.VentPlein
elseif info == "Meteo_VentForce" then
return conditioncourante.VentForce
elseif info == "Meteo_Humidite" then
return conditioncourante.Humidite
elseif info == "Meteo_Rose" then
return conditioncourante.PointRosee
elseif info == "Meteo_Pression" then
return conditioncourante.Pression
elseif info == "Meteo_Visibilite" then
return conditioncourante.Visibilite
elseif info == "Meteo_CouvNuage" then
return conditioncourante.CouvNuage
elseif info == "Meteo_Uv" then
return conditioncourante.Uv
elseif info == "Meteo_QPrec" then
return conditioncourante.QPrec
elseif info == "Meteo_IconeM" then
if os.date("%H%M", os.time()) <= InfoJour[1].CoucherSoleilH..InfoJour[1].CoucherSoleilM and os.date("%H%M", os.time()) >= InfoJour[1].LeverSoleilH..InfoJour[1].LeverSoleilM then
return arg1.."/jour/"..conditioncourante.Icone..".png"
else
return arg1.."/nuit/"..conditioncourante.Icone..".png"
end
elseif info == "Meteo_IconeV" then
return arg1.."/"..conditioncourante.VentIcone
elseif info == "Meteo_Ville" then
return conditioncourante.Ville
elseif info == "Meteo_latitude" then
return conditioncourante.latitude
elseif info == "Meteo_longitude" then
return conditioncourante.longitude
--prévision journée
elseif info == "Meteo_Jour_CondMeteo" then
return conditionJour[tonumber(arg1)].CondMeteo
elseif info == "Meteo_Jour_CondMeteo1" then
return conditionJour[tonumber(arg1)].CondMeteo1
elseif info == "Meteo_Jour_CondMeteo2" then
return conditionJour[tonumber(arg1)].CondMeteo2
elseif info == "Meteo_Jour_CondMeteo1se" then
return conditionJour[tonumber(arg1)].CondMeteo1se
elseif info == "Meteo_Jour_CondMeteo2se" then
return conditionJour[tonumber(arg1)].CondMeteo2se
elseif info == "Meteo_Jour_Temp" then
return conditionJour[tonumber(arg1)].Temp
elseif info == "Meteo_Jour_TempRes" then
return conditionJour[tonumber(arg1)].TempRes
elseif info == "Meteo_Jour_ProbPrec" then
return conditionJour[tonumber(arg1)].ProbPrec
elseif info == "Meteo_Jour_VentDir" then
return conditionJour[tonumber(arg1)].VentDir
elseif info == "Meteo_Jour_VentDirP" then
return conditionJour[tonumber(arg1)].VentP
elseif info == "Meteo_Jour_VentForce" then
return conditionJour[tonumber(arg1)].VentForce
elseif info == "Meteo_Jour_VentRafales" then
return conditionJour[tonumber(arg1)].VentRafales
elseif info == "Meteo_Jour_Uv" then
return conditionJour[tonumber(arg1)].Uv
elseif info == "Meteo_Jour_ProbOrage" then
return conditionJour[tonumber(arg1)].ProbOrage
elseif info == "Meteo_Jour_NivPrec" then
return conditionJour[tonumber(arg1)].NivPrec
elseif info == "Meteo_Jour_QPluie" then
return conditionJour[tonumber(arg1)].QPluie
elseif info == "Meteo_Jour_QNeige" then
return conditionJour[tonumber(arg1)].QNeige
elseif info == "Meteo_Jour_EVerglas" then
return conditionJour[tonumber(arg1)].EVerglas
elseif info == "Meteo_Jour_IconeM" then
return arg1.."/jour/"..conditionJour[tonumber(arg5)].Icone..".png"
elseif info == "Meteo_Jour_IconeV" then
return arg1.."/"..conditionJour[tonumber(arg5)].VentIcone
elseif info == "Meteo_Jour_IconeR" then
return arg1.."/"..conditionJour[tonumber(arg5)].RafalesIcone
--prévision Nuit
elseif info == "Meteo_Nuit_CondMeteo" then
return conditionNuit[tonumber(arg1)].CondMeteo
elseif info == "Meteo_Nuit_CondMeteo1" then
return conditionNuit[tonumber(arg1)].CondMeteo1
elseif info == "Meteo_Nuit_CondMeteo2" then
return conditionNuit[tonumber(arg1)].CondMeteo2
elseif info == "Meteo_Nuit_CondMeteo1se" then
return conditionNuit[tonumber(arg1)].CondMeteo1se
elseif info == "Meteo_Nuit_CondMeteo2se" then
return conditionNuit[tonumber(arg1)].CondMeteo2se
elseif info == "Meteo_Nuit_Temp" then
return conditionNuit[tonumber(arg1)].Temp
elseif info == "Meteo_Nuit_TempRes" then
return conditionNuit[tonumber(arg1)].TempRes
elseif info == "Meteo_Nuit_ProbPrec" then
return conditionNuit[tonumber(arg1)].ProbPrec
elseif info == "Meteo_Nuit_VentDir" then
return conditionNuit[tonumber(arg1)].VentDir
elseif info == "Meteo_Nuit_VentDirP" then
return conditionNuit[tonumber(arg1)].VentP
elseif info == "Meteo_Nuit_VentForce" then
return conditionNuit[tonumber(arg1)].VentForce
elseif info == "Meteo_Nuit_VentRafales" then
return conditionNuit[tonumber(arg1)].VentRafales
elseif info == "Meteo_Nuit_Uv" then
return conditionNuit[tonumber(arg1)].Uv
elseif info == "Meteo_Nuit_ProbOrage" then
return conditionNuit[tonumber(arg1)].ProbOrage
elseif info == "Meteo_Nuit_NivPrec" then
return conditionNuit[tonumber(arg1)].NivPrec
elseif info == "Meteo_Nuit_QPluie" then
return conditionNuit[tonumber(arg1)].QPluie
elseif info == "Meteo_Nuit_QNeige" then
return conditionNuit[tonumber(arg1)].QNeige
elseif info == "Meteo_Nuit_EVerglas" then
return conditionNuit[tonumber(arg1)].EVerglas
elseif info == "Meteo_Nuit_IconeM" then
return arg1.."/nuit/"..conditionNuit[tonumber(arg5)].Icone..".png"
elseif info == "Meteo_Nuit_IconeV" then
return arg1.."/"..conditionNuit[tonumber(arg5)].VentIcone
elseif info == "Meteo_Nuit_IconeR" then
return arg1.."/"..conditionNuit[tonumber(arg5)].RafalesIcone
----Prévision quart de journée
--Matin
elseif info == "Meteo_Matin_CondMeteo " then
return conditionMatin[tonumber(arg1)].CondMeteo
elseif info == "Meteo_Matin_CondMeteo1" then
return conditionMatin[tonumber(arg1)].CondMeteo1
elseif info == "Meteo_Matin_CondMeteo2" then
return conditionMatin[tonumber(arg1)].CondMeteo2
elseif info == "Meteo_Matin_CondMeteo1se" then
return conditionMatin[tonumber(arg1)].CondMeteo1se
elseif info == "Meteo_Matin_CondMeteo2se" then
return conditionMatin[tonumber(arg1)].CondMeteo2se
elseif info == "Meteo_Matin_TempMax" then
return conditionMatin[tonumber(arg1)].TempMax
elseif info == "Meteo_Matin_TempMin" then
return conditionMatin[tonumber(arg1)].TempMin
elseif info == "Meteo_Matin_TempMaxRes" then
return conditionMatin[tonumber(arg1)].TempMaxR
elseif info == "Meteo_Matin_TempMinRes" then
return conditionMatin[tonumber(arg1)].TempMinR
elseif info == "Meteo_Matin_ProbPrec" then
return conditionMatin[tonumber(arg1)].ProbPrec
elseif info == "Meteo_Matin_VentDir" then
return conditionMatin[tonumber(arg1)].VentDir
elseif info == "Meteo_Matin_VentP" then
return conditionMatin[tonumber(arg1)].VentP
elseif info == "Meteo_Matin_VentForce" then
return conditionMatin[tonumber(arg1)].VentForce
elseif info == "Meteo_Matin_QPluie" then
return conditionMatin[tonumber(arg1)].QPluie
elseif info == "Meteo_Matin_QNeige" then
return conditionMatin[tonumber(arg1)].QNeige
elseif info == "Meteo_Matin_Humidite" then
return conditionMatin[tonumber(arg1)].Humidite
elseif info == "Meteo_Matin_CouvNuage" then
return conditionMatin[tonumber(arg1)].CouvNuage
elseif info == "Meteo_Matin_Rose" then
return conditionMatin[tonumber(arg1)].PointRosee
elseif info == "Meteo_Matin_Visibilite" then
return conditionMatin[tonumber(arg1)].Visibilite
elseif info == "Meteo_Matin_IconeM" then
return arg1.."/jour/"..conditionMatin[tonumber(arg5)].Icone..".png"
elseif info == "Meteo_Matin_IconeV" then
return arg1.."/"..conditionMatin[tonumber(arg5)].VentIcone
--Après midi
elseif info == "Meteo_AM_CondMeteo " then
return conditionAM[tonumber(arg1)].CondMeteo
elseif info == "Meteo_AM_CondMeteo1" then
return conditionAM[tonumber(arg1)].CondMeteo1
elseif info == "Meteo_AM_CondMeteo2" then
return conditionAM[tonumber(arg1)].CondMeteo2
elseif info == "Meteo_AM_CondMeteo1se" then
return conditionAM[tonumber(arg1)].CondMeteo1se
elseif info == "Meteo_AM_CondMeteo2se" then
return conditionAM[tonumber(arg1)].CondMeteo2se
elseif info == "Meteo_AM_TempMax" then
return conditionAM[tonumber(arg1)].TempMax
elseif info == "Meteo_AM_TempMin" then
return conditionAM[tonumber(arg1)].TempMin
elseif info == "Meteo_AM_TempMaxRes" then
return conditionAM[tonumber(arg1)].TempMaxR
elseif info == "Meteo_AM_TempMinRes" then
return conditionAM[tonumber(arg1)].TempMinR
elseif info == "Meteo_AM_ProbPrec" then
return conditionAM[tonumber(arg1)].ProbPrec
elseif info == "Meteo_AM_VentDir" then
return conditionAM[tonumber(arg1)].VentDir
elseif info == "Meteo_AM_VentP" then
return conditionAM[tonumber(arg1)].VentP
elseif info == "Meteo_AM_VentForce" then
return conditionAM[tonumber(arg1)].VentForce
elseif info == "Meteo_AM_QPluie" then
return conditionAM[tonumber(arg1)].QPluie
elseif info == "Meteo_AM_QNeige" then
return conditionAM[tonumber(arg1)].QNeige
elseif info == "Meteo_AM_Humidite" then
return conditionAM[tonumber(arg1)].Humidite
elseif info == "Meteo_AM_CouvNuage" then
return conditionAM[tonumber(arg1)].CouvNuage
elseif info == "Meteo_AM_Rose" then
return conditionAM[tonumber(arg1)].PointRosee
elseif info == "Meteo_AM_Visibilite" then
return conditionAM[tonumber(arg1)].Visibilite
elseif info == "Meteo_AM_IconeM" then
return arg1.."/jour/"..conditionAM[tonumber(arg5)].Icone..".png"
elseif info == "Meteo_AM_IconeV" then
return arg1.."/"..conditionAM[tonumber(arg5)].VentIcone
--Soirée
elseif info == "Meteo_Soiree_CondMeteo " then
return conditionSoiree[tonumber(arg1)].CondMeteo
elseif info == "Meteo_Soiree_CondMeteo1" then
return conditionSoiree[tonumber(arg1)].CondMeteo1
elseif info == "Meteo_Soiree_CondMeteo2" then
return conditionSoiree[tonumber(arg1)].CondMeteo2
elseif info == "Meteo_Soiree_CondMeteo1se" then
return conditionSoiree[tonumber(arg1)].CondMeteo1se
elseif info == "Meteo_Soiree_CondMeteo2se" then
return conditionSoiree[tonumber(arg1)].CondMeteo2se
elseif info == "Meteo_Soiree_TempMax" then
return conditionSoiree[tonumber(arg1)].TempMax
elseif info == "Meteo_Soiree_TempMin" then
return conditionSoiree[tonumber(arg1)].TempMin
elseif info == "Meteo_Soiree_TempMaxRes" then
return conditionSoiree[tonumber(arg1)].TempMaxR
elseif info == "Meteo_Soiree_TempMinRes" then
return conditionSoiree[tonumber(arg1)].TempMinR
elseif info == "Meteo_Soiree_ProbPrec" then
return conditionSoiree[tonumber(arg1)].ProbPrec
elseif info == "Meteo_Soiree_VentDir" then
return conditionSoiree[tonumber(arg1)].VentDir
elseif info == "Meteo_Soiree_VentP" then
return conditionSoiree[tonumber(arg1)].VentP
elseif info == "Meteo_Soiree_VentForce" then
return conditionSoiree[tonumber(arg1)].VentForce
elseif info == "Meteo_Soiree_QPluie" then
return conditionSoiree[tonumber(arg1)].QPluie
elseif info == "Meteo_Soiree_QNeige" then
return conditionSoiree[tonumber(arg1)].QNeige
elseif info == "Meteo_Soiree_Humidite" then
return conditionSoiree[tonumber(arg1)].Humidite
elseif info == "Meteo_Soiree_CouvNuage" then
return conditionSoiree[tonumber(arg1)].CouvNuage
elseif info == "Meteo_Soiree_Rose" then
return conditionSoiree[tonumber(arg1)].PointRosee
elseif info == "Meteo_Soiree_Visibilite" then
return conditionSoiree[tonumber(arg1)].Visibilite
elseif info == "Meteo_Soiree_IconeM" then
return arg1.."/nuit/"..conditionSoiree[tonumber(arg5)].Icone..".png"
elseif info == "Meteo_Soiree_IconeV" then
return arg1.."/"..conditionSoiree[tonumber(arg5)].VentIcone
--nuit
elseif info == "Meteo_Noct_CondMeteo " then
return conditionNoct[tonumber(arg1)].CondMeteo
elseif info == "Meteo_Noct_CondMeteo1" then
return conditionNoct[tonumber(arg1)].CondMeteo1
elseif info == "Meteo_Noct_CondMeteo2" then
return conditionNoct[tonumber(arg1)].CondMeteo2
elseif info == "Meteo_Noct_CondMeteo1se" then
return conditionNoct[tonumber(arg1)].CondMeteo1se
elseif info == "Meteo_Noct_CondMeteo2se" then
return conditionNoct[tonumber(arg1)].CondMeteo2se
elseif info == "Meteo_Noct_TempMax" then
return conditionNoct[tonumber(arg1)].TempMax
elseif info == "Meteo_Noct_TempMin" then
return conditionNoct[tonumber(arg1)].TempMin
elseif info == "Meteo_Noct_TempMaxRes" then
return conditionNoct[tonumber(arg1)].TempMaxR
elseif info == "Meteo_Noct_TempMinRes" then
return conditionNoct[tonumber(arg1)].TempMinR
elseif info == "Meteo_Noct_ProbPrec" then
return conditionNoct[tonumber(arg1)].ProbPrec
elseif info == "Meteo_Noct_VentDir" then
return conditionNoct[tonumber(arg1)].VentDir
elseif info == "Meteo_Noct_VentP" then
return conditionNoct[tonumber(arg1)].VentP
elseif info == "Meteo_Noct_VentForce" then
return conditionNoct[tonumber(arg1)].VentForce
elseif info == "Meteo_Noct_QPluie" then
return conditionNoct[tonumber(arg1)].QPluie
elseif info == "Meteo_Noct_QNeige" then
return conditionNoct[tonumber(arg1)].QNeige
elseif info == "Meteo_Noct_Humidite" then
return conditionNoct[tonumber(arg1)].Humidite
elseif info == "Meteo_Noct_CouvNuage" then
return conditionNoct[tonumber(arg1)].CouvNuage
elseif info == "Meteo_Noct_Rose" then
return conditionNoct[tonumber(arg1)].PointRosee
elseif info == "Meteo_Noct_Visibilite" then
return conditionNoct[tonumber(arg1)].Visibilite
elseif info == "Meteo_Noct_IconeM" then
return arg1.."/nuit/"..conditionNoct[tonumber(arg5)].Icone..".png"
elseif info == "Meteo_Noct_IconeV" then
return arg1.."/"..conditionNoct[tonumber(arg5)].VentIcone
--lunaison
elseif info == "Lune_ephemerides" then
return ephemerides
elseif info == "Lune_ephemerides1" then
return ephemerides1
elseif info == "Lune_ephemerides2" then
return ephemerides2
elseif info == "Lune_Visibilite" then
return Visibilite
elseif info == "Lune_Phases" then
return Phases
elseif info == "Lune_Phases1" then
return Phases1
elseif info == "Lune_Phases2" then
return Phases2
elseif info == "Lune_Noeudlunaire" then
return Noeud_lunaire
elseif info == "Lune_Apogee" then
return Apogee
elseif info == "Lune_Perigee" then
return Perigee
elseif info == "Lune_Distance" then
return Distance
elseif info == "Lune_Age" then
return Age
elseif info == "Lune_HLeverLune" then
return Lever_LuneHeure
elseif info == "Lune_MLeverLune" then
return Lever_LuneMinute
elseif info == "Lune_HCoucherLune" then
return Coucher_LuneHeure
elseif info == "Lune_MCoucherLune" then
return Coucher_LuneMinute
elseif info == "Lune_EclipsePartielle" then
return Eclipse_partielle
elseif info == "Lune_EclipseTotal" then
return Eclipse_total
elseif info == "Images_Barometre" then
return conky_Images_Barometre(arg1, arg2, arg3, arg4)
elseif info == "Images_Lunaison" then
return conky_Images_Lunaison(arg1, arg2, arg3, arg4)
elseif info == "Images_Thermo" then
return conky_Images_Thermo(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_ThermoRond" then
return conky_Images_ThermoRond(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)
elseif info == "Images_Rose" then
return conky_Images_Rose(arg1, arg2, arg3, arg4)
elseif info == "Images_Jour_Rose" then
return conky_Images_Jour_Rose(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_Jour_RoseR" then
return conky_Images_Jour_RoseR(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_Nuit_Rose" then
return conky_Images_Nuit_Rose(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_Nuit_RoseR" then
return conky_Images_Nuit_RoseR(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_Matin_Rose" then
return conky_Images_Matin_Rose(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_AM_Rose" then
return conky_Images_AM_Rose(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_Soiree_Rose" then
return conky_Images_Soiree_Rose(arg1, arg2, arg3, arg4, arg5)
elseif info == "Images_Noct_Rose" then
return conky_Images_Noct_Rose(arg1, arg2, arg3, arg4, arg5)
else
return conky_parse( "${lua "..x.."}" )
end
end
les changements en gros
********************************************************************************************
if Mode == "fondecran" then
FondEcran_init()
end
if Mode == "fondinactif" then
FondInactif_init()
end
*********************************************************************************************
*********************************************************************************************
elseif string.find(line, 'MiseEnPage=') ~= nil then
mise_en_page = string.sub(line, pos1+1)
mise_en_page = string.gsub(mise_en_page, "~", home)
mise_en_page = string.gsub(mise_en_page, "$HOME", home)
pos = string.find(mise_en_page, "creationmodules")
fich_creationmodule = string.sub(mise_en_page, pos)..".sh"
end
*******************************************************************************************
function FondEcran_init()
print("","Mode = "..Mode.."\n", "creationmodule = "..fich_creationmodule)
-- etat du script pour verif_fond
os.execute('echo "Maj" >'..Rep..'/statut.txt ')
-- Sauvegarde fond ecran
os.execute(repmeteo..'/scripts/fond.ori.sh sauvegarde')
-- creation des modules externes
creation_module(mise_en_page)
-- Maj du fond d'écran
os.execute(repmeteo..'/scripts/integration.sh')
end
function FondInactif_init()
print("","Mode = "..Mode.."\n", "creationmodule = "..fich_creationmodule)
-- creation des modules externes
creation_module(mise_en_page)
end
abandon du fichier mise_enforme il ne reste que creationmodule
et l'exemple du script creationmodule (achtung c'est touffu)
#!/bin/bash
###############################################################################
# Modifiez si besoin est les références à vos répertoires
cheminref=~/.conky/Meteo-Lua
source $cheminref/configs/test_images_meteo.cfg 2>/dev/null
source $cheminref/configs/meteo.cfg 2>/dev/null
repville=`echo $web | cut -d / -f6-7`
# initialisation variables ----------------------------------------------------
repertimages=$TempShell/$repville
reptemp=$repertimages/cartouches
imagetemp=$repertimages/cartouches/temp.png
imagetemp1=$repertimages/cartouches/temp1.png
fondbase=$repsauv/fond-base.png
fondtravail=$repsauv/fond-travaille.png
fonte=Helvetica-LT-Std-Bold
fonte1=URW-Chancery-Medium-Italic
fonte2=Times-Bold
couleur1=white ; couleur2=yellow
#------------------------------------------------------------------------------
if [[ ! -d $reptemp ]]; then
mkdir $repertimages/cartouches
fi
# lunaison --------------------------------------------------------------------
convert -size 110x110 xc:transparent /tmp/lune.png -gravity center -geometry 50x50+0+0 -composite $reptemp/lune.png
convert -background transparent -gravity center -font $fonte -pointsize 11 -fill $couleur1 \
label:"{{Lune_ephemerides1}}\n{{Lune_ephemerides2}}" -trim \
\( +clone -background black -shadow 80x3 \) +swap +repage -gravity center -geometry -2-2 -composite $imagetemp
composite -gravity center -background transparent -geometry +0+40 $imagetemp $reptemp/lune.png $reptemp/lune.png
# ville -----------------------------------------------------------------------
convert -background transparent -font $fonte1 -pointsize 80 -fill dodgerblue label:"{{Meteo_Ville}}" \
\( +clone -background Darkblue -shadow 120x1+2+2 \) +swap -background transparent -compose over -layers merge +repage \
$imagetemp
convert $imagetemp -channel A -blur 0x4 +channel -fill skyblue -colorize 100% $imagetemp1
convert -size 300x100 xc:transparent $imagetemp1 -background transparent -gravity center -geometry +0-0 -composite \
$imagetemp -background transparent -gravity center -composite $reptemp/ville.png
# conditions actuelles --------------------------------------------------------
convert -font $fonte2 -pointsize 25 \
-background none label:"{{Meteo_CondMeteo}}" \
\( +clone -sparse-color barycentric '0,%h orange %w,0 red' \) \
\( +clone -background grey20 -shadow 120x1+2+2 \) +swap -background transparent -compose over -layers merge +repage $imagetemp
convert -size 450x50 xc:transparent $imagetemp -background transparent -gravity center -composite $reptemp/condactuel.png
bord=12
#creation cartouche -----------------------------------------------------------
convert -size 178x104 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 177,103 5,5" $imagetemp
# données meteo cartouche 1 ---------------------------------------------------
bord=5 ;pos1=85 ;pos2=92 ;posdepart=5 ;ecart=12
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "{{Meteo_Jour_ProbPrec 1}} %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos1+$(((ecart*1)+posdepart)) ":" -annotate +$pos2+$(((ecart*1)+posdepart)) "{{Meteo_Humidite}} %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Pluie / Neige" -annotate +$pos1+$(((ecart*2)+posdepart)) ":" -annotate +$pos2+$(((ecart*2)+posdepart)) "{{Meteo_Jour_QPluie 1}} mm / {{Meteo_Jour_QNeige 1}} cm" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Verglas" -annotate +$pos1+$(((ecart*3)+posdepart)) ":" -annotate +$pos2+$(((ecart*3)+posdepart)) "{{Meteo_Jour_EVerglas 1}} mm" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Pression" -annotate +$pos1+$(((ecart*4)+posdepart)) ":" -annotate +$pos2+$(((ecart*4)+posdepart)) "{{Meteo_Pression}} mb" \
-annotate +$bord+$(((ecart*5)+posdepart)) "Visibilité" -annotate +$pos1+$(((ecart*5)+posdepart)) ":" -annotate +$pos2+$(((ecart*5)+posdepart)) "{{Meteo_Visibilite}} km U.V : {{Meteo_Uv}}" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Levé / Couché" -annotate +$pos1+$(((ecart*6)+posdepart)) ":" -annotate +$pos2+$(((ecart*6)+posdepart)) "{{Meteo_HLeverSoleil 1}}h{{Meteo_MLeverSoleil 1}} / {{Meteo_HCoucherSoleil 1}}h{{Meteo_MCoucherSoleil 1}}" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Durée du jour" -annotate +$pos1+$(((ecart*7)+posdepart)) ":" -annotate +$pos2+$(((ecart*7)+posdepart)) "{{Meteo_HDureeJour 1}}h{{Meteo_MDureeJour 1}}" \
$imagetemp
#------------------------------------------------------------------------------
# ombres cartouche
convert $imagetemp -bordercolor None -border 10x10 \( +clone -background black -shadow 100x2+2+2 \) \
-compose DstOver -composite -compose Over $reptemp/actuel.png
# version ---------------------------------------------------------------------
convert -background none -fill orange -font $fonte -pointsize 10 \
label:"Météo-Lua {{Version}} - Dernière mise à jour météo : {{Meteo_Jour %a_%d_%b_%Y 1}} à {{Meteo_Heure}}h{{Meteo_Minute}}" -trim \
\( +clone -background grey19 -shadow 100x1+0+0 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/version.png
# temperatures ----------------------------------------------------------------
function coultemp
{
if (($temp < -5 )); then
coul=blue4
elif (($temp < 1 && $temp > -6 )); then
coul=blue
elif (($temp < 6 && $temp > 0)); then
coul=dodgerblue3
elif (($temp < 20 && $temp > 5 )); then
coul=white
elif (($temp < 25 && $temp > 19 )); then
coul=yellow
elif (($temp > 24 )); then
coul=red
else coul=black
fi
}
temp={{Meteo_TempAct}} ; coultemp
convert -background transparent -font $fonte -pointsize 28 -fill $coul label:$temp"°" /tmp/max.png
temp={{Meteo_TempRes}} ; coultemp
convert -background transparent -font $fonte -pointsize 14 -fill $couleur1 label:"/" -fill $coul label:$temp"°" +append /tmp/min.png
temp={{Meteo_Jour_Temp 1}} ; coultemp
convert -background transparent -font Helvetica-LT-Std-Bold -pointsize 14 -fill $couleur1 label:"Max : " -fill $coul label:$temp"°" +append /tmp/max1.png
convert -size 120x120 xc:transparent \
/tmp/max.png -background transparent -gravity NorthEast -geometry +48+8 -composite \
/tmp/min.png -background transparent -gravity Northwest -geometry +58+19 -composite \
/tmp/max1.png -background transparent -gravity North -geometry +0+37 -composite \
$reptemp/temps.png
#rm /tmp/max.png ; rm /tmp/min.png ; rm /tmp/max1.png
# Historique ------------------------------------------------------------------
convert $reptemp/temps.png -background transparent -gravity North -font $fonte -pointsize 13 -fill $couleur1 \
-annotate +0+55 "Historique" \
-pointsize 16 -fill $couleur1 -annotate +0+87 "{{Meteo_Histo_Max 1}}° / {{Meteo_Histo_Min 1}}°" $reptemp/temps.png
# incruste année --------------------------------------------------------------
an=`date +"%Y"`
convert -background transparent -fill $couleur2 -font $fonte -stroke black -pointsize 18 label:$[$an-1] $imagetemp
composite -compose Over -gravity North -geometry +0+70 -dissolve 40,100 $imagetemp $reptemp/temps.png $reptemp/temps.png
# icone-vent ------------------------------------------------------------------
convert -size 100x100 xc:transparent -background transparent -gravity center -font $fonte -pointsize 13 -fill $couleur2 \
-annotate +0-32 "{{Meteo_VentDirP}}" \
-annotate +0+32 "{{Meteo_VentForce}} km/h" $reptemp/vent.png
composite -gravity center -background transparent -geometry 54x54+0+0 -dissolve 60% {{Meteo_IconeV $IconesRep/vent 0,0 0x0 60}} $reptemp/vent.png $reptemp/vent.png
# Prévisions cartouche 1 ------------------------------------------------------
convert -size 200x200 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,195,5,5" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center label:@- -trim \
\( +clone -background skyblue -shadow 100x1+0+0 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1 $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur2 \
-annotate +$pos1+$posdepart "{{Meteo_Jour %a 2}}" \
-annotate +$pos1+$(((ecart*1)+posdepart)) "{{Meteo_Jour %a 3}}" \
-annotate +$pos1+$(((ecart*2)+posdepart)) "{{Meteo_Jour %a 4}}" \
-annotate +$pos1+$(((ecart*3)+posdepart)) "{{Meteo_Jour %a 5}}" \
-annotate +$pos1+$(((ecart*4)+posdepart)) "{{Meteo_Jour %a 6}}" \
-annotate +$pos2+$posdepart "{{Meteo_Jour_VentDirP 2}}" \
-annotate +$pos2+$(((ecart*1)+posdepart)) "{{Meteo_Jour_VentDirP 3}}" \
-annotate +$pos2+$(((ecart*2)+posdepart)) "{{Meteo_Jour_VentDirP 4}}" \
-annotate +$pos2+$(((ecart*3)+posdepart)) "{{Meteo_Jour_VentDirP 5}}" \
-annotate +$pos2+$(((ecart*4)+posdepart)) "{{Meteo_Jour_VentDirP 6}}" \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
-annotate +$pos1+$posdepart1 "{{Meteo_Jour_Temp 2}}°/{{Meteo_Nuit_Temp 2}}°" \
-annotate +$pos1+$(((ecart*1)+posdepart1)) "{{Meteo_Jour_Temp 3}}°/{{Meteo_Nuit_Temp 3}}°" \
-annotate +$pos1+$(((ecart*2)+posdepart1)) "{{Meteo_Jour_Temp 4}}°/{{Meteo_Nuit_Temp 4}}°" \
-annotate +$pos1+$(((ecart*3)+posdepart1)) "{{Meteo_Jour_Temp 5}}°/{{Meteo_Nuit_Temp 5}}°" \
-annotate +$pos1+$(((ecart*4)+posdepart1)) "{{Meteo_Jour_Temp 6}}°/{{Meteo_Nuit_Temp 6}}°" \
-annotate "$rot"x"$rot"+$pos3+$posdepart1 "{{Meteo_Jour_VentForce 2}} km/h" \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*1)+posdepart1)) "{{Meteo_Jour_VentForce 3}} km/h" \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*2)+posdepart1)) "{{Meteo_Jour_VentForce 4}} km/h" \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*3)+posdepart1)) "{{Meteo_Jour_VentForce 5}} km/h" \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*4)+posdepart1)) "{{Meteo_Jour_VentForce 6}} km/h" \
$imagetemp
# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=100 ; posdepart=17
convert $imagetemp \
{{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 2}} -background transparent -geometry $tailleic+$pos+$posdepart -composite \
{{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 3}} -background transparent -geometry $tailleic+$pos+$(((ecart*1)+posdepart)) -composite \
{{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 4}} -background transparent -geometry $tailleic+$pos+$(((ecart*2)+posdepart)) -composite \
{{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 5}} -background transparent -geometry $tailleic+$pos+$(((ecart*3)+posdepart)) -composite \
{{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 6}} -background transparent -geometry $tailleic+$pos+$(((ecart*4)+posdepart)) -composite \
{{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 2}} -background transparent -geometry $tailleic1+$pos1+$posdepart -composite \
{{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 3}} -background transparent -geometry $tailleic1+$pos1+$(((ecart*1)+posdepart)) -composite \
{{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 4}} -background transparent -geometry $tailleic1+$pos1+$(((ecart*2)+posdepart)) -composite \
{{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 5}} -background transparent -geometry $tailleic1+$pos1+$(((ecart*3)+posdepart)) -composite \
{{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 6}} -background transparent -geometry $tailleic1+$pos1+$(((ecart*4)+posdepart)) -composite \
$imagetemp
# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2+2+2 \) -compose DstOver -composite -compose Over $reptemp/previsions.png
# nettoyage -------------------------------------------------------------------
rm $imagetemp1; rm $imagetemp
# icone conditions actuell
convert {{Meteo_IconeM $IconesRep 0,0 0x0 60}} -resize 60% \( +clone -background black -shadow 100x2+2+2 \) -compose DstOver -composite -compose Over $reptemp/ico_cond.png
# Mise en forme
convert -resize $ecran! $repsauv/fond-base.png $repsauv/fond-base.png
convert $fondbase \
$reptemp/ico_cond.png -background transparent -gravity North -geometry -210+30 -composite \
$reptemp/lune.png -background transparent -gravity North -geometry +250+20 -composite \
$reptemp/ville.png -background transparent -gravity North -geometry +0+10 -composite \
$reptemp/condactuel.png -background transparent -gravity North -geometry +0+90 -composite \
$reptemp/temps.png -background transparent -gravity North -geometry -50+130 -composite \
$reptemp/vent.png -background transparent -gravity North -geometry +50+130 -composite \
$reptemp/actuel.png -background transparent -gravity North -geometry -200+120 -composite \
$reptemp/previsions.png -background transparent -gravity North -geometry +200+115 -composite \
$reptemp/version.png -background transparent -gravity North -geometry -120+240 -composite \
$fondtravail
# sauvegarde et intégration
maintenant c'est lui qui gère toute la mise en forme donc un seul script à modifier sans compter la config
# utilisé par images_meteo_lua
# choix du type d'affichage
# Mode=fondecran Mode=fondinactif ou Mode=classique
Mode=fondecran
# le format de votre ecran important
ecran=1440x900
#Repertoire orig Meteo-Lua
repmeteo=~/.conky/Meteo-Lua
MiseEnPage=~/.conky/Meteo-Lua/scripts/creationmodules-new
#Repertoire fonts pour convert
repfonts=~/.conky/Meteo-Lua/fonts
#Images de base Thermomètre
Therm=~/.conky/Meteo-Lua/icones/Themes/JPDipsy/Classique/Thermometre
ThermRond=~/.conky/Meteo-Lua/icones/Themes/JPDipsy/Metal/Thermometre
#Images de base Rose des vents
Rose=~/.conky/Meteo-Lua/icones/Themes/JPDipsy/Metal/Rose-des-vents
##Définition des images pour les paliers
palier1=dir-vert.png
palier2=dir-bleu.png
palier3=dir-rouge.png
palier4=dir-vert.png
##définition des couleurs de fontes pour les paliers
palier1coulfont=blue
palier2coulfont=white
palier3coulfont=white
palier4coulfont=black
IconesRep=~/.conky/Meteo-Lua/icones
#Images de base cycle lunaire
Lune=~/.conky/Meteo-Lua/icones/Themes/JPDipsy/Metal/Lune
#Images de base cycle lunaire
Barometre=~/.conky/Meteo-Lua/icones/Themes/JPDipsy/Metal/Barometre
##### Paramètres Thermomètres #####
#Thermometres={
#Image de base
#base=chrome.png
#Image mercure
#mercure=bleu.png
#Info affichée par le mercure
#mercure_info=TempAct
#Image(s) plot(s)
#plot=rouge.png, noir.png
#Info(s) affichée par le(s) plot(s)
#plot_info=TempRes, Jour_Temp 1},
#{base=marbre.png
#mercure=bleu.png
#mercure_info=Jour_Temp 2
#plot=noir.png, rouge.png, gris.png
#plot_info=Jour_TempRes 1, Nuit_Temp 2, Nuit_TempRes 2}
Ne valide rien pour le moment sauf la correction de bug (vérifies quand même) je vais faire un pack complet conky classique ,conky fond inactif, conky fond d'écran scripts pour xplanetFX (la totale quoi )avec la doc et tout ce qui va pour être utiliser dans voyager avec ce que vous mettez au point en ce moment et je ferai signe.
A+
Hors ligne
#842 Le 12/05/2012, à 11:18
- ragamatrix
Re : [Conky] Alternative à weather.com (2)
ouahou !
"Super; sehr sheun !"
ça me plait aussi idée originale.Par contre j'ai cassé mon xplanetFX:(, en bidouillant avec une session openbox...xplanet fonctionne toujours sous gnome; j'apprends un peu openbox car je n'ai pas beaucoup de ram...
Bravo excellent boulot !
Dernière modification par ragamatrix (Le 12/05/2012, à 16:29)
Hors ligne
#843 Le 12/05/2012, à 12:08
- Didier-T
Re : [Conky] Alternative à weather.com (2)
Merci jpdipsy.
Et surtout merci de rester imaginatif.
A+
Hors ligne
#844 Le 12/05/2012, à 12:59
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Tous toutes
Vos compliments me touchent beaucoup du coup j'ajouterai ceci
"j'ai demandé à la lu..u.ne"
Dernière modification par jpdipsy (Le 12/05/2012, à 13:13)
Hors ligne
#845 Le 13/05/2012, à 06:51
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Toutes tous
Bon voilà le résultat final j' espère que çà plaira au plus grand nombre
Je vais essayé de "packager" tout ça pour aujourd'hui
A+
Hors ligne
#846 Le 13/05/2012, à 06:56
- Didier-T
Re : [Conky] Alternative à weather.com (2)
Toutes tous
Bon voilà le résultat final j' espère que çà plaira au plus grand nombre
http://uppix.net/b/0/3/80261c0788dea80b … 02919a.png
Plus grandJe vais essayé de "packager" tout ça pour aujourd'hui
A+
Je dois avouer que le coup du reflet de la lune, je trouve sa déplacé dans l'espace (dans un décor bucolique, je dit pas)
Hors ligne
#847 Le 13/05/2012, à 07:31
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
Je dois avouer que le coup du reflet de la lune, je trouve sa déplacé dans l'espace (dans un décor bucolique, je dit pas)
Réflexion faîte t'as raison allez hop à la trappe se sera pour un décor avec plan d'eau.
Hors ligne
#848 Le 13/05/2012, à 18:55
- jpdipsy
Re : [Conky] Alternative à weather.com (2)
toutes tous et les autres
j'aurai besoin que vous testiez voir si çà fonctionne meteo-graph-test
procédure : décompresser dans votre rep perso (ce sera sous ~/conky) changer l'addresse web et le rep de sauvegarde de meteo.cfg et le format d'écran des deux autres fichiers de conf et lancer meteo-mode-fondinactif si çà marche "killer" essayer meteo-mode-fondecran si çà marche essayer de changer de fond décran voir si le changement se fait "killer" voir si le fond d'origine se remet en place et faire rapport ......
pour ceux qui utilise xplanetFX dans les param de xplanetFX à "appeler un script après le rendu" mettre soit "~/conky/Meteo-Lua/scripts/verif_fond.sh creationmodules-fondecran" ou le script "xplanet_vaisseaux.sh" et lancer meteo-mode-fondecran-xplanetFX
Attention si vous voulez essayer sous un autre utilisateur alors que vous aviez déjà utiliser meteo-lua il faut virer dans le tempshell toutes les refs /votreville/blabla sinon meteo-lua vous jette c'est un petit souci qu'il faut voir ( sauver sous $USER/ville/index au lieu de /ville/index ).
Je vous remercie de votre attention.
à j'oubliai le rapport ........ circonstancié en triple exemplaire papier carbone
Hors ligne
#849 Le 14/05/2012, à 12:04
- ragamatrix
Re : [Conky] Alternative à weather.com (2)
@qui peut m'aider
Salut !
ça faisait longtemps que je n'avais pas eu d'erreurs dans conky, et là je ne comprends pas ce qu'il faut faire...Mon terminal me renvoie cette erreur :
Conky: llua_do_call: function conky_Meteo_fichier_init execution failed: .../ragamatrix/conky/Meteo-Lua/scripts/images_meteo.lua:177: attempt to compare nil with number
Conky: Unable to load image '/tmp/horgen/316407/Thermorond1.png'
Conky: Unable to load image '/tmp/horgen/316407/Thermorond1.png'
Conky: llua_do_call: function conky_Meteo_enligne execution failed: /home/ragamatrix/conky/Meteo-Lua/scripts/meteo.lua:685: attempt to compare nil with number
Conky: Unable to load image '/tmp/horgen/316407/Thermorond1.png'...
alors que dans le conky il se nomme comme cela:
##Affichage thermorond##
${template1 ThermoRond 400,20 210x210 1}
je n'ai poutant rien modifié entre mes deux ouvertures de session mystère...?
Merci d'avance
bonne aprem
Dernière modification par ragamatrix (Le 14/05/2012, à 12:05)
Hors ligne
#850 Le 14/05/2012, à 16:35
- viper69
Re : [Conky] Alternative à weather.com (2)
bonjour à tous
Merci à tous pour votre aide..surtout à Jean luc pour le "KICK OF"
Seulement voila je suis encore un peu perdu.
Je pense que l'aide de jpdipsy ne sera pas du luxe
Etape 1 => Adapter la mise en écran à mon PC
J'ai bricolé le script Mise En Forme pour "caler" le résultat en fonction de mon écran et de mon PC.
Etape 2 => Liens information météo
J'ai installé le liens permettant la récupération des informations météo de mon lieu d'habitation sur www.accuweather.com.
J'ai donc modifié le fichier météo.cfg
Enfin je voudrais supprimer tout les fichiers qui sont non nécessaires...car il me semble que le pacquage que j'ai honteusement pompé en contient trop....
Donc allons y:
Quel est ou sont les bash a lancer... j'en ai 3?
Si quelqu'un pouvait répondre à cette première question somme tout idiote....
Dans la foulée je suis en train de créer "ma propre arborescence" afin de préparer la suite de mon apprentissage, voici l'arborescence en cours de construction
Je penses qu'il y aurai encore un peu de ménage à faire .... Avant l’installation des fichiers dans le répertoire script... Si quelqu'un pouvait analyser l'information si dessous et me dire ce qui se trouve en trop et surtout s'il manque des informations....
/home/j/conkyperso/:
conkyrc.meteo-imagemagick.sh
conkyrc_meteo_lua
Meteo-Lua
/home/j/conkyperso/Meteo-Lua:
configs
fonts
icones
sauvegardes
scripts
/home/j/conkyperso/Meteo-Lua/configs:
imagemagick_images_meteo.cfg
imagemagick_images_meteo.cfg~
meteo.cfg
/home/j/conkyperso/Meteo-Lua/fonts:
AlteHaasGroteskBold.ttf
HelveticaRoundedLTStd-Bd.otf
Lobster.otf
Pistilli-Roman.otf
VeraMoBd.ttf
/home/j/conkyperso/Meteo-Lua/icones:
jour
nuit
Themes
vent
/home/j/conkyperso/Meteo-Lua/icones/jour:
cl.png
co.png
c.png
d.png
fl.png
f.png
fr.png
ho.png
h.png
ic.png
i.png
mcfl.png
mcl.png
mc.png
mcsn.png
mcs.png
mct.png
msu.png
pcfl.png
pc.png
pcs.png
pct.png
psfl.png
psu.png
psus.png
psut.png
r.png
rsn.png
sl.png
sn.png
s.png
su.png
t.png
w.png
/home/j/conkyperso/Meteo-Lua/icones/nuit:
cl.png
co.png
c.png
d.png
fl.png
f.png
fr.png
ho.png
h.png
ic.png
i.png
mcfl.png
mcl.png
mc.png
mcsn.png
mcs.png
mct.png
msu.png
pcfl.png
pc.png
pcs.png
pct.png
psfl.png
psu.png
psus.png
psut.png
r.png
rsn.png
sl.png
sn.png
s.png
su.png
t.png
w.png
/home/j/conkyperso/Meteo-Lua/icones/Themes:
Barometre
Cartouches
Lune
Rose-des-vents
Thermometre
/home/j/conkyperso/Meteo-Lua/icones/Themes/Barometre:
aiguille.png
base.png
/home/j/conkyperso/Meteo-Lua/icones/Themes/Cartouches:
cart2.png
cart3.png
cartouche.png
CartPrev.png
vide.png
/home/j/conkyperso/Meteo-Lua/icones/Themes/Lune:
indicateur.png
Indicateurs-sup
lune-base.png
/home/j/conkyperso/Meteo-Lua/icones/Themes/Lune/Indicateurs-sup:
indicateur1.png
indicateur2.png
/home/j/conkyperso/Meteo-Lua/icones/Themes/Rose-des-vents:
base.png
Calme.png
dir-bleu.png
dir-gris.png
dir-noir.png
dir-rouge.png
dir-vert.png
/home/j/conkyperso/Meteo-Lua/icones/Themes/Thermometre:
aiguille.png
base.png
Ind
ind-blanc.png
ind-bleu.png
ind-jaune.png
ind-rouge.png
ind-vert.png
/home/j/conkyperso/Meteo-Lua/icones/Themes/Thermometre/Ind:
ind-bleu.png
ind-rouge.png
ind-vert.png
/home/j/conkyperso/Meteo-Lua/icones/vent:
00.png
01.png
02.png
03.png
04.png
05.png
06.png
07.png
08.png
09.png
10.png
11.png
12.png
13.png
14.png
15.png
16.png
17.png
18.png
19.png
20.png
21.png
22.png
23.png
24.png
25.png
26.png
27.png
28.png
29.png
30.png
31.png
32.png
33.png
34.png
35.png
36.png
37.png
38.png
39.png
40.png
41.png
42.png
43.png
44.png
45.png
46.png
47.png
48.png
49.png
50.png
51.png
52.png
53.png
54.png
55.png
56.png
57.png
58.png
59.png
60.png
61.png
62.png
63.png
64.png
65.png
66.png
67.png
68.png
Merci pour votre aide.... Ensuite je m'attaquerais au script
Dernière modification par viper69 (Le 16/05/2012, à 07:22)
Viper69
J'ai ouvert les fenêtres - J'ai vu que l'on pouvait être libre
Le manuel disait "Nécessite Windows XP ou mieux". J'ai donc installé Linux.
Ubuntu depuis 7.04 / Laptop: PressarioC60 / Bureau: CQ5335 / Minipc:LDLC Mercure ML1-C1-2-H1
Hors ligne