Contenu | Rechercher | Menus

Annonce

Ubuntu 16.04 LTS
Commandez vos DVD et clés USB Ubuntu-fr !

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

#1551 Le 05/01/2017, à 18:24

enebre

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Bien sur, avec plaisir seulement c'est une application source


Xubuntu.16.04, 64b, mini-pc Qotom-100 core-duo, 8Go ram, ssd 58Go

Hors ligne

#1552 Le 05/01/2017, à 19:27

chepioq

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

OK ce n'est pas pour moi, je ne suis pas sur ubuntu (paquet .deb) mais sous fedora (paquet rpm).


Tout est dans tout et réciproquement....

Hors ligne

#1553 Le 05/01/2017, à 22:05

enebre

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Si tu veux tu peux en récupérer les icones et autres goodies, et il existe alien pour transformer un deb en rpm, du moins il fait rpm vers deb, mais il doit y avoir l'équivalent . J'ai enlevé la couleur du fond, ça fait nettement plus propre. Surtout avec l'ensemble solar.lua
mini_170105102408801303.png


Xubuntu.16.04, 64b, mini-pc Qotom-100 core-duo, 8Go ram, ssd 58Go

Hors ligne

#1554 Le 06/01/2017, à 06:07

chepioq

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Je connais alien, il existe aussi sur fedora, pour transformer un .deb en .rpm, mais d'après certains utilisateurs qui l'ont essayé ce n'est pas fiable à 100%.
En tout cas, maintenant que tu as mis un fond transparent, c'est vraiment beaucoup plus joli.


Tout est dans tout et réciproquement....

Hors ligne

#1555 Le 06/01/2017, à 09:43

enebre

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

J'ai fait un locate my-weather-indicator pour trouver les images et j'ai modifié le fond avec gimp.
Alien, en effet parfois ça ne fonctionne pas mais c'est souvent bon, si tu es intéressé pour cette appli, voici ce que dit le terminal:

$ locate my-weather-indicator
/home/ombre/my-weather-indicator
/home/ombre/.config/my-weather-indicator
/home/ombre/.config/my-weather-indicator/my-weather-indicator.conf
/home/ombre/.config/my-weather-indicator/my-weather-indicator.conf2
/home/ombre/.local/share/applications/extras-my-weather-indicator.desktop
/home/ombre/.local/share/applications/extras-my-weather-indicator2.desktop
/opt/extras.ubuntu.com/my-weather-indicator
/opt/extras.ubuntu.com/my-weather-indicator/bin
/opt/extras.ubuntu.com/my-weather-indicator/my_weather_indicator-0.8.1.egg-info
/opt/extras.ubuntu.com/my-weather-indicator/share
/opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator
/opt/extras.ubuntu.com/my-weather-indicator/share/locale-langpack
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator
/opt/extras.ubuntu.com/my-weather-indicator/share/pixmaps
/opt/extras.ubuntu.com/my-weather-indicator/share/locale-langpack/fr
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/changelog
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/check_connection.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/comun.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/configurator.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/exporting.js
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/forecastw.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/geocodeapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/graph.html
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/graph.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/highcharts.js
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/ipaddress.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/jquery.min.js
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/logos
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/machine_information.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/marker.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/moon.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/mooncalendarwindow.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/my-weather-indicator-autostart.desktop
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/networkmanayer.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/openweathermap.html
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/openweathermap.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/preferences.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/social
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/sun.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/weatherservice.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/weatherwidget.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wgoogleapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/whereami.html
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/whereami.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wnoaaapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wopenweathermapapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/worldweatheronlineapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wundergroundapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wyahooapi.py
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwi-arrow-cold.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwi-arrow-hot.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-chance-of-rain-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-chance-of-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-chance-of-snow-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-chance-of-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-chance-of-thunderstorms-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-chance-of-thunderstorms.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-clear-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-clear.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-flurries.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-fog-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-fog.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-freezing-drizzle.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-hail.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-icy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-light-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-light-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-mostly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-mostly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-mostly-sunny-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-mostly-sunny.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-not-available.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-partly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-partly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-rain-and-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-rain-new.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-storm.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwid-windy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-chance-of-rain-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-chance-of-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-chance-of-snow-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-chance-of-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-chance-of-thunderstorms-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-chance-of-thunderstorms.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-clear-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-clear.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-flurries.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-fog-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-fog.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-freezing-drizzle.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-hail.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-icy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-light-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-light-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-mostly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-mostly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-mostly-sunny-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-mostly-sunny.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-not-available.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-partly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-partly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-rain-and-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-rain-new.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-storm.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/icons/mwil-windy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/1-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/10-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/11-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/12-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/13-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/14-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/15-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/16-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/17-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/18-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/19-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/2-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/20-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/21-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/22-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/23-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/24-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/25-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/26-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/27-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/28-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/29-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/3-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/30-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/31-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/4-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/5-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/6-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/7-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/8-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/9-light-normal.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-arrow-cold.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-arrow-hot.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon00.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon01.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon01.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon02.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon02.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon03.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon03.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon04.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon04.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon05.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon05.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon06.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon06.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon07.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon07.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon08.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon08.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon09.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon09.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon10.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon10.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon11.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon11.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon12.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon12.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon13.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon13.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon14.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon14.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon15.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon15.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon16.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon16.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon17.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon17.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon18.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon18.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon19.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon19.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon20.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon20.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon21.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon21.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon22.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon22.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon23.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon23.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon24.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon24.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon25.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon25.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon26.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon26.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon27.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon27.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon28.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-moon28.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind00.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind01.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind02.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind03.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind04.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind05.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind06.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind07.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind08.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind09.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind10.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind11.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind12.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind13.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind14.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind15.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind16.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind17.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind18.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind19.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind20.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind21.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind22.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind23.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind24.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind25.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind26.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind27.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind28.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind29.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind30.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind31.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi-wind32.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi_016.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi_032.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi_064.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwi_128.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-chance-of-rain-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-chance-of-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-chance-of-snow-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-chance-of-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-chance-of-thunderstorms-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-chance-of-thunderstorms.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-clear-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-clear.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-flurries.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-fog-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-fog.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-freezing-drizzle.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-hail.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-icy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-light-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-light-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-mostly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-mostly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-mostly-sunny-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-mostly-sunny.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-not-available.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-partly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-partly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-rain-and-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-storm.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/mwig-windy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/my-weather-indicator-old.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/my-weather-indicator.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/pinin.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/images/pinup.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/logos/wgooglelogo.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/logos/wopenweathermaplogo.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/logos/worldonlinelogo.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/logos/wundergroundlogo.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/logos/wyahoologo.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/allinone
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/anotherone
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/full
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/little
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/medium
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/simple
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/super
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/background2.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-drop-shadow.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-face-shadow.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-face.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-frame.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-glass.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-hour-hand.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-marks.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/clock-minute-hand.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/aclock/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/allinone/circle.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/allinone/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/anotherone/background2 (copie 1).png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/anotherone/background2.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/anotherone/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/full/base.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/full/flip_bg.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/full/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/little/base.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/little/cold.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/little/hot.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/little/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/medium/base.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/medium/cold.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/medium/hot.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/medium/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/simple/drops.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/simple/simple.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/simple/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/super/base.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/super/cold.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/super/flip_bg.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/super/hot.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/super/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/base.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-drop-shadow.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-face-shadow.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-face.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-frame.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-glass.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-hour-hand.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-marks1.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/clock-minute-hand.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/cold.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/hot.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/skins/superclock/skin
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/social/facebook.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/social/googleplus.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/social/twitter.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/social/web.svg
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/03.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/05.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/08.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/13.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/17.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/20.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/21.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/22.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/30.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/35.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/37.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/40.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/41.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/43.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/base.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/flip_bg.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-chance-of-rain-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-chance-of-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-chance-of-snow-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-chance-of-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-chance-of-thunderstorms-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-chance-of-thunderstorms.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-clear-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-clear.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-flurries.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-fog-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-fog.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-freezing-drizzle.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-hail.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-icy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-light-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-light-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-mostly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-mostly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-mostly-sunny-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-mostly-sunny.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-not-available.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-partly-cloudy-night.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-partly-cloudy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-rain-and-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-rain.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-snow.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-storm.png
/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wimages/mwig-windy.png
/opt/extras.ubuntu.com/my-weather-indicator/share/pixmaps/my-weather-indicator.png
/usr/share/applications/extras-my-weather-indicator.desktop
/usr/share/doc/my-weather-indicator
/usr/share/doc/my-weather-indicator/changelog.Debian.gz
/usr/share/doc/my-weather-indicator/copyright
/var/lib/dpkg/info/my-weather-indicator.list
/var/lib/dpkg/info/my-weather-indicator.md5sums

Dernière modification par enebre (Le 06/01/2017, à 09:45)


Xubuntu.16.04, 64b, mini-pc Qotom-100 core-duo, 8Go ram, ssd 58Go

Hors ligne

#1556 Le 07/01/2017, à 20:47

enebre

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonsoir chepioq, j'ai voulu partager le solar.lua avec un ami, mais j'obtiens une erreur

conky: can't select(): Argument invalide

ça se répète à l'infini,
Et rien de plus est indiqué dans le démarrage après la commande.
Une idée s'il te plait ?
Par contre sunwait fonctionne en ligne de commande, j'obtiens l'heure du lever.

Dernière modification par enebre (Le 07/01/2017, à 20:50)


Xubuntu.16.04, 64b, mini-pc Qotom-100 core-duo, 8Go ram, ssd 58Go

Hors ligne

#1557 Le 08/01/2017, à 06:31

chepioq

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Là, franchement je ne sais pas.
En regardant le code source de conky, l'erreur "can't select" aurait un rapport avec X11, ou avec l'écran.
Ton ami est-il sous X ou sous wayland ?
As-t-il un conky basique qui fonctionne ?


Tout est dans tout et réciproquement....

Hors ligne

#1558 Le 08/01/2017, à 12:23

enebre

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

chepioq a écrit :

Ton ami est-il sous X ou sous wayland ?

C'est xubuntu 16.04.1 que je lui ai installé il y a un mois, je suis incapable de répondre à ta question, je ne sais pas ce qu'est wayland, je vais consulter la doc pour en apprendre davantage.

As-t-il un conky basique qui fonctionne ?

Oui, il y a mon conky habituel qui ronronne gentiment. La seule chose que je vois en différence, c'est qu'il est en 32 bits.


Xubuntu.16.04, 64b, mini-pc Qotom-100 core-duo, 8Go ram, ssd 58Go

Hors ligne

#1559 Le 08/01/2017, à 13:03

chepioq

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

As-tu copié ton conky soleil directement sans modification ?
Car je vois chez toi un :

gap_x = 1670,
gap_y = 300,

Peut-être que son écran a une résolution inférieure.


Tout est dans tout et réciproquement....

Hors ligne

#1560 Le 08/01/2017, à 13:12

enebre

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Oui, j'ai fait les correctifs pour son pc, avant de lancer le fichier, à défaut j'essayerai la version conky sans lua, peut etre qu'elle fonctionnera bien sur son pc, mais je ferai ce test que courant de la semaine. Je te tiendrai au courant, merci chepioq.

Dernière modification par enebre (Le 08/01/2017, à 13:13)


Xubuntu.16.04, 64b, mini-pc Qotom-100 core-duo, 8Go ram, ssd 58Go

Hors ligne

#1561 Le 21/01/2017, à 15:46

daniel38100

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonjour @ tous

Mise a jour du pack meteo lua de Didier-T dispo ici météo.lua meteo-lua-2.deb v1.20 MAJ:21/01/17

meteo2.lua

-- Créé par Didier-T (forum.ubuntu-fr.org)
-- Nécessite imagemagick http://apt.ubuntu.com/p/imagemagick
-- Nécessite Curl
-- utilise recmeteo.py
-- Repris par Daniel38100 Forum Ubuntu.fr a partir de 1.20 en 01/1017

require "io"
require "os"
require 'cairo'

local Version = "v1.20"
local conditionJour = {}
local conditionNuit = {}
local conditionMatin = {}
local conditionAM = {}
local conditionSoiree = {}
local conditionNoct = {}
local InfoJour = {}
local conditioncourante = {}
local huitHeures = {}
local Rep, cmd, jours, matin, apresmidi, soiree, nuit, delais, r, repsauv, l, fichier_init, MAJ, tc, dermodif, VilleAdresse, start, cmd1, ID
local Debug = "Problème Info "
local home = os.getenv("HOME")
--Liste des accents et carractère non pris en charge par les patterns
local pat="%é%è%à%ä%â%ê%ô%ç%É%È%À%Â%Ä%Ê%Ô%Ç'"


--Trouve ID
function Get_ID()
    local proc, ret
    proc=io.open("/proc/self/stat", "r")
    ret=proc:read():match("%d*")
    return ret
end

--Francisation alerte
function fran_alerte(d)
    if d:match("(attendue)") ~= nil and d:match("(entre)") ~= nil then
        d = d:gsub("entre", "au")
        d = d:gsub("attendue ", "attendue du "):gsub("attendues ", "attendues du ")
    end
    if d:match("(On s'attend à de la)") ~= nil and d:match("(entre)") ~= nil then
        d = d:gsub("entre", "et")
    end
    if d:match("(depuis)") ~= nil and d:match("(dans)") ~= nil then
        d = d:gsub("depuis", "à partir de"):gsub("jusqu'à", "à partir de")
    end

    d = d:gsub("depuis","à partir de"):gsub("tard la", "tard dans la"):gsub("lorsqu'elle deviendra de la", "se transformant en"):gsub("lorsqu'elle", "puis"):gsub("et s'accumulera de", "de"):gsub("avant de finir", "jusqu'à"):gsub("la nuit du", "dans la nuit de")

    return d
end

--Traduction date
function trad_date(d)
    local date = d
    date = date:gsub("Monday", "Lundi"):gsub("Tuesday", "Mardi"):gsub("Wednesday", "Mercredi"):gsub("Thursday", "Jeudi"):gsub("Friday", "Vendredi"):gsub("Saturday", "Samedi"):gsub("Sunday", "Dimanche")

    date = date:gsub("lun", "Lun"):gsub("mar", "Mar"):gsub("mer", "Mer"):gsub("jeu", "Jeu"):gsub("ven", "Ven"):gsub("sam", "Sam"):gsub("dim", "Dim")

    date = date:gsub("Mon", "Lun"):gsub("Tue", "Mar"):gsub("Wed", "Mer"):gsub("Thu", "Jeu"):gsub("Fri", "Ven"):gsub("Sat", "Sam"):gsub("Sun", "Dim")

    date = date:gsub("January", "Janvier"):gsub("February", "Février"):gsub("March", "Mars"):gsub("April", "Avril"):gsub("May", "Mai"):gsub("June", "Juin"):gsub("July", "Juillet"):gsub("August", "Août"):gsub("September", "Septembre"):gsub("October", "Octobre"):gsub("November", "Novembre"):gsub("December", "Décembre")

    date = date:gsub("jan", "Jan"):gsub("fev", "Fév"):gsub("mar", "Mar"):gsub("avr", "Avr"):gsub("mai", "Mai"):gsub("jui", "Jui"):gsub("aou", "Aoû"):gsub("sep", "Sep"):gsub("oct", "Oct"):gsub("nov", "Nov"):gsub("dec", "Déc")

    date = date:gsub("Feb", "Fév"):gsub("Apr", "Avr"):gsub("May", "Mai"):gsub("Jun", "Juin"):gsub("Jul", "Juil"):gsub("Aug", "Aoû"):gsub("Dec", "Déc")

    return date
end

--Vérifier l'existence d'un fichier
function existe(file)
  local a = io.open(file, "r")
  local present
  if a then
    present = true
    io.close(a)
  else
    present = false
  end
  return present
end

--Formatage des pages web
function string.formatage(ligne)
ligne = ligne:gsub("ô", "ô"):gsub("â", "â"):gsub("é", "é"):gsub("è", "è"):gsub("à", "à"):gsub("ç", "ç"):gsub("ê", "ê"):gsub("ö", "ö"):gsub("î", "î"):gsub("ï", "ï"):gsub("û", "û"):gsub("ü", "ü"):gsub("'", "'"):gsub("Poudreries", "Bourrasques de neige"):gsub("É", "É"):gsub("°",""):gsub("[\n\r]",""):gsub("é", "é")
return ligne
end

--Infos lunaison
function lunaison(r)
    local s, web, Lune

    web="http://www.calendrier-lunaire.net/"
    icone="http://www.calendrier-lunaire.net/module/LYmFzaWMtODMtaDItMTQyNzI5NzY4OS40ODk2LSNmZmZmZmYtMjk1LSMwMDAwMDAtMTQyNzI5NzY4OS0xLTA.png"
    f=assert(io.popen("curl --max-time 60 --retry 3 --silent '"..web.."' | grep -A63 '\"TBdoubleColTD5\"' | sed 's/%//g'"))
    line=f:read()
    i=0
    for line in f:lines() do
        print(line)
        i=i+1
--        if i==37 then
--            icone=line:match("src=\"([%w%p]*)\"")
        if i==46 then
            ephemerides1, ephemerides2=line:formatage():match("</strong>(%a*) (%a*)</li>")
        elseif i==47 then
            Visibilite=line:match("</strong>(%d*) </li>")
        elseif i==53 then
            Phases1=line:formatage():match("title=\"([%a%p%d"..pat.."]*)\" /")
        elseif i==54 then
            Phases2=line:formatage():match("title=\"([%a%p%d"..pat.."]*)\" /")
            Phases=Phases1..", "..Phases2
        elseif i==59 then
            Noeud_lunaire=line:match("</strong>([%a%d%p%s"..pat.."]*)<img")
        elseif i==58 then
            Apogee=line:match("</strong>([%a%d%p%s"..pat.."]*)<img")
        elseif i==57 then
            Perigee=line:match("</strong>([%a%d%p%s"..pat.."]*)<img")
        elseif i==49 then
            Distance=line:match("</strong>(%d*) Km</li>")
        elseif i==50 then
            Age=line:match("</strong>([%a%d%s]*)</li>")
        elseif i==3 then
            Lever_LuneHeure, Lever_LuneMinute=line:match(": ([%d%p]*):([%d%p]*)</div>")
        elseif i==4 then
            Coucher_LuneHeure, Coucher_LuneMinute=line:match(": ([%d%p]*):([%d%p]*)</div>")
            if Coucher_LuneHeure==nil then
                Coucher_LuneHeure="N/A"
                Coucher_LuneMinute="N/A"
            end
        elseif i==51 then
            Eclipse_total=line:match("</strong> ([%a%p%d%s"..pat.."]*)</a>")
        end
    end
    f:close()
    if Noeud_lunaire:match("(%d+)") ~= nil then Noeud_lunaire = Noeud_lunaire:match("(%d+)") end

    if Apogee:match("(%d+)") ~= nil then Apogee = Apogee:match("(%d+)") end
    if Perigee:match("(%d+)") ~= nil then Perigee = Perigee:match("(%d+)") end
    ephemerides = ephemerides1.." "..ephemerides2
    Eclipse_total = datelune(Eclipse_total)
    s = "${exec wget --tries=3 -q -O "..r.."/lune.png http://www.calendrier-lunaire.net/"..icone.."}"
    conky_parse( s )
--    conky_parse( "${exec convert "..r.."/lune.png -transparent '#ffffff' "..r.."/lune.png}" )

end

function datelune(d)
    local j, m, a = d:gsub("Janvier", "01"):gsub("Février", "02"):gsub("Mars", "03"):gsub("Avril", "04"):gsub("Mais", "05"):gsub("Juin", "06"):gsub("Juillet", "07"):gsub("Août", "08"):gsub("Septembre", "09"):gsub("Octobre", "10"):gsub("Novembre", "11"):gsub("Décembre", "12"):match("le (%d+) (%d+) (%d+)")
    d = os.time{year=a, month=m, day=j}

    return d

end


--Détermine icône vent
function direction_vent(i)

    if i == "Calme" then
        return 0
    elseif i == "N" then
        return 10
    elseif i == "NNE" then
        return 11
    elseif i == "NE" then
        return 12
    elseif i == "ENE" then
        return 13
    elseif i == "E" then
        return 14
    elseif i == "ESE" then
        return 15
    elseif i == "SE" then
        return 16
    elseif i == "SSE" then
        return 17
    elseif i == "S" then
        return 2
    elseif i == "SSO" then
        return 3
    elseif i == "SO" then
        return 4
    elseif i == "OSO" then
        return 5
    elseif i == "O" then
        return 6
    elseif i == "ONO" then
        return 7
    elseif i == "NO" then
        return 8
    elseif i == "NNO" then
        return 9
    else
        return 1
    end

end


--Renvoi vent direction pleine en toute lettre
function vent_plein(d)

    local b

    if string.len(d) == 1 then
        if string.find(d, "N") ~= nil then
            b = string.gsub(d, "N", "Nord")
        elseif string.find(d, "S") ~= nil then
            b = string.gsub(d, "S", "Sud")
        elseif string.find(d, "E") ~= nil then
            b = string.gsub(d, "E", "Est")
        elseif string.find(d, "O") ~= nil then
            b = string.gsub(d, "O", "Ouest")
        end
    else
        b = d
    end

    return b

end


--Détermine l'icône vent en tenant conte de la force du vent
function icone_vent(d, fo)

    local f = tonumber(fo)
    local n

    if f <= Palier then
        n = d
    elseif f <= Palier*2 then
        n = d + 17
    elseif f <= Palier*3 then
        n = d + 34
    elseif f >= (Palier*3)+1 then
        n = d + 51
    end

    if n <= 9 then
        n = "0"..n
    end

    return n

end


--Découpage descriptions sur deux lignes
function decoupage(d)

    local l1, l2, n, p1, p2, n1, n2, l1b, l2b, dm, dp
    if string.len(d) >= 22 then
        n = math.ceil(string.len(d)/2)
        dm = string.sub(d, 1, n)
        dp = string.sub(d, n)
        p1 = string.find(dp, " ")
        local b = 1
        p2 = nil
        if string.find(dm, ' ') then
            while p2 == nil do
                b = b+1
                p2 = string.find(dm, ' ', -b)
            end
        end
        if p1 ~= nil then p1 = n+p1-1 end

        if p1 == nil and p2 == nil then p1 = string.find(d, " ") end
        if p2 == nil then p2 = p1 end
        if p1 == nil then p1 = p2 end
        if p1-n >= n-p2 then
            l1b = string.sub(d, 1, p2-1)
            l2b = string.sub(d, p2+1)
        else
            l1b = string.sub(d, 1, p1-1)
            l2b = string.sub(d, p1+1)
        end
    else
        l1b = d
        l2b = " "
    end
    n1 = math.ceil((22 - string.len(l1b))/2)
    l1 = string.rep(" ", n1)..l1b
    n2 = math.ceil((22 - string.len(l2b))/2)
    l2 = string.rep(" ", n2)..l2b

--Retour information avec espaces ligne 1 & 2 et sans espaces ligne 1 & 2
    return l1, l2, l1b, l2b

end


--initialisation paramètres
function conky_init(cfg)
    print("[\27[1;43mINFO\27[0m] "..cfg)
    notifyPartielle="oui"

    local pos1

    cfg = string.gsub(cfg, "~", home)
    cfg = string.gsub(cfg, "$HOME", home)
    fichier_init = cfg

    local file = assert(io.open(cfg, "rb") )
    local line = file:read()
    for line in file:lines() do
        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, 'repscript=') ~= nil then
            repscript = 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, 'Prev8heures=') ~= nil then
            huit = 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)
        elseif string.find(line, 'notify=') ~= nil then
            notify = string.sub(line, pos1+1)
        elseif string.find(line, 'nbFoisHuit=') ~= nil then
            nbFoisHuit = string.sub(line, pos1+1)
        elseif string.find(line, 'notifyPartielle=') ~= nil then
            notifyPartielle = string.sub(line, pos1+1)
        end
    end
    io.close(file)
    ID = Get_ID()
    r = r:gsub("~", home):gsub("$HOME", home)
    repsauv = repsauv:gsub("~", home):gsub("$HOME", home)
    repscript = repscript:gsub("~", home):gsub("$HOME", home)

print("", "version = "..Version.."\n", "web = "..cmd1.."\n", "Pévision Nb jours = "..jours.."\n", "Pévision Matin = "..matin.."\n", "Pévision Après Midi = "..apresmidi.."\n", "Pévision Soirée = "..soiree.."\n", "Pévision Nuit = "..nuit.."\n","Prévision sur 8 heures = "..huit.."\n","nbFoisHuit= "..nbFoisHuit.."\n", "Délais = "..delais.."\n", "Chemin de travail = "..r.."\n","Palier = "..Palier.."\n", "Chemin de sauvegarde = "..repsauv.."\n", "Chemin script = "..repscript.."\n", "Notification = "..notify.."\n", "ID = "..ID)

--Création répertoire de travail
    cmd, l = cmd1:match("([%a%p%d]*)/[%a%p]*/([%d%p%a]*)")
    l1 = cmd:match("[%a%p]*/(%a*)/%d*")

    Rep = r.."/"..l1.."/"..l
    if os.execute("cd "..Rep) ~= 0 then
        os.execute("mkdir "..r.."/"..l1.."&& mkdir "..Rep)
    end

--initialisation compteurs
    t = os.time()-delais
    tc = t
    start = 1

--Vérification existence repsauv

    if os.execute("cd "..repsauv) ~= 0 then
--création de repsauv si inexistant
        local pos1 = 1
        local chemin = nil
        local cheminsup = nil
        while pos1 ~= nil do
            pos1 = string.find(repsauv, '/', pos1+1)
            if pos1 ~= nil then
                cheminsup = string.sub(repsauv, pos1)
                chemin = string.gsub(repsauv, cheminsup, "")
            else
                cheminsup = ""
                chemin = repsauv
            end
            if os.execute("cd "..chemin) ~= 0 then
                os.execute("mkdir "..chemin)
            end
        end
    end

    start=1

    MAJ ="0"

end

--Mise à jour météo
function conky_Meteo_Maj()

    local s = '${if_gw}${lua conky_Meteo_enligne}${else}${lua conky_Meteo_horsligne}${endif}'
    conky_parse( s )
    return " "
end

--hors ligne récupération de données
function conky_Meteo_horsligne()
    local value
    if dermodif2 == nil or dermodif2 ~= conky_parse("${exec date -r "..repsauv.."/CC '+%s'}") then
        dermodif2=conky_parse("${exec date -r "..repsauv.."/CC '+%s'}")
--Récupération dernière condition courante
        local file = assert(io.open(repsauv.."/CC", "r") )
        local line = file:read()
        local i = 0
        local donee = {}
        for line in file:lines() do
            i = i+1
            donee[i] = line
        end
        io.close(file)
        local t = {"Ville", "latitude", "longitude", "Cond", "Icone", "Temp", "Tempr", "VentDir", "VentForce", "Humidite", "Pression", "Uv", "CouvNuage", "Plafond", "PointRosee", "Visibilite", "Alerte", "HistoMaxJour", "HistoMaxNormalJour", "HistoMaxRecordJour", "HistoMax1Ans", "HistoMinJour", "HistoMinNormalJour", "HistoMinRecordJour", "HistoMin1Ans", "DateJour", "DateMois", "DateAnnee"}
        i=0
        for i = 1,table.getn(t) do
            donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
            value=donee[i]:match("(%d*)")
            if value ~= "" then
                donee[i] = value
            end
            conditioncourante[t[i]] = donee[i]
        end
--Récupération de l'heure de mise a jour
        time = donee[table.getn(t)+1]
        conditioncourante.Date = os.time{year=conditioncourante.DateAnnee, month=conditioncourante.DateMois, day=conditioncourante.DateJour, hour=0}
--Traitement condition courrante
        if conditioncourante.VentDir == "CLM" then
            conditioncourante.VentDir = "Calme"
            conditioncourante.VentForce = "0"
        end
        conditioncourante.Alerte = fran_alerte(conditioncourante.Alerte)
        conditioncourante.VentIcone = icone_vent(direction_vent(conditioncourante.VentDir), conditioncourante.VentForce)
        conditioncourante.VentPlein = vent_plein(conditioncourante.VentDir)
        conditioncourante.CondMeteo1, conditioncourante.CondMeteo2, conditioncourante.CondMeteo1se, conditioncourante.CondMeteo2se = decoupage(conditioncourante.Cond)
        conditioncourante.Alerte1, conditioncourante.Alerte2, conditioncourante.Alerte1se, conditioncourante.Alerte2se = decoupage(conditioncourante.Alerte)
        print("[\27[1;42m OK \27[0m] Condition courante")

--Récupération prévision

        for j = 1,jours do
            local file = assert(io.open(repsauv.."/Jour"..j, "r"))
            local line = file:read()
            local i = 0
            local donee = {}
            for line in file:lines() do
                i = i+1
                donee[i] = line
            end
            io.close(file)
            local infojournee = {}
            local t = {"VentDirJour", "VentForceJour", "VentDirNuit", "VentForceNuit", "VentRafalesJour", "VentRafalesNuit", "UvJour", "UvNuit", "ProbOrageJour", "ProbOrageNuit", "NivPrecJour", "NivPrecNuit", "QPluieJour", "QPluieNuit", "QNeigeJour", "QNeigeNuit", "EVerglasJour", "EVerglasNuit", "HeurePrecJour", "HeurePrecNuit", "HeurePluieJour", "HeurePluieNuit", "TempJour", "TempNuit", "RealFeelJour", "RealFeelNuit", "ProbPrecJour", "ProbPrecNuit", "CondMeteoJour", "CondMeteoNuit", "IconeJour", "IconeNuit", "HistoMaxJour", "HistoMaxNormalJour", "HistoMaxRecordJour", "HistoMax1Ans", "HistoMinJour", "HistoMinNormalJour", "HistoMinRecordJour", "HistoMin1Ans", "SoleilLever", "SoleilDuree", "SoleilCoucher", "LuneLever", "LuneDuree", "LuneCoucher", "DateJour", "DateMois", "DateAnnee"}
            i=0
            for i = 1,table.getn(t) do
                donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
                if donee[i]:find(":") == nil then
                    value=donee[i]:match("(%d*)")
                    if value ~= "" then
                        donee[i] = value
                    end
                end
                infojournee[t[i]] = donee[i]
            end

--Trie des infos
            local info = {}
            local y ={"VentDirJour", "VentForceJour", "VentRafalesJour", "UvJour", "ProbOrageJour", "NivPrecJour", "QPluieJour", "QNeigeJour", "EVerglasJour", "HeurePrecJour", "HeurePluieJour", "TempJour", "RealFeelJour", "ProbPrecJour", "CondMeteoJour", "IconeJour"}
            local t = {"VentDir", "VentForce", "VentRafales", "Uv", "ProbOrage", "NivPrec", "QPluie", "QNeige", "EVerglas", "HrPrecJour", "HrPluieJour", "Temp", "TempRes", "ProbPrec", "CondMeteo",  "Icone"}
            conditionJour[j] = {}
            i=0
            for i = 1, table.getn(t) do
                info[t[i]] = infojournee[y[i]]
            end
            conditionJour[j] = info
            local info1 = {}
            local y = {"VentDirNuit", "VentForceNuit", "VentRafalesNuit", "UvNuit", "ProbOrageNuit", "NivPrecNuit", "QPluieNuit", "QNeigeNuit", "EVerglasNuit", "HeurePrecNuit", "HeurePluieNuit", "TempNuit", "RealFeelNuit", "ProbPrecNuit", "CondMeteoNuit", "IconeNuit"}
            local t = {"VentDir", "VentForce", "VentRafales", "Uv", "ProbOrage", "NivPrec", "QPluie", "QNeige", "EVerglas", "HrPrecNuit", "HrPluieNuit", "Temp", "TempRes", "ProbPrec", "CondMeteo", "Icone"}
            conditionNuit[j] = {}
            i=0
            for i = 1, table.getn(t) do
                info1[t[i]] = infojournee[y[i]]
            end
            conditionNuit[j] = info1
            local info2 = {}

            InfoJour[j] = {}
            InfoJour[j].Jour = os.time{year=infojournee.DateAnnee, month=infojournee.DateMois, day=infojournee.DateJour, hour=0}
            InfoJour[j].LeverSoleilH, InfoJour[j].LeverSoleilM = infojournee.SoleilLever:match("(%d*):(%d*)")
            InfoJour[j].CoucherSoleilH, InfoJour[j].CoucherSoleilM = infojournee.SoleilCoucher:match("(%d*):(%d*)")
            InfoJour[j].Histo_Max =infojournee.HistoMax1Ans
            InfoJour[j].Histo_Min =infojournee.HistoMin1Ans

--Traitement condition courrante
            if conditionJour[j].VentDir == "CLM" then
                conditionJour[j].VentDir = "Calme"
                conditionJour[j].VentForce = "0"
            end
            conditionJour[j].VentIcone = icone_vent(direction_vent(conditionJour[j].VentDir), conditionJour[j].VentForce)
            conditionJour[j].RafalesIcone = icone_vent(direction_vent(conditionJour[j].VentDir), conditionJour[j].VentRafales)
            conditionJour[j].VentP = vent_plein(conditionJour[j].VentDir)
            conditionJour[j].CondMeteo1, conditionJour[j].CondMeteo2, conditionJour[j].CondMeteo1se, conditionJour[j].CondMeteo2se = decoupage(conditionJour[j].CondMeteo)
            if conditionNuit[j].VentDir == "Calme" then
                conditionNuit[j].VentForce = "0"
            end
            conditionNuit[j].VentIcone = icone_vent(direction_vent(conditionNuit[j].VentDir), conditionNuit[j].VentForce)
            conditionNuit[j].RafalesIcone = icone_vent(direction_vent(conditionNuit[j].VentDir), conditionNuit[j].VentRafales)
            conditionNuit[j].VentP = vent_plein(conditionNuit[j].VentDir)
            conditionNuit[j].CondMeteo1, conditionNuit[j].CondMeteo2, conditionNuit[j].CondMeteo1se, conditionNuit[j].CondMeteo2se = decoupage(conditionNuit[j].CondMeteo)
            print("[\27[1;42m OK \27[0m] Prévision "..j)

--Récupération quart de journée
            local t = {"CondMeteo", "Icone", "TempMin", "TempMax", "TempMinR", "TempMaxR", "VentDir", "VentForce", "ProbPrec", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite"}
            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
                conditionMatin[j] = {}
                local info3 = {}
                for i = 1,table.getn(t) do
                    donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
                    value=donee[i]:match("(%d*)")
                    if value ~= "" then
                        donee[i] = value
                    end
                    info3[t[i]] = donee[i]
                end
                conditionMatin[j] = info3
                io.close(file)
                if conditionMatin[j].VentDir == "CLM" then
                    conditionMatin[j].VentDir = "Calme"
                    conditionMatin[j].VentForce = "0"
                end
                conditionMatin[j].VentIcone = icone_vent(direction_vent(conditionMatin[j].VentDir), conditionMatin[j].VentForce)
                conditionMatin[j].VentP = vent_plein(conditionMatin[j].VentDir)
                conditionMatin[j].CondMeteo1, conditionMatin[j].CondMeteo2, conditionMatin[j].CondMeteo1se, conditionMatin[j].CondMeteo2se = decoupage(conditionMatin[j].CondMeteo)
                print("[\27[1;42m OK \27[0m] Matin "..j)
            end


            if apresmidi == "oui" then
                local file = assert(io.open(repsauv.."/AM"..j, "r"))
                local line = file:read()
                local i = 0
                local donee = {}
                for line in file:lines() do
                    i = i+1
                    donee[i] = line
                end
                conditionAM[j] = {}
                local info3 = {}
                for i = 1,table.getn(t) do
                    donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
                    value=donee[i]:match("(%d*)")
                    if value ~= "" then
                        donee[i] = value
                    end
                    info3[t[i]] = donee[i]
                end
                conditionAM[j] = info3
                io.close(file)
                if conditionAM[j].VentDir == "CLM" then
                    conditionAM[j].VentDir = "Calme"
                    conditionAM[j].VentForce = "0"
                end
                conditionAM[j].VentIcone = icone_vent(direction_vent(conditionAM[j].VentDir), conditionAM[j].VentForce)
                conditionAM[j].VentP = vent_plein(conditionAM[j].VentDir)
                conditionAM[j].CondMeteo1, conditionAM[j].CondMeteo2, conditionAM[j].CondMeteo1se, conditionAM[j].CondMeteo2se = decoupage(conditionAM[j].CondMeteo)
                print("[\27[1;42m OK \27[0m] Apres Midi "..j)
            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
                io.close(file)
                conditionSoiree[j] = {}
                local info3 = {}
                for i = 1,table.getn(t) do
                    donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
                    value=donee[i]:match("(%d*)")
                    if value ~= "" then
                        donee[i] = value
                    end
                    info3[t[i]] = donee[i]
                end
                conditionSoiree[j] = info3
                if conditionSoiree[j].VentDir == "CLM" then
                    conditionSoiree[j].VentDir = "Calme"
                    conditionSoiree[j].VentForce = "0"
                end
                conditionSoiree[j].VentIcone = icone_vent(direction_vent(conditionSoiree[j].VentDir), conditionSoiree[j].VentForce)
                conditionSoiree[j].VentP = vent_plein(conditionSoiree[j].VentDir)
                conditionSoiree[j].CondMeteo1, conditionSoiree[j].CondMeteo2, conditionSoiree[j].CondMeteo1se, conditionSoiree[j].CondMeteo2se = decoupage(conditionSoiree[j].CondMeteo)
                print("[\27[1;42m OK \27[0m] Soiree "..j)
            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
                io.close(file)
                conditionNoct[j] = {}
                local info3 = {}
                for i = 1,table.getn(t) do
                    donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
                    value=donee[i]:match("(%d*)")
                    if value ~= "" then
                        donee[i] = value
                    end
                    info3[t[i]] = donee[i]
                end
                conditionNoct[j] = info3
                if conditionNoct[j].VentDir == "CLM" then
                    conditionNoct[j].VentDir = "Calme"
                    conditionNoct[j].VentForce = "0"
                end
                conditionNoct[j].VentIcone = icone_vent(direction_vent(conditionNoct[j].VentDir), conditionNoct[j].VentForce)
                conditionNoct[j].VentP = vent_plein(conditionNoct[j].VentDir)
                conditionNoct[j].CondMeteo1, conditionNoct[j].CondMeteo2, conditionNoct[j].CondMeteo1se, conditionNoct[j].CondMeteo2se = decoupage(conditionNoct[j].CondMeteo)
                print("[\27[1;42m OK \27[0m] Nuit "..j)
            end
        end


        if huit == "oui" then
            local info4 = {}
            local info3 = {}
            for y = 1,nbFoisHuit do
                local file = assert(io.open(repsauv.."/huitHeures"..y, "r"))
                t = {"Heure", "TempMax", "TempMaxR", "Humidite", "Pluie", "Neige", "Verglas", "Vent", "UV", "CouvNuage", "PointRosee", "Icone"}

                local line = file:read()
                local i = 0
                local donee = {}
                for line in file:lines() do
                    i = i+1
                    donee[i] = line
                end
                io.close(file)
                for j = 1,8 do
                    x=j+((y-1)*8)
                    huitHeures[x] = {}
                    info3[x] = {}
                end
                x=0
                for i = 1,table.getn(t) do
                    for j = 1,8 do
                        x=x+1
                        local k=j+((y-1)*8)
                        donee[x]=donee[x]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
                        if i ~= 8 then
                            value=donee[x]:match("(%d*)")
                            if value ~= "" then
                                donee[x] = value
                            end
                        end
                        table.insert(info3[k],i,donee[x])
                    end
                end
            end
            for j = 1,8*nbFoisHuit do
                info4 = {}
                for i = 1,table.getn(t) do
                    info4[t[i]]=info3[j][i]
                end
                huitHeures[j]=info4
                huitHeures[j].VentForce, huitHeures[j].VentDir=huitHeures[j].Vent:match("(%d*) (%a*)")
                if huitHeures[j].VentDir == "CLM" then
                    huitHeures[j].VentDir = "Calme"
                    huitHeures[j].VentForce = "0"
                end
                huitHeures[j].VentIcone = icone_vent(direction_vent(huitHeures[j].VentDir), huitHeures[j].VentForce)
                huitHeures[j].VentP = vent_plein(huitHeures[j].VentDir)
            end
            print("[\27[1;42m OK \27[0m] huit heures")
        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_total = donee[17]
        io.close(file)


        if MAJ == "0" then
            MAJ = "1"
        else
            MAJ = "0"
        end


        collectgarbage()
    end
    return ""
end

--en ligne mise à jour
function conky_Meteo_enligne()
    if start==1 then
--      os.execute("pkill -f \"python "..repscript.."/recmeteo_python_2.py adressWeb="..cmd1.." repsauv="..repsauv.." huitHeures="..huit.." nbFoisHuit="..nbFoisHuit.." nbJour="..jours.." interval="..delais.." matin="..matin.." apresmidi="..apresmidi.." soiree="..soiree.." nuit="..nuit.." notify="..notify.."\"")
        os.execute("python3 "..repscript.."/recmeteo.py adressWeb="..cmd1.." repsauv="..repsauv.." huitHeures="..huit.." nbFoisHuit="..nbFoisHuit.." nbJour="..jours.." interval="..delais.." matin="..matin.." apresmidi="..apresmidi.." soiree="..soiree.." nuit="..nuit.." notify="..notify.." notifyPartielle="..notifyPartielle.." id="..ID.." demon=oui MAJP=oui &")
    end
    if dermodif == nil or dermodif ~= conky_parse("${exec date -r "..repsauv.."/CC '+%s'}") then
        dermodif=conky_parse("${exec date -r "..repsauv.."/CC '+%s'}")
            if 3600 <= os.difftime(os.time(), tc) or start == 1 then
                start = 2
                tc = os.time()
--                lunaison(r)
--                print("[\27[1;42m OK \27[0m] lunaison")
                if repsauv ~= nil then
--lancement sauvegarde
                    sauvegarde()
                end
            end
            conky_Meteo_horsligne()

        collectgarbage()
    end
    return " "
end


--Retour d'information météo

--Condition courrante

function conky_Meteo_IconeM(r, x, y, w, h)
    conky_fDrawImage(r.."/icone_meteo/"..conditioncourante.Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_TempRes()
    return conditioncourante.Tempr
end

function conky_Meteo_TempAct()
    return conditioncourante.Temp
end

function conky_Meteo_CondMeteo()
    return conditioncourante.Cond
end

function conky_Meteo_CondMeteo1()
    return conditioncourante.CondMeteo1
end

function conky_Meteo_CondMeteo2()
    return conditioncourante.CondMeteo2
end

function conky_Meteo_CondMeteo1se()
    return conditioncourante.CondMeteo1se
end

function conky_Meteo_CondMeteo2se()
    return conditioncourante.CondMeteo2se
end

function conky_Meteo_Alerte()
    return conditioncourante.Alerte
end

function conky_Meteo_Alerte1()
    return conditioncourante.Alerte1
end

function conky_Meteo_Alerte2()
    return conditioncourante.Alerte2
end

function conky_Meteo_Alerte1se()
    return conditioncourante.Alerte1se
end

function conky_Meteo_Alerte2se()
    return conditioncourante.Alerte2se
end

function conky_Meteo_VentDir()
    return conditioncourante.VentDir
end

function conky_Meteo_VentDirP()
    return conditioncourante.VentPlein
end

function conky_Meteo_VentForce()
    return conditioncourante.VentForce
end

function conky_Meteo_IconeV(r, x, y, w, h)
    conky_fDrawImage(r.."/vent/"..conditioncourante.VentIcone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Humidite()
    return tonumber(conditioncourante.Humidite)
end

function conky_Meteo_Rose()
    return tonumber(conditioncourante.PointRosee)
end

function conky_Meteo_Pression()
    return tonumber(conditioncourante.Pression)
end

function conky_Meteo_Visibilite()
    return tonumber(conditioncourante.Visibilite)
end

function conky_Meteo_Date(format)
    format = string.gsub(format, "_", " ")
    return trad_date(os.date(format, conditioncourante.Date))
end

function conky_Meteo_Ville()
    return conditioncourante.Ville
end

function conky_Meteo_CouvNuage()
    return tonumber(conditioncourante.CouvNuage)
end

function conky_Meteo_Uv()
    return conditioncourante.Uv
end

function conky_Meteo_latitude()
    return conditioncourante.latitude
end

function conky_Meteo_longitude()
    return conditioncourante.longitude
end

function conky_Meteo_Heure()
    return os.date("%H")
end

function conky_Meteo_Minute()
    return os.date("%M")
end


--Prévision Météo

--Jour

function conky_Meteo_Jour_CondMeteo(j)
    return conditionJour[tonumber(j)].CondMeteo
end

function conky_Meteo_Jour_CondMeteo1(j)
    return conditionJour[tonumber(j)].CondMeteo1
end

function conky_Meteo_Jour_CondMeteo2(j)
    return conditionJour[tonumber(j)].CondMeteo2
end

function conky_Meteo_Jour_CondMeteo1se(j)
    return conditionJour[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Jour_CondMeteo2se(j)
    return conditionJour[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Jour_Temp(j)
    return tonumber(conditionJour[tonumber(j)].Temp)
end

function conky_Meteo_Jour_TempRes(j)
    return tonumber(conditionJour[tonumber(j)].TempRes)
end

function conky_Meteo_Jour_ProbPrec(j)
    return tonumber(conditionJour[tonumber(j)].ProbPrec)
end

function conky_Meteo_Jour_VentDir(j)
    return conditionJour[tonumber(j)].VentDir
end

function conky_Meteo_Jour_VentDirP(j)
    return conditionJour[tonumber(j)].VentP
end

function conky_Meteo_Jour_VentForce(j)
    return tonumber(conditionJour[tonumber(j)].VentForce)
end

function conky_Meteo_Jour_VentRafales(j)
    return tonumber(conditionJour[tonumber(j)].VentRafales)
end

function conky_Meteo_Jour_Uv(j)
    return tonumber(conditionJour[tonumber(j)].Uv)
end

function conky_Meteo_Jour_ProbOrage(j)
    return tonumber(conditionJour[tonumber(j)].ProbOrage)
end

function conky_Meteo_Jour_NivPrec(j)
    return tonumber(conditionJour[tonumber(j)].NivPrec)
end

function conky_Meteo_Jour_QPluie(j)
    return tonumber(conditionJour[tonumber(j)].QPluie)
end

function conky_Meteo_Jour_QNeige(j)
    return tonumber(conditionJour[tonumber(j)].QNeige)
end

function conky_Meteo_Jour_EVerglas(j)
    return tonumber(conditionJour[tonumber(j)].EVerglas)
end

function conky_Meteo_Jour_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..conditionJour[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Jour_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionJour[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Jour_IconeR(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionJour[tonumber(j)].RafalesIcone..".png", x, y, w, h)
    return ""
end


--Nuit

function conky_Meteo_Nuit_CondMeteo(j)
    return conditionNuit[tonumber(j)].CondMeteo
end

function conky_Meteo_Nuit_CondMeteo1(j)
    return conditionNuit[tonumber(j)].CondMeteo1
end

function conky_Meteo_Nuit_CondMeteo2(j)
    return conditionNuit[tonumber(j)].CondMeteo2
end

function conky_Meteo_Nuit_CondMeteo1se(j)
    return conditionNuit[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Nuit_CondMeteo2se(j)
    return conditionNuit[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Nuit_Temp(j)
    return tonumber(conditionNuit[tonumber(j)].Temp)
end

function conky_Meteo_Nuit_TempRes(j)
    return tonumber(conditionNuit[tonumber(j)].TempRes)
end

function conky_Meteo_Nuit_ProbPrec(j)
    return tonumber(conditionNuit[tonumber(j)].ProbPrec)
end

function conky_Meteo_Nuit_VentDir(j)
    return conditionNuit[tonumber(j)].VentDir
end

function conky_Meteo_Nuit_VentDirP(j)
    return conditionNuit[tonumber(j)].VentP
end

function conky_Meteo_Nuit_VentForce(j)
    return tonumber(conditionNuit[tonumber(j)].VentForce)
end

function conky_Meteo_Nuit_VentRafales(j)
    return tonumber(conditionNuit[tonumber(j)].VentRafales)
end

function conky_Meteo_Nuit_ProbOrage(j)
    return tonumber(conditionNuit[tonumber(j)].ProbOrage)
end

function conky_Meteo_Nuit_NivPrec(j)
    return tonumber(conditionNuit[tonumber(j)].NivPrec)
end

function conky_Meteo_Nuit_QPluie(j)
    return tonumber(conditionNuit[tonumber(j)].QPluie)
end

function conky_Meteo_Nuit_QNeige(j)
    return tonumber(conditionNuit[tonumber(j)].QNeige)
end

function conky_Meteo_Nuit_EVerglas(j)
    return tonumber(conditionNuit[tonumber(j)].EVerglas)
end

function conky_Meteo_Nuit_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..conditionNuit[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Nuit_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionNuit[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Nuit_IconeR(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionNuit[tonumber(j)].RafalesIcone..".png", x, y, w, h)
    return ""
end


--Infos sur la journée

function conky_Meteo_Jour(format, j)
    format = string.gsub(format, "_", " ")
    return trad_date(os.date(format, InfoJour[tonumber(j)].Jour))
end

function conky_Meteo_HLeverSoleil(j)
    return InfoJour[tonumber(j)].LeverSoleilH
end

function conky_Meteo_MLeverSoleil(j)
    return InfoJour[tonumber(j)].LeverSoleilM
end

function conky_Meteo_LeverSoleil(j)
    return tonumber((InfoJour[tonumber(j)].LeverSoleilH*60)+InfoJour[tonumber(j)].LeverSoleilM)
end

function conky_Meteo_HCoucherSoleil(j)
    return InfoJour[tonumber(j)].CoucherSoleilH
end

function conky_Meteo_MCoucherSoleil(j)
    return InfoJour[tonumber(j)].CoucherSoleilM
end

function conky_Meteo_CoucherSoleil(j)
    return tonumber((InfoJour[tonumber(j)].CoucherSoleilH*60)+InfoJour[tonumber(j)].CoucherSoleilM)
end

function conky_Meteo_HDureeJour(j)
    return InfoJour[tonumber(j)].CoucherSoleilH-InfoJour[tonumber(j)].LeverSoleilH
end

function conky_Meteo_MDureeJour(j)
    return os.date("%M", ((((InfoJour[tonumber(j)].CoucherSoleilH*3600)-3600)+(InfoJour[tonumber(j)].CoucherSoleilM*60))-(((InfoJour[tonumber(j)].LeverSoleilH*3600))+(InfoJour[tonumber(j)].LeverSoleilM*60))))
end

function conky_Meteo_Histo_Min(j)
    return InfoJour[tonumber(j)].Histo_Min
end

function conky_Meteo_Histo_Max(j)
    return InfoJour[tonumber(j)].Histo_Max
end


--Matin

function conky_Meteo_Matin_CondMeteo(j)
    return conditionMatin[tonumber(j)].CondMeteo
end

function conky_Meteo_Matin_CondMeteo1(j)
    return conditionMatin[tonumber(j)].CondMeteo1
end

function conky_Meteo_Matin_CondMeteo2(j)
    return conditionMatin[tonumber(j)].CondMeteo2
end

function conky_Meteo_Matin_CondMeteo1se(j)
    return conditionMatin[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Matin_CondMeteo2se(j)
    return conditionMatin[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Matin_TempMax(j)
    return tonumber(conditionMatin[tonumber(j)].TempMax)
end

function conky_Meteo_Matin_TempMin(j)
    return tonumber(conditionMatin[tonumber(j)].TempMin)
end

function conky_Meteo_Matin_TempMaxRes(j)
    return tonumber(conditionMatin[tonumber(j)].TempMaxR)
end

function conky_Meteo_Matin_TempMinRes(j)
    return tonumber(conditionMatin[tonumber(j)].TempMinR)
end

function conky_Meteo_Matin_ProbPrec(j)
    return tonumber(conditionMatin[tonumber(j)].ProbPrec)
end

function conky_Meteo_Matin_VentDir(j)
    return conditionMatin[tonumber(j)].VentDir
end

function conky_Meteo_Matin_VentDirP(j)
    return conditionMatin[tonumber(j)].VentP
end

function conky_Meteo_Matin_VentForce(j)
    return tonumber(conditionMatin[tonumber(j)].VentForce)
end

function conky_Meteo_Matin_QPluie(j)
    return tonumber(conditionMatin[tonumber(j)].QPluie)
end

function conky_Meteo_Matin_QNeige(j)
    return tonumber(conditionMatin[tonumber(j)].QNeige)
end

function conky_Meteo_Matin_Humidite(j)
    return tonumber(conditionMatin[tonumber(j)].Humidite)
end

function conky_Meteo_Matin_CouvNuage(j, r)
    if r == nil then r = 100 end
    local Couv = (tonumber(conditionMatin[tonumber(j)].CouvNuage) / 100) * r
    if Couv - math.floor(Couv) <= 0.5 then
        Couv = math.floor(Couv)
    else
        Couv = math.ceil(Couv)
    end
    return Couv
end

function conky_Meteo_Matin_Rose(j)
    return tonumber(conditionMatin[tonumber(j)].PointRosee)
end

function conky_Meteo_Matin_Visibilite(j)
    return tonumber(conditionMatin[tonumber(j)].Visibilite)
end

function conky_Meteo_Matin_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..conditionMatin[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Matin_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionMatin[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end


--Après Midi

function conky_Meteo_AM_CondMeteo(j)
    return conditionAM[tonumber(j)].CondMeteo
end

function conky_Meteo_AM_CondMeteo1(j)
    return conditionAM[tonumber(j)].CondMeteo1
end

function conky_Meteo_AM_CondMeteo2(j)
    return conditionAM[tonumber(j)].CondMeteo2
end

function conky_Meteo_AM_CondMeteo1se(j)
    return conditionAM[tonumber(j)].CondMeteo1se
end

function conky_Meteo_AM_CondMeteo2se(j)
    return conditionAM[tonumber(j)].CondMeteo2se
end

function conky_Meteo_AM_TempMax(j)
    return tonumber(conditionAM[tonumber(j)].TempMax)
end

function conky_Meteo_AM_TempMin(j)
    return tonumber(conditionAM[tonumber(j)].TempMin)
end

function conky_Meteo_AM_TempMaxRes(j)
    return tonumber(conditionAM[tonumber(j)].TempMaxR)
end

function conky_Meteo_AM_TempMinRes(j)
    return tonumber(conditionAM[tonumber(j)].TempMinR)
end

function conky_Meteo_AM_ProbPrec(j)
    return tonumber(conditionAM[tonumber(j)].ProbPrec)
end

function conky_Meteo_AM_VentDir(j)
    return conditionAM[tonumber(j)].VentDir
end

function conky_Meteo_AM_VentDirP(j)
    return conditionAM[tonumber(j)].VentP
end

function conky_Meteo_AM_VentForce(j)
    return tonumber(conditionAM[tonumber(j)].VentForce)
end

function conky_Meteo_AM_QPluie(j)
    return tonumber(conditionAM[tonumber(j)].QPluie)
end

function conky_Meteo_AM_QNeige(j)
    return tonumber(conditionAM[tonumber(j)].QNeige)
end

function conky_Meteo_AM_Humidite(j)
    return tonumber(conditionAM[tonumber(j)].Humidite)
end

function conky_Meteo_AM_CouvNuage(j, r)
    if r == nil then r = 100 end
    local Couv = (tonumber(conditionAM[tonumber(j)].CouvNuage) / 100) * r
    if Couv - math.floor(Couv) <= 0.5 then
        Couv = math.floor(Couv)
    else
        Couv = math.ceil(Couv)
    end
    return Couv
end

function conky_Meteo_AM_Rose(j)
    return tonumber(conditionAM[tonumber(j)].PointRosee)
end

function conky_Meteo_AM_Visibilite(j)
    return tonumber(conditionAM[tonumber(j)].Visibilite)
end

function conky_Meteo_AM_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..conditionAM[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_AM_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionAM[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end


--Soirée

function conky_Meteo_Soiree_CondMeteo(j)
    return conditionSoiree[tonumber(j)].CondMeteo
end

function conky_Meteo_Soiree_CondMeteo1(j)
    return conditionSoiree[tonumber(j)].CondMeteo1
end

function conky_Meteo_Soiree_CondMeteo2(j)
    return conditionSoiree[tonumber(j)].CondMeteo2
end

function conky_Meteo_Soiree_CondMeteo1se(j)
    return conditionSoiree[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Soiree_CondMeteo2se(j)
    return conditionSoiree[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Soiree_TempMax(j)
    return tonumber(conditionSoiree[tonumber(j)].TempMax)
end

function conky_Meteo_Soiree_TempMin(j)
    return tonumber(conditionSoiree[tonumber(j)].TempMin)
end

function conky_Meteo_Soiree_TempMaxRes(j)
    return tonumber(conditionSoiree[tonumber(j)].TempMaxR)
end

function conky_Meteo_Soiree_TempMinRes(j)
    return tonumber(conditionSoiree[tonumber(j)].TempMinR)
end

function conky_Meteo_Soiree_ProbPrec(j)
    return tonumber(conditionSoiree[tonumber(j)].ProbPrec)
end

function conky_Meteo_Soiree_VentDir(j)
    return conditionSoiree[tonumber(j)].VentDir
end

function conky_Meteo_Soiree_VentDirP(j)
    return conditionSoiree[tonumber(j)].VentP
end

function conky_Meteo_Soiree_VentForce(j)
    return tonumber(conditionSoiree[tonumber(j)].VentForce)
end

function conky_Meteo_Soiree_QPluie(j)
    return tonumber(conditionSoiree[tonumber(j)].QPluie)
end

function conky_Meteo_Soiree_QNeige(j)
    return tonumber(conditionSoiree[tonumber(j)].QNeige)
end

function conky_Meteo_Soiree_Humidite(j)
    return tonumber(conditionSoiree[tonumber(j)].Humidite)
end

function conky_Meteo_Soiree_CouvNuage(j, r)
    if r == nil then r = 100 end
    local Couv = (tonumber(conditionSoiree[tonumber(j)].CouvNuage) / 100) * r
    if Couv - math.floor(Couv) <= 0.5 then
        Couv = math.floor(Couv)
    else
        Couv = math.ceil(Couv)
    end
    return Couv
end

function conky_Meteo_Soiree_Rose(j)
    return tonumber(conditionSoiree[tonumber(j)].PointRosee)
end

function conky_Meteo_Soiree_Visibilite(j)
    return tonumber(conditionSoiree[tonumber(j)].Visibilite)
end

function conky_Meteo_Soiree_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..conditionSoiree[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Soiree_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionSoiree[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end


--Nuit

function conky_Meteo_Noct_CondMeteo(j)
    return conditionNoct[tonumber(j)].CondMeteo
end

function conky_Meteo_Noct_CondMeteo1(j)
    return conditionNoct[tonumber(j)].CondMeteo1
end

function conky_Meteo_Noct_CondMeteo2(j)
    return conditionNoct[tonumber(j)].CondMeteo2
end

function conky_Meteo_Noct_CondMeteo1se(j)
    return conditionNoct[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Noct_CondMeteo2se(j)
    return conditionNoct[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Noct_TempMax(j)
    return tonumber(conditionNoct[tonumber(j)].TempMax)
end

function conky_Meteo_Noct_TempMin(j)
    return tonumber(conditionNoct[tonumber(j)].TempMin)
end

function conky_Meteo_Noct_TempMaxRes(j)
    return tonumber(conditionNoct[tonumber(j)].TempMaxR)
end

function conky_Meteo_Noct_TempMinRes(j)
    return tonumber(conditionNoct[tonumber(j)].TempMinR)
end

function conky_Meteo_Noct_ProbPrec(j)
    return tonumber(conditionNoct[tonumber(j)].ProbPrec)
end

function conky_Meteo_Noct_VentDir(j)
    return conditionNoct[tonumber(j)].VentDir
end

function conky_Meteo_Noct_VentDirP(j)
    return conditionNoct[tonumber(j)].VentP
end

function conky_Meteo_Noct_VentForce(j)
    return tonumber(conditionNoct[tonumber(j)].VentForce)
end

function conky_Meteo_Noct_QPluie(j)
    return tonumber(conditionNoct[tonumber(j)].QPluie)
end

function conky_Meteo_Noct_QNeige(j)
    return tonumber(conditionNoct[tonumber(j)].QNeige)
end

function conky_Meteo_Noct_Humidite(j)
    return tonumber(conditionNoct[tonumber(j)].Humidite)
end

function conky_Meteo_Noct_CouvNuage(j, r)
    if r == nil then r = 100 end
    local Couv = (tonumber(conditionNoct[tonumber(j)].CouvNuage) / 100) * r
    if Couv - math.floor(Couv) <= 0.5 then
        Couv = math.floor(Couv)
    else
        Couv = math.ceil(Couv)
    end
    return Couv
end

function conky_Meteo_Noct_Rose(j)
    return tonumber(conditionNoct[tonumber(j)].PointRosee)
end

function conky_Meteo_Noct_Visibilite(j)
    return tonumber(conditionNoct[tonumber(j)].Visibilite)
end

function conky_Meteo_Noct_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..conditionNoct[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_Noct_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..conditionNoct[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end

--Huit prochaines heures


function conky_Meteo_huitHeures_VentDirP(j)
    return huitHeures[tonumber(j)].VentP
end

function conky_Meteo_huitHeures_IconeV(r, x, y, w, h, j)
    conky_fDrawImage(r.."/vent/"..huitHeures[tonumber(j)].VentIcone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_huitHeures_Heure(j)
    return tonumber(huitHeures[tonumber(j)].Heure)
end

function conky_Meteo_huitHeures_IconeM(r, x, y, w, h, j)
    conky_fDrawImage(r.."/icone_meteo/"..huitHeures[tonumber(j)].Icone..".png", x, y, w, h)
    return ""
end

function conky_Meteo_huitHeures_Temp(j)
    return tonumber(huitHeures[tonumber(j)].TempMax)
end

function conky_Meteo_huitHeures_TempR(j)
    return tonumber(huitHeures[tonumber(j)].TempMaxR)
end

function conky_Meteo_huitHeures_VentDir(j)
    return huitHeures[tonumber(j)].VentDir
end

function conky_Meteo_huitHeures_VentForce(j)
    return tonumber(huitHeures[tonumber(j)].VentForce)
end

function conky_Meteo_huitHeures_Humidite(j)
    return tonumber(huitHeures[tonumber(j)].Humidite)
end

function conky_Meteo_huitHeures_CouvNuage(j)
    return tonumber(huitHeures[tonumber(j)].CouvNuage)
end

function conky_Meteo_huitHeures_Rose(j)
    return tonumber(huitHeures[tonumber(j)].PointRosee)
end

function conky_Meteo_huitHeures_ProbPluie(j)
    return tonumber(huitHeures[tonumber(j)].Pluie)
end

function conky_Meteo_huitHeures_ProbNeige(j)
    return tonumber(huitHeures[tonumber(j)].Neige)
end

function conky_Meteo_huitHeures_ProbVerglas(j)
    return tonumber(huitHeures[tonumber(j)].Verglas)
end

function conky_Meteo_huitHeures_Uv(j)
    return tonumber(huitHeures[tonumber(j)].UV)
end

--Lunaison

function conky_Lune_ephemerides()
    return ephemerides
end

function conky_Lune_ephemerides1()
    return ephemerides1
end

function conky_Lune_ephemerides2()
    return ephemerides2
end

function conky_Lune_Visibilite()
    return Visibilite
end

function conky_Lune_Phases()
    return Phases
end

function conky_Lune_Phases1()
    return Phases1
end

function conky_Lune_Phases2()
    return Phases2
end

function conky_Lune_Noeudlunaire()
    return Noeud_lunaire
end

function conky_Lune_Apogee()
    return Apogee
end

function conky_Lune_Perigee()
    return Perigee
end

function conky_Lune_Distance()
    return Distance
end

function conky_Lune_Age()
    return Age
end

function conky_Lune_HLeverLune()
    return Lever_LuneHeure
end

function conky_Lune_MLeverLune()
    return Lever_LuneMinute
end

function conky_Lune_HCoucherLune()
    return Coucher_LuneHeure
end

function conky_Lune_MCoucherLune()
    return Coucher_LuneMinute
end

function conky_Lune_EclipseTotal()
    if format == nil then format = "%A_%d_%B_%Y_à_%H:%M" end
    format = string.gsub(format, "_", " ")
    return trad_date(os.date(format, Eclipse_total))
end

--Fonction d'affichage
function conky_fDrawImage(path,x,y,w,h,arc)

    path = string.gsub(path, "~", home)
    path = string.gsub(path, "$HOME", home)

    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)

    local function fDrawImage(path,x,y,w,h,arc)
        x=x+(w/2)
        y=y+(h/2)
        local img =  cairo_image_surface_create_from_png(path)
        local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img)

        local cr = cairo_create (cs)
        cairo_translate (cr, x, y)

        if arc then
            cairo_rotate (cr, arc)
        end

        cairo_scale (cr, w/w_img, h/h_img)
        cairo_set_source_surface (cr, img, -w_img/2, -h_img/2)
        cairo_paint (cr)
        cairo_destroy(cr)
        cairo_surface_destroy (img)
    end
    fDrawImage(path,x,y,w,h,arc)
    cairo_surface_destroy(cs)
    return ""
end


--Informations sur le lua
function conky_Version()
    return Version
end

function conky_Meteo_fichier_init()
    return fichier_init
end

function conky_Meteo_etat_MAJ()
    return MAJ
end


--Sauvegarde des données
function sauvegarde()

--[[sauvegarde lunaison
    local file = assert(io.open(repsauv.."/lunaison", "w+"))
    file:write ("\n", ephemerides, "\n")
    file:write (ephemerides1, "\n")
    file:write (ephemerides2, "\n")
    file:write (Visibilite, "\n")
    file:write (Phases, "\n")
    file:write (Phases1, "\n")
    file:write (Phases2, "\n")
    file:write (Noeud_lunaire, "\n")
    file:write (Apogee, "\n")
    file:write (Perigee, "\n")
    file:write (Distance, "\n")
    file:write (Age, "\n")
    file:write (Lever_LuneHeure, "\n")
    file:write (Lever_LuneMinute, "\n")
    file:write (Coucher_LuneHeure, "\n")
    file:write (Coucher_LuneMinute, "\n")
    file:write (Eclipse_total, "\n")
    io.close(file)
]]--
--modification des droits utilisateur
--    os.execute('chmod o+rw- '..r..'/*lun*')
    os.execute('chmod -R o+rw- '..repsauv)
    os.execute('chmod -R o+rw- '..Rep)
end

recmeteo.py

#! /usr/bin/python3
# -*- coding: utf-8 -*-
# Par Didier-T Forum Ubuntu.fr
# Ajout notification par jpdipsy Forum Ubuntu.fr
# Ajout notification via DBus par ti_tux Forum Ubuntu.fr
# Ajout création repsauv si inexistant par jpdipsy Forum Ubuntu.fr
# Repris par Daniel38100 Forum Ubuntu.fr a partir de 2.00a en 01/1017


from socket import timeout
from urllib.request import Request, urlopen, URLError
from os import path, makedirs, system
from time import time, sleep, strftime, localtime
from re import search, compile, findall
from sys import argv
from gc import collect
from bs4 import BeautifulSoup, Tag, NavigableString
from datetime import date, datetime


Version='2.00a'

homedir=path.expanduser('~')

#### initialisation des variables
adressWeb="http://www.accuweather.com/fr/fr/belfort/133341/daily-weather-forecast/133341"
repsauv="~/essais"
huitHeures="oui"
nbFoisHuit=1
matin="oui"
apresmidi="oui"
soiree="oui"
nuit="oui"
nbJour=1
interval=30
notifi="oui"
externe=None
Id="sans"
demon="non"
fullnotify="non"
MAJP="oui"
lune="oui"

for a in argv:
    if search("adressWeb=", a) is not None:
        adressWeb=compile("adressWeb=(.*)").search(a).group(1)
    if search("repsauv=", a) is not None:
        repsauv=compile("repsauv=(.*)").search(a).group(1)
    if search("huitHeures=", a) is not None:
        huitHeures=compile("huitHeures=(.*)").search(a).group(1)
    if search("nbJour=", a) is not None:
        nbJour=compile("nbJour=(.*)").search(a).group(1)
    if search("interval=", a) is not None:
        interval=compile("interval=(.*)").search(a).group(1)
    if search("notify=", a) is not None:
        notifi=compile("notify=(.*)").search(a).group(1)
    if search("notifyPartielle=", a) is not None:
        fullnotify=compile("notifyPartielle=(.*)").search(a).group(1)
    if search("matin=", a) is not None:
        matin=compile("matin=(.*)").search(a).group(1)
    if search("apresmidi=", a) is not None:
        apresmidi=compile("apresmidi=(.*)").search(a).group(1)
    if search("soiree=", a) is not None:
        soiree=compile("soiree=(.*)").search(a).group(1)
    if search("nuit=", a) is not None:
        nuit=compile("nuit=(.*)").search(a).group(1)
    if search("externe=", a) is not None:
        externe=compile("externe=(.*)").search(a).group(1)
    if search("nbFoisHuit=", a) is not None:
        nbFoisHuit=compile("nbFoisHuit=(.*)").search(a).group(1)
    if search("id=", a) is not None:
        Id=compile("id=(.*)").search(a).group(1)
    if search("demon=", a) is not None:
        demon=compile("demon=(.*)").search(a).group(1)
    if search("MAJP=", a) is not None:
        MAJP=compile("MAJP=(.*)").search(a).group(1)

nbJour=int(nbJour)
interval=int(interval)
repsauv=repsauv.replace("~", homedir)
notifi=str.lower(notifi)
fullnotify==str.lower(fullnotify)
huitHeures=str.lower(huitHeures)
nbFoisHuit=int(nbFoisHuit)
MAJP=str(MAJP)

#### fin initialisation des variables

#### Fonction de traitement des fichiers
def traitement(adress, fichier, repsauv):
    current_balise=None
    x=1
    user_agent='Mozilla/5.0 (X11; Linux x86_64)'
    headers={ 'User-Agent' : user_agent }
    while current_balise is None:
        response=None
        while response is None:
            try:
                html_page=urlopen(adress, timeout=10)
            except (URLError) as error:
                print("[\033[31mFAIL\033[0m] HTML ", error)
            except timeout:
                print("[\033[31mFAIL\033[0m] erreur timeout acces HTML")
            else:
                try:
                    currentCond=html_page.read()
                except (URLError) as error:
                    print("[\033[31mFAIL\033[0m] Lecture page ", error)
                except timeout:
                    print("[\033[31mFAIL\033[0m] erreur timeout lecture page")
                else:
#                    print("[\033[32m OK \033[0m] "+adress)
                    response="ok"
            if response is None:
                sleep(10)
        current_balise=1
    soup=BeautifulSoup(currentCond, "lxml")
    resultat='\n'
    inter=[]
#  Huit Heures -----------------------------------------------------
    if 'hourly-weather-forecast' in adress :
        page=soup.select("[class~=overview-hourly]")[0].find_all('td')+soup.select("[class~=precip-hourly]")[0].find_all('td')+soup.select("[class~=sky-hourly]")[0].find_all('td')
        info=BeautifulSoup(str(page), "lxml").find_all('div')+BeautifulSoup(str(page), "lxml").find_all('span')
        suppr='<div class='
        detail=['Heure','','','Temp°','RealFeel®','Vent (km/h)','Pluie','Neige','Verglas','Indice UV','Couverture nuageuse','Humidité','Point de rosée','Icone']
        for i in info :
            if suppr in str(i) :
                result=str(i).replace(str(i),'')
            else :
                result=str(i).replace('</span>','').replace('<span>','').replace('</div>','').replace('<div>','')
                inter.append(result)
        ico=BeautifulSoup(str(page), "lxml").select("[class~=icon]")
        x=1
        for i in ico:
            icone=str(i).replace('<div class="icon-weather icon i-','').replace('"></div>','')
            x=x+1
            inter.append(icone)
        y=0
        for i in detail:
            x=1
            while x<9 :
                if i == '' :
                    x=x+1
                    y=y+1
                else :
                    resultat=resultat+str(i)+str(x)+': '+inter[y]+'\n'
                    y=y+1
                    x=x+1
# Jour ---------------------------------------------------------
    if 'daily-weather-forecast' in adress :
        page=soup.select("[class~=detail-tab-panel]")[0]
        page=str(page).replace('<span class="setting">Mx</span>','').replace('<span class="setting">Mi</span>','')
        info=BeautifulSoup(str(page), "lxml").find_all('strong')
        inter0=[]
        for i in info:
            soup1=BeautifulSoup(str(i), "lxml")
            comment=soup1.strong.string
            inter0.append(comment)
        inter.append('VentD jour: '+inter0[0].split(' ')[0].replace('W','O'))
        inter.append('VentF jour: '+inter0[0].split(' ')[1]+'km/h')
        inter.append('VentD nuit: '+inter0[10].split(' ')[0])
        inter.append('VentF nuit: '+inter0[10].split(' ')[1]+'km/h')
        inter.append('Rafale jour:'+inter0[1])
        inter.append('Rafale nuit:'+inter0[11])
        inter.append('UV jour: '+inter0[2])
        inter.append('UV nuit: '+inter0[12])
        inter.append('Prob orage jour: '+inter0[3])
        inter.append('Prob orage nuit: '+inter0[13])
        inter.append('Précipitations jour: '+inter0[4])
        inter.append('Précipitations nuit: '+inter0[14])
        inter.append('Pluie jour: '+inter0[5])
        inter.append('Pluie nuit: '+inter0[15])
        inter.append('Neige jour: '+inter0[6])
        inter.append('Neige nuit: '+inter0[16])
        inter.append('Verglas jour: '+inter0[7])
        inter.append('Verglas nuit: '+inter0[17])
        inter.append('Heures de précipitations jour: '+inter0[8])
        inter.append('Heures de précipitations nuit: '+inter0[18])
        inter.append('Heures de pluie jour: '+inter0[9])
        inter.append('Heures de pluie nuit: '+inter0[19])
        info=BeautifulSoup(str(page), "lxml").find_all('span')
        inter0=[]
        for i in info:
            soup1=BeautifulSoup(str(i), "lxml")
            comment=soup1.span.string
            inter0.append(comment)
        inter.append('Temp jour: '+inter0[0])
        inter.append('Temp nuit: '+inter0[3])
        inter.append('Temp ress jour:'+inter0[1].replace('RealFeel®',''))
        inter.append('Temp ress nuit:'+inter0[4].replace('RealFeel®',''))
        inter.append('Prob précipitations jour:'+inter0[2].replace('Précipitations',''))
        inter.append('Prob précipitations nuit:'+inter0[5].replace('Précipitations',''))
        con=BeautifulSoup(str(page), "lxml").select("[class~=cond]")
        inter0=[]
        for i in con:
            cond=str(i).replace('<div class="cond">','').replace('</div>','').replace('  ','').replace('\n','').replace('\r','')
            inter0.append(cond)
        inter.append('Cond_jour: '+inter0[0])
        inter.append('Cond_nuit: '+inter0[1])
        ico=BeautifulSoup(str(page), "lxml").select("[class~=icon]")
        inter0=[]
        for i in ico:
            icone=str(i).replace('<div class="icon i-','').replace('"></div>','')
            inter0.append(icone)
        inter.append('Icone jour: '+inter0[0])
        inter.append('Icone nuit: '+inter0[1])
        page=soup.select("[id~=feature-history]")[0]
        info=BeautifulSoup(str(page), "lxml").find_all('td')
        inter0=[]
        for i in info:
            soup1=BeautifulSoup(str(i), "lxml")
            comment=soup1.td.string
            inter0.append(comment)
        inter.append('Maxjour: '+inter0[0])
        inter.append('Maxnormal: '+inter0[1])
        inter.append('Maxrecord: '+inter0[2])
        inter.append('Max1ans: '+inter0[3])
        inter.append('Minjour: '+inter0[4])
        inter.append('Minnormal: '+inter0[5])
        inter.append('Minrecord: '+inter0[6])
        inter.append('Min1ans: '+inter0[7])
        page=soup.select("[class~=time-period]")
        info=BeautifulSoup(str(page), "lxml").find_all('li')
        inter0=[]
        for i in info:
            soup1=BeautifulSoup(str(i).replace('<span>','').replace('</span>',''), "lxml")
            comment=soup1.li.string
            inter0.append(comment)
        inter.append(inter0[0])
        inter.append(inter0[1])
        inter.append('Duree soleil'+inter0[2].replace('Durée',''))
        inter.append(inter0[3])
        inter.append(inter0[4])
        inter.append('Duree lune'+inter0[5].replace('Durée',''))
        histo=soup.find(id="feature-history")
        date=histo.find_all('th')
        jour=compile("(.*)/(.*)/(.*)").search(date[4].get_text())
        inter.append("jour: "+jour.group(1))
        inter.append("mois: "+jour.group(2))
        inter.append("année: "+str(int(jour.group(3))+1))
        for i in inter:
            resultat=resultat+i+'\n'

# quart --------------------------------------------------------
    if 'morning-weather-forecast' in adress or 'afternoon-weather-forecast' in adress or 'evening-weather-forecast' in adress or 'overnight-weather-forecast' in adress :
        page=soup.select("[class~=detail-tab-panel]")[0]
        con=BeautifulSoup(str(page), "lxml").select("[class~=cond]")
        for i in con:
            cond=str(i).replace('<span class="cond">','').replace('</span>','').replace('  ','').replace('\n','').replace('\r','')
        ico=BeautifulSoup(str(page), "lxml").select("[class~=icon]")
        for i in ico:
            icone=str(i).replace('<div class="icon i-','').replace('"></div>','')
        tem=str(BeautifulSoup(str(page), "lxml").select("[class~=large-temp]")[0].select("[class~=small-temp]")[0])
        temmax=str(BeautifulSoup(str(page), "lxml").select("[class~=large-temp]")[0]).replace(str(tem),'').split('>')[1].split('<')[0]
        temmin=tem.split('/')[1].split('<')[0]
        realfeet=str(BeautifulSoup(str(page), "lxml").select("[class~=small-temp]")[1]).replace('<span class="small-temp"><em>RealFeel®</em>','').replace('</span>','').split('/')
        realfeetmin=realfeet[1]
        realfeetmax=realfeet[0]
        ventd=str(BeautifulSoup(str(page), "lxml").select("[class~=wind-point]")[0]).replace('<div class="wind-point ','').replace('"></div>','')
        stat=BeautifulSoup(str(page), "lxml").select("[class~=stats]")
        ventf=str(BeautifulSoup(str(stat), "lxml").select("[class~=wind]")[0]).replace('<li class="wind">','').replace('</li>','')
        inter.append('Cond: '+cond)
        inter.append('Icone: '+icone)
        inter.append('TempMin: '+temmin)
        inter.append('TempMax: '+temmax)
        inter.append('RealFeelMin: '+realfeetmin)
        inter.append('RealFeelMax:'+realfeetmax)
        inter.append('VentD: '+ventd)
        inter.append('VentF: '+ventf)
        stat=BeautifulSoup(str(page), "lxml").find_all('strong')
        detail=['Précipitations: ','Pluie: ','Neige: ','Humidité: ','Couverture nuageuse: ','Point de rosée: ','Visibilité: ']
        x=0
        for i in stat:
            soup1=BeautifulSoup(str(i), "lxml")
            comment=soup1.strong.string
            inter.append(detail[x]+str(comment))
            x=x+1
        for i in inter:
            resultat=resultat+i+'\n'

# CC -----------------------------------------------------------
    if 'current-weather' in adress :
        page=soup.find_all('script')
        soup1=BeautifulSoup(str(page), "lxml")
        ville=compile(" city: '(.*)',").search(str(soup1)).group(1)
        longi=compile("lon: '(.*)',").search(str(soup1)).group(1)
        lat=compile("lat: '(.*)',").search(str(soup1)).group(1)
        inter.append("Ville: "+ville)
        inter.append("Lat: "+lat)
        inter.append("Long: "+longi)
        page=soup.select("[class~=detail-tab-panel]")[0]
        cond=str(BeautifulSoup(str(page), "lxml").select("[class~=cond]")[0]).split('>')[1].split('<')[0]
        icone=str(BeautifulSoup(str(page), "lxml").select("[class~=icon]")[0]).replace('<div class="icon i-','').replace('"></div>','')
        temp=str(BeautifulSoup(str(page), "lxml").select("[class~=large-temp]")[0]).split('>')[1].split('<')[0]
        realfeel=str(BeautifulSoup(str(page), "lxml").select("[class~=small-temp]")[0]).split('>')[3].split('<')[0]
        ventd=str(BeautifulSoup(str(page), "lxml").select("[class~=wind-point]")[0]).replace('<div class="wind-point ','').replace('"></div>','')
        inter.append('Cond: '+cond)
        inter.append('Icone: '+icone)
        inter.append('Temp: '+temp)
        inter.append('RealFeel:'+realfeel)
        inter.append('VentD: '+ventd)
        stat=BeautifulSoup(str(page), "lxml").find_all('strong')
        detail=['VentF: ','Humidité: ','Pression: ','Indice UV: ','Couverture nuageuse: ','Plafond: ','Point de rosée: ','Visibilité: ']
        x=0
        for i in stat:
            soup1=BeautifulSoup(str(i), "lxml")
            comment=soup1.strong.string
            inter.append(detail[x]+str(comment))
            x=x+1
        inter.append("Alerte: RAS")
        page=soup.select("[id~=feature-history]")[0]
        info=BeautifulSoup(str(page), "lxml").find_all('td')
        inter0=[]
        for i in info:
            soup1=BeautifulSoup(str(i), "lxml")
            comment=soup1.td.string
            inter0.append(comment)
        inter.append('Maxjour: '+inter0[0])
        inter.append('Maxnormal: '+inter0[1])
        inter.append('Maxrecord: '+inter0[2])
        inter.append('Max1ans: '+inter0[3])
        inter.append('Minjour: '+inter0[4])
        inter.append('Minnormal: '+inter0[5])
        inter.append('Minrecord: '+inter0[6])
        inter.append('Min1ans: '+inter0[7])
        histo=soup.find(id="feature-history")
        date=histo.find_all('th')
        jour=compile("(.*)/(.*)/(.*)").search(date[4].get_text())
        inter.append("jour: "+jour.group(1))
        inter.append("mois: "+jour.group(2))
        inter.append("année: "+str(int(jour.group(3))+1))
        date=str(datetime.now()).split(' ')[1].split(':')
        inter.append("heure: "+date[0])
        inter.append("minute: "+date[1])
        inter.append("seconde: "+date[2].split('.')[0])
        inter.append(str(int(time())))
        for i in inter:
            resultat=resultat+i+'\n'
# Lunaison -----------------------------------------------------
    if 'http://www.calendrier-lunaire.net/' in adress :
        page=soup.select("[class~=TBdoubleColTD8]")[0]
        soup1=BeautifulSoup(str(page), 'lxml')
        resultat=str(soup1.ul['content']).replace('\t','')

# --------------------------------------------------------------
    fiche=open(fichier, "w")
    fiche.write(resultat)
    fiche.close()
    collect()
#### fin Fonction de traitement des fichiers

#### Mise en tache de fond
def demonise(ent, id1, id2, huitHeures, nbJour, interval, nbFoisHuit, Id, demon):
    dem=time()-(60*60)
    misajour=1
    while 1 :
        date=str(datetime.now()).split(' ')[1].split(':')
        heure=time()
        if heure-dem >= 60*60 and MAJP=="oui":
            x=0
            while x<nbJour:
                x=x+1
                traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
                print("[\033[32m OK \033[0m] Jour "+str(x))
                if matin=="oui":
                    traitement(ent+nb1+'/morning-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Matin"+str(x), repsauv)
                    print("[\033[32m OK \033[0m] Matin "+str(x))
                if apresmidi=="oui":
                    traitement(ent+nb1+'/afternoon-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/AM"+str(x), repsauv)
                    print("[\033[32m OK \033[0m] AM "+str(x))
                if soiree=="oui":
                    traitement(ent+nb1+'/evening-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Soiree"+str(x), repsauv)
                    print("[\033[32m OK \033[0m] Soiree "+str(x))
                if nuit=="oui":
                    traitement(ent+nb1+'/overnight-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Nuit"+str(x), repsauv)
                    print("[\033[32m OK \033[0m] Nuit "+str(x))
            if lune == "oui":
                traitement('http://www.calendrier-lunaire.net/', repsauv+"/lunaison", repsauv)
                print("[\033[32m OK \033[0m] Lunaison")
            dem=heure
        if huitHeures=="oui":
            x=0
            while x<nbFoisHuit:
                h=(x*8)+int(strftime('%H', localtime()))
                x=x+1
                traitement(ent+nb1+'/hourly-weather-forecast/'+nb2+'?hour='+str(h), repsauv+"/huitHeures"+str(x), repsauv)
                print("[\033[32m OK \033[0m] huitHeures "+str(x))
        traitement(ent+nb1+'/current-weather/'+nb2, repsauv+"/CC", repsauv)
        print("[\033[32m OK \033[0m] CC")
        if externe is not None:
                 system(externe)
        fin=time()
        duree=fin-heure
        if notifi == "oui":
            notify2.init('Recmeteo.py')
            if heure-dem == 0:
                mess=notify2.Notification('Accuweather', "Mise a jour complete à "+str(date[0])+":"+str(date[1])+":"+str(date[2]).split('.')[0]+" en "+str(round(duree,2)).replace('.','s')+" sec", '/opt/Accuweather/icones/accuweather-logo1.png')
                mess.show()
                print("[\033[32m OK \033[0m] Mise a jour complete à "+str(date[0])+":"+str(date[1])+":"+str(date[2]).split('.')[0]+" en "+str(round(duree,2)).replace('.','s'))
            else:
                if fullnotify == "oui" :
                    mess=notify2.Notification('Accuweather', "Mise a jour partiel à "+str(date[0])+":"+str(date[1])+":"+str(date[2]).split('.')[0]+" en "+str(round(duree,2)).replace('.','s'), '/opt/Accuweather/icones/accuweather-logo1.png')
                    mess.show()
                print("[\033[32m OK \033[0m] Mise a jour partiel à "+str(date[0])+":"+str(date[1])+":"+str(date[2]).split('.')[0]+" en "+str(round(duree,2)).replace('.','s'))
        start=heure
        pause=60*interval-int(duree)
        if pause < 0:
            pause=interval
        if demon == "non":
            print("[\033[33mINFO\033[0m] Mode démon non utilisé fin de recmeteo.py")
            exit()
        collect()
        sleep(pause)
        if Id != "sans":
            if not path.exists("/proc/"+Id):
                exit()


### Initialiation de DBus pour les notifications
if notifi == "oui":
    import notify2
### Vérification répertoire
if not path.exists(repsauv):
    makedirs(repsauv)
#### Lancement du script et initialisation de la tache de fond
nb1=findall('\d+', adressWeb)[0]
nb2=findall('\d+', adressWeb)[1]
ent=adressWeb[:adressWeb.find(nb1)]
fin=adressWeb.replace(ent+nb1, "")
fin=fin.replace(fin[:fin.find(nb2)]+nb2, "")
nb2=nb2+fin
#print("[\033[33mINFO\033[0m] Recmeteo Version =", Version)
demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id, demon)

1485004993.png

avec le météo fond d'écran accuweather-3.deb v3.10 MAJ:18/01/2017

Dernière modification par daniel38100 (Le 21/01/2017, à 20:47)

Hors ligne

#1562 Le 21/01/2017, à 18:33

chepioq

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Ton premier lien renvoie une erreur 404 (not found)


Tout est dans tout et réciproquement....

Hors ligne

#1563 Le 21/01/2017, à 20:51

daniel38100

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

chepioq a écrit :

Ton premier lien renvoie une erreur 404 (not found)

     Erreur de lien corrigé

Merci

Hors ligne

#1564 Le 22/01/2017, à 00:02

daniel38100

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

A tous

Correction lunaison MAJ v1.21météo.lua meteo-lua-2.deb v1.21 MAJ:21/01/17

1485039564.png

Hors ligne

#1565 Le 22/01/2017, à 17:19

grain de sable

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

Salut à tous,
après maintes péripéties avec le fameux conky lua, moi aussi, après le passage en 16.04, j'ai découvert que sur trois PC l'un avait besoin d'une commande supplémentaire dans le conkyrc pour pouvoir afficher les cercles de clock_rings.lua ?! Bizarre, mais si je l'enlève, plus de cercle…
il s'agit de la commande:
"Load:{loadavg}".
Je peux la mettre n'importe-où après la zone TEXT, mais il la faut, sinon, pas de cercle!
Donc, si vous aussi vous n'avez plus de cercles, un petit:

${goto 120}${voffset 0}${font caviar dreams:size=7}Load:$color ${loadavg}${font}	

dans le conkyrc après "${cpu cpu}%" (par exemple, en insérant une ligne) est sans danger; mais peut décoincer votre conky!

Dernière modification par grain de sable (Le 23/01/2017, à 21:21)

Hors ligne

#1566 Hier à 15:23

grain de sable

Re : [5] Conky : Postez vos conkyrc ou certaines parties intéressantes

mini_494223conkybleu.jpg

Modération : merci d'utiliser des images de petite taille (300x300) ou des miniatures pointant sur ces images (Des hébergeurs comme Toile Libre ou TDCT'Pix le permettent).
Rectifié.
Le conkyrc

# Conky settings #
background no
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
#imlib_cache_size 0

temperature_unit fahrenheit

# paramètres des fenêtres #
own_window yes
own_window_type dock
own_window_transparent yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 5

minimum_size 250 300
maximum_width 350

alignment top_right
gap_x 110
gap_y 60

# réglages graphiques #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

# Réglages textes #
use_xft yes
xftfont caviar dreams:size=9
xftalpha 0.5

uppercase no

temperature_unit celsius

default_color FFFFFF  # Blanc #
color1 FFFFFF         # Blanc #
color2 FFD800         # Jaune #
color3 020EF1         # Bleu roi #
color4 00FFFF         # Bleu ciel#
color5 FF2300         # Rouge #
color6 5BEF12         # Vert clair #

# Lua Load  #
lua_load ./clock01_rings.lua
lua_draw_hook_pre clock_rings

own_window_argb_value 0
own_window_argb_visual yes
own_window_colour 000000


TEXT
#----------------------------------------------------------------------------------------------------------------------------------------
#
#					         Heure et date 
#----------------------------------------------------------------------------------------------------------------------------------------
${voffset 7}${font Radio Space:size=16}${color3}${time %A}${font}$color${font Radio Space:size=38}${goto 167}${voffset -8} ${time %e}${font}
${font Radio Space:size=18}${voffset -30}${time %b}${font}${voffset -3} ${font Radio Space:size=20}${time %Y}${font}${color3} ${hr 1}
#----------------------------------------------------------------------------------------------------------------------------------------
#				Capacité restante de la batterie en %
#----------------------------------------------------------------------------------------------------------------------------------------
${color1}${goto 209}${voffset 34}${battery_percent BAT1}%
${color5}${goto 202}${voffset 5}Batterie


#----------------------------------------------------------------------------------------------------------------------------------------
#			           Météo…  
#----------------------------------------------------------------------------------------------------------------------------------------
#${font conkyweather:size=35}${color FFFFFF}${goto 200}${voffset 20}${execpi 6000  sed -n '2p' ~/.conky/accu_weather/rss/weather}$color${font}${font Radio Space:size=11}${color 0ABFFF}${goto 202}${voffset 12}HOME
#${execi 600 bash ~/.conky/accu_weather/rss/acc_rss}${font Radio Space:size=15}${goto 201}${voffset -4}${execpi 600 sed -n '1p' ~/.conky/accu_weather/rss/weather|awk '{print $NF}'}${font}$color
#${font caviar dreams:size=8}${goto 47}${voffset 5}Uptime: ${uptime_short}
#----------------------------------------------------------------------------------------------------------------------------------------
#       Processeur (la troisième ligne est indispensable pour avoir les cercles sur certains PC)
#----------------------------------------------------------------------------------------------------------------------------------------
${color4}${goto 140}${voffset 32}Temp°cpu $color ${acpitemp}°C
${color4}${goto 146}${voffset 6}Processus:$color $processes
${color4}${goto 120}${voffset 0}${font caviar dreams:size=7}Load:$color ${loadavg}${font}	
${color}${goto 0}${voffset -14}${cpu cpu}% ${color4}${goto 0}${voffset 22}CPUs$color

#----------------------------------------------------------------------------------------------------------------------------------------
#		Occupation de la mémoire  RAM/SWAP/Système de fichiers/Home/ en %
#----------------------------------------------------------------------------------------------------------------------------------------
${color4}${goto 0}${voffset 10}RAM ${color}${memperc}%
${color4}${goto 22}${voffset 0}${font caviar dreams:size=8}Swap${font}${color}${swapperc}%
${color4}${goto 8}${voffset 50}${font caviar dreams:size=9}Système${color}${fs_used_perc /}%
${color4}${goto 27}${voffset 0} Home  ${color}${fs_used_perc /home}%
#----------------------------------------------------------------------------------------------------------------------------------------
${color1}${goto 206}${voffset 25}Net
#----------------------------------------------------------------------------------------------------------------------------------------
${color4}${goto 42}${voffset -15}Down: $color${font caviar dreams:size=8}${downspeed wlan0} k/s
${color4}${goto 47}${voffset 0}Up:$color ${upspeed wlan0} k/s${font}
#----------------------------------------------------------------------------------------------------------------------------------------
#     Mettez le texte que vous voulez entre les guillemets et la référence du texte, s'il y a lieu, à la place de "proverbe africain"
#----------------------------------------------------------------------------------------------------------------------------------------
${goto 2}${voffset 10}${font caviar dreams:size=11} "L'homme blanc a une montre ; 
${goto 2}${voffset 0}    mais il n'a pas le temps"
${color2}${goto 122}${voffset 0}${font caviar dreams:size=8}Proverbe africain

et le # clock01_rings.lua#

--[[
# Clock Rings by Linux Mint (2012) reEdited by Altin.
# 
# This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. 
# This script is based off a combination of my clock.lua script and my rings.lua script.
#
# IMPORTANT: If you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. 
#                     The if statement on line 324 uses a delay to make sure that this doesn't happen. 
#                     It calculates the length of the delay by the number of updates since Conky started. 
#                     Generally, a value of 5s is long enough, so if you update Conky every 1s, 
#                     use update_num>5 in that if statement (the default). 
#                     If you only update Conky every 2s, you should change it to update_num>3; 
#                     conversely if you update Conky every 0.5s, you should use update_num>10. 
#                     ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, 
#                     otherwise the update_num will not be reset and you will get an error.
#
# To call this script in Conky, use the following in your conkyrc:
#
#	lua_load ~/.conky/clock01_rings.lua
#	lua_draw_hook_pre clock_rings
#
# Changelog:
#   * v1.0 -->  Original release (30.09.2009)
#   * v1.1p -->   Jpope edit londonali1010 (05.10.2009)
#   * vX 2011mint --> reEdit despot77 (18.02.2011)
#   * vX 2012 --> Altin reEdit (22.07.2012)
# 	* Added weather function (Accu Weather)
# 	* Added battery monitoring
# 	* Syslog monitoring
# 	* Running processes monitoring
# 	* Rearanged rings
# 	* Exctra network functions/monitoring
# 	* Changed Fonts
]]
settings_table = {
    {
        -- Edit this table to customise your rings.
        -- You can create more rings simply by adding more elements to settings_table.        
        -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
        name='time',
        -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
        arg='%I.%M',
        -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
        max=12,
        -- "bg_colour" is the colour of the base ring.
        bg_colour=0xffffff, --blanc
        -- "bg_alpha" is the alpha value of the base ring.
        bg_alpha=0.15,
        -- "fg_colour" is the colour of the indicator part of the ring.
        fg_colour=0x020EF1,  --bleu roi
        -- "fg_alpha" is the alpha value of the indicator part of the ring.
        fg_alpha=0.3,
        -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
        x=100, y=175,
        -- "radius" is the radius of the ring.
        radius=50,
        -- "thickness" is the thickness of the ring, centred around the radius.
        thickness=5,
        -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
        start_angle=0,
        -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
        end_angle=360
    },

    {
        name='time',
        arg='%M.%S',
        max=60,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.1,
        fg_colour=0x00FFFF, --bleu ciel
        fg_alpha=0.4,
        x=100, y=175,
        radius=56,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.1,
        fg_colour=0x020EF1, --bleu roi
        fg_alpha=0.6,
        x=100, y=175,
        radius=62,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='time',
        arg='%d',
        max=31,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.1,
        fg_colour=0x00FFFF, --bleu ciel
        fg_alpha=0.8,
        x=100, y=175,
        radius=70,
        thickness=5,
        start_angle=-90,
        end_angle=90
    },
    {
        name='time',
        arg='%m',
        max=12,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.1,
        fg_colour=0x020EF1, --bleu roi
        fg_alpha=1,
        x=100, y=175,
        radius=76,
        thickness=5,
        start_angle=-90,
        end_angle=90
    },
    {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.2,
        fg_colour=0x020EF1, --bleu roi
        fg_alpha=0.8,
        x=40, y=280,
        radius=35,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
       {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.2,
        fg_colour=0x0072A9, --bleu moyen
        fg_alpha=0.8,
        x=40, y=280,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.2,
        fg_colour=0x020EF1, --bleu roi
        fg_alpha=0.8,
        x=85, y=360,
        radius=35,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='swapperc',
        arg='',
        max=100,
        bg_colour=0xffffff, --blanc
        bg_alpha=0.2,
        fg_colour=0xFF6600, --orange
        fg_alpha=0.8,
        x=85, y=360,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x020EF1, --bleu roi
        fg_alpha=0.8,
        x=125, y=450,
        radius=35,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
        {
        name='fs_used_perc',
        arg='/home',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0072A9, --bleu moyen
        fg_alpha=0.8,
        x=125, y=450,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
        {
        name='downspeedf',
        arg='wlan0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x5BEF12, --vert clair
        fg_alpha=0.8,
        x=170, y=520,
        radius=25,
        thickness=4,
        start_angle=-90,
        end_angle=180
    },
        {
        name='upspeedf',
        arg='wlan0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0xff6600, --orange
        fg_alpha=0.8,
        x=170, y=520,
        radius=20,
        thickness=4,
        start_angle=-90,
        end_angle=180
    },
    }

-- Use these settings to define the origin and extent of your clock.

clock_r=65

-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=100
clock_y=175

show_seconds=true -- Change to true if you want the seconds hand

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function window_background(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
    
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
    
    -- Draw indicator ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)        
end

function draw_clock_hands(cr,xc,yc)
    local secs,mins,hours,secs_arc,mins_arc,hours_arc
    local xh,yh,xm,ym,xs,ys
    
    secs=os.date("%S")    
    mins=os.date("%M")
    hours=os.date("%I")
        
    secs_arc=(2*math.pi/60)*secs
    mins_arc=(2*math.pi/60)*mins+secs_arc/60
    hours_arc=(2*math.pi/12)*hours+mins_arc/12
        
    -- Draw hour hand
    
    xh=xc+0.76*clock_r*math.sin(hours_arc)
    yh=yc-0.72*clock_r*math.cos(hours_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xh,yh)
    
    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_width(cr,5)
    cairo_set_source_rgba(cr,1.0,1.0,1.0,1.0)
    cairo_stroke(cr)
    
    -- Draw minute hand
    
    xm=xc+0.98*clock_r*math.sin(mins_arc)
    ym=yc-1.02*clock_r*math.cos(mins_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xm,ym)
    
    cairo_set_line_width(cr,3)
    cairo_stroke(cr)
    
    -- Draw seconds hand
    
    if show_seconds then
        xs=xc+1.1*clock_r*math.sin(secs_arc)
        ys=yc-clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
    
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
    end
end

function conky_clock_rings()
    local function setup_rings(cr,pt)
        local str=''
        local value=0
        
        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
        
        value=tonumber(str)
        pct=value/pt['max']
        
        draw_ring(cr,pct,pt)
    end
    
    -- Check that Conky has been running for at least 5s

    if conky_window==nil then return end
    local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
    
    local cr=cairo_create(cs)    
    
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
    
    if update_num>5 then
        for i in pairs(settings_table) do
            setup_rings(cr,settings_table[i])
        end
    end
    
    draw_clock_hands(cr,clock_x,clock_y)
end

J'ai bidouillé les mêmes en orange et en vert également…

Dernière modification par grain de sable (Hier à 21:34)

Hors ligne