Contenu | Rechercher | Menus

Annonce

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.

À propos de l'équipe du forum.

#1226 Le 09/05/2016, à 06:29

chepioq

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

C'est possible avec la commande sensors, qui est fourni par le paquet lm_sensors (sur fedora le paquet s'appelle comme ça, sur ubuntu je pense que c'est pareil).

Une fois installé ce paquet, tu lances en root la commande sensors-detect, tu réponds YES à toutes le questions.
Ensuite tu lance en tant qu'utilisateur la commande sensors.
Chez moi cela donne ça :

[dominique@host-192-168-1-2 ~]$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +57.0°C  (crit = +84.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +60.0°C  (high = +80.0°C, crit = +85.0°C)
Core 0:         +60.0°C  (high = +80.0°C, crit = +85.0°C)
Core 1:         +57.0°C  (high = +80.0°C, crit = +85.0°C)

[dominique@host-192-168-1-2 ~]$ 

Dans cet exemple la température de ma carte nvidia est la ligne:

Adapter: Virtual device
temp1:        +57.0°C  (crit = +84.0°C)

Je l'ai intégré à mon conky ainsi :

${execpi 6 sensors | sed -n '3p' | awk '{print $2}' | cut -c2-3}°C

Dernière modification par chepioq (Le 09/05/2016, à 06:31)


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

Hors ligne

#1227 Le 09/05/2016, à 20:58

ricorde

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

Ok merci je vais essayer ça


Processeur : Intel Core i7-3930K 3200.0 MHz Socket R (LGA2011-0)    Carte graphique : GIGABYTE GeForce GTX 680    Carte mére : ASUS SABERTOOTH X79   Memory : Kingston DDR3 SDRAM 666.7 MHz 2 fois 8 Go

Hors ligne

#1228 Le 11/05/2016, à 11:04

chepioq

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

1462957079.jpg
Petite variation de mon conky météo, qui affiche aussi les prévisions en lettres.
Il n'est pas encore complet, il me manque la totalité des descriptions en anglais pour pouvoir faire la traduction.

J'ai juste modifié le conkyrc et le weather.sh

conkyrc

# Conky settings #
background no
update_interval 1800
double_buffer yes
no_buffers yes
imlib_cache_size 10

# Window specifications #
alignment top_left
gap_x 130
gap_y 50
minimum_size 115
maximum_width 283
own_window yes
own_window_type dock
own_window_transparent yes
own_window_argb_visual yes
own_window_hints undecorate,skip_taskbar,skip_pager,below
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
default_outline_color 000000
draw_graph_borders no

# Text settings #
use_xft yes
xftalpha 0.8
xftfont DejaVuSansMono:size=7
text_buffer_size 256
override_utf8_locale yes
imlib_cache_size 0

# Color scheme
default_color F2F2F2
color1 FFFFFF
color2 F5B800
color3 BFBFBF

lua_load ~/conky-meteo/weather.lua
lua_draw_hook_pre main

TEXT



${goto 50}${font DejaVuSansMono:bold:size=8}${voffset -18}${color1}Actuel${color2}${font} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'} ${font DejaVuSansMono:bold:size=8}${alignr}${color2}${exec grep "yweather:condition" ~/conky-meteo/meteo.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font}${color}
${image ~/conky-meteo/weather.png -p -1,1 -s 32x32}

${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}Aujourd'hui${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}${color}${alignr}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${color}
${image ~/conky-meteo/weather-1.png -p -1,35 -s 32x32}

${voffset 4}${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +1days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'} ${color}${alignr}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${color}
${image ~/conky-meteo/weather-2.png -p -1,71 -s 32x32}

${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +2days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${color}
${image ~/conky-meteo/weather-3.png -p -1,107 -s 32x32}

${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +3days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°${color}
${image ~/conky-meteo/weather-4.png -p -1,143 -s 32x32}

${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +4days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6'}${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°${color}
${image ~/conky-meteo/weather-5.png -p -1,179 -s 32x32}

${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +5days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7'}${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6'}°${color}
${image ~/conky-meteo/weather-6.png -p -1,215 -s 32x32}

${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +6days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8'}${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7'}°${color}
${image ~/conky-meteo/weather-7.png -p -1,251 -s 32x32}

${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${voffset 0}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +7days +%d}${font}${color2} ${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==9'}${color}${alignr}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8'}°${color}
${image ~/conky-meteo/weather-8.png -p -1,287 -s 32x32}

${alignc}${font DejaVuSansMono:bold:size=8}${exec cat ~/conky-meteo/meteo.xml | grep city | awk -F\- '{ print $8 }' | awk '{print $4}'}
Humidité${alignr}${color2}${exec grep "yweather:atmosphere" ~/conky-meteo/meteo.xml | grep -o "humidity=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}%${alignr}${color}
Vent${alignr}${color2}${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'} km/h${alignr}${color}
Direction${alignr}${color2}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=22.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >337.5} NORD $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} ==0} NORD $endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=67.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >22.5} N-E $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=112.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >67.5} EST $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=157.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >112.5} S-E $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=202.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >157.5} SUD $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=247.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >202.5} S-O $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=292.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >247.5} OUEST $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=337.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >292.5} N-O $endif$endif

le weather.sh

#!/bin/bash
curl -s "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22aubagne%2C%20fr%22)%20and%20u%3D%22c%22&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | sed 's/"Sun/"Dim/g;s/"Mon/"Lun/g;s/"Tue/"Mar/g;s/"Wed/"Mer/g;s/"Thu/"Jeu/g;s/"Fri/"Ven/g;s/"Sat/"Sam/g;s/Sunny/Ensoleillé/g;s/Cloudy/Nuageux/g;s/Mostly/Plutôt/g;s/Partly/Partiellement/g;s/Rain/Pluie/g;s/Breezy/Frais/g;s/Scattered Thunderstorms/Orages épars/g;s/Dimny/Ensoleillé/g' | sed -e '/speed/s/\.[0-9]*//g' > ~/conky-meteo/meteo.xml
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2').png ~/conky-meteo/weather-1.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3').png ~/conky-meteo/weather-2.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4').png ~/conky-meteo/weather-3.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5').png ~/conky-meteo/weather-4.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6').png ~/conky-meteo/weather-5.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7').png ~/conky-meteo/weather-6.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8').png ~/conky-meteo/weather-7.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==9').png ~/conky-meteo/weather-8.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:condition" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"| awk 'NR==1').png ~/conky-meteo/weather.png

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

Hors ligne

#1229 Le 11/05/2016, à 23:44

ricorde

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

Salut chepioq j'ai installer paquet sensor plus cette ligne dans mon conky ${execpi 6 sensors | sed -n '3p' | awk '{print $2}' | cut -c2-3}°C
mais la température qui apparaît  dans mon conky est 08°C ?

lyca@lyca:~$ sensors
nouveau-pci-0200
Adapter: PCI adapter
fan1:        1080 RPM
temp1:        +44.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

asus-isa-0000
Adapter: ISA adapter
cpu_fan:        0 RPM

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +40.0°C  (high = +81.0°C, crit = +91.0°C)
Core 0:         +36.0°C  (high = +81.0°C, crit = +91.0°C)
Core 1:         +39.0°C  (high = +81.0°C, crit = +91.0°C)
Core 2:         +36.0°C  (high = +81.0°C, crit = +91.0°C)
Core 3:         +34.0°C  (high = +81.0°C, crit = +91.0°C)
Core 4:         +37.0°C  (high = +81.0°C, crit = +91.0°C)
Core 5:         +39.0°C  (high = +81.0°C, crit = +91.0°C)

merci


Processeur : Intel Core i7-3930K 3200.0 MHz Socket R (LGA2011-0)    Carte graphique : GIGABYTE GeForce GTX 680    Carte mére : ASUS SABERTOOTH X79   Memory : Kingston DDR3 SDRAM 666.7 MHz 2 fois 8 Go

Hors ligne

#1230 Le 12/05/2016, à 06:32

chepioq

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

je m'excuse, je n'ai pas été assez précis dans mes propos.
La commande que je t'ai donné fonctionne pour ma sortie de sensors, il faut l'adapter à la tienne.
Ta commande affiche 08, ce qui est le milieu de ta ligne 3 : fan1:        1080 RPM
Dans la commande sed -n '3p' indique qu'il faut afficher la ligne 3, or chez toi c'est la ligne 4 qui doit être affiché.
Donc je mettrais ceci :

 ${execpi 6 sensors | sed -n '4p' | awk '{print $2}' | cut -c2-3}°C

la commande sed est une commande puissante, tu peux faire à peu près tout avec, regarde le man sed pour plus de renseignement.
Sinon il y a aussi ici : http://sed.sourceforge.net/sed1line_fr.html , un ensemble d'exemple dont je me sert assez souvent.

awk '{print $2}' indique qu'il faut afficher le champ 2 (+44.0°C) et cut -c2-3 sert à afficher les deuxième et troisième caractères de ce champ (44).

Dernière modification par chepioq (Le 12/05/2016, à 20:29)


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

Hors ligne

#1231 Le 12/05/2016, à 20:17

ricorde

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

Ok je vais essayer ça merci beaucoup chepioq


Processeur : Intel Core i7-3930K 3200.0 MHz Socket R (LGA2011-0)    Carte graphique : GIGABYTE GeForce GTX 680    Carte mére : ASUS SABERTOOTH X79   Memory : Kingston DDR3 SDRAM 666.7 MHz 2 fois 8 Go

Hors ligne

#1232 Le 13/05/2016, à 13:11

chepioq

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

1463206804.jpg

Dernière version de mon conky-météo. (je pense que je vais en rester là, il me plait bien celui-là)

Le conkyrc :

# Conky settings #
background no
update_interval 1800
double_buffer yes
no_buffers yes
imlib_cache_size 10

# Window specifications #
alignment top_left
gap_x 130
gap_y 50
minimum_size 115
maximum_width 283
own_window yes
own_window_type dock
own_window_transparent yes
own_window_argb_visual yes
own_window_hints undecorate,skip_taskbar,skip_pager,below
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
default_outline_color 000000
draw_graph_borders no

# Text settings #
use_xft yes
xftalpha 0.8
xftfont DejaVuSansMono:size=7
text_buffer_size 256
override_utf8_locale yes
imlib_cache_size 0

# Color scheme
default_color F2F2F2
color1 FFFFFF
color2 F5B800
color3 BFBFBF

lua_load ~/conky-meteo/weather.lua
lua_draw_hook_pre main

TEXT

${goto 50}${font DejaVuSansMono:bold:size=8}${color1}Actuel${color2}${font} ${font DejaVuSansMono:bold:size=8}${alignr}${color2}${exec grep "yweather:condition" ~/conky-meteo/meteo.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font}${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}
${image ~/conky-meteo/weather.png -p -1,1 -s 32x32}
${goto 50}${font DejaVuSansMono:bold:size=8}${color1}Aujourd'hui${font}${color2} ${color}${alignr}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}
${image ~/conky-meteo/weather-1.png -p -1,35 -s 32x32}
${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +1days +%d}${font}${color2}  ${color}${alignr}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}
${image ~/conky-meteo/weather-2.png -p -1,71 -s 32x32}
${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +2days +%d}${font}${color2} ${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}
${image ~/conky-meteo/weather-3.png -p -1,107 -s 32x32}
${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +3days +%d}${font}${color2} ${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}
${image ~/conky-meteo/weather-4.png -p -1,143 -s 32x32}
${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +4days +%d}${font}${color2} ${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6'}
${image ~/conky-meteo/weather-5.png -p -1,179 -s 32x32}
${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +5days +%d}${font}${color2} ${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7'}
${image ~/conky-meteo/weather-6.png -p -1,215 -s 32x32}
${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +6days +%d}${font}${color2} ${alignr}${color}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8'}
${image ~/conky-meteo/weather-7.png -p -1,251 -s 32x32}
${voffset 6}${goto 50}${font DejaVuSansMono:bold:size=8}${color1}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8' | tr '[a-z]' '[A-Z]'}, ${execi 3600 date -d +7days +%d}${font}${color2} ${color}${alignr}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8'}°/${color2}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8'}°${color}
${color2}${goto 50}${exec grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==9'}
${image ~/conky-meteo/weather-8.png -p -1,287 -s 32x32}
${alignc}${font DejaVuSansMono:bold:size=8}${exec cat ~/conky-meteo/meteo.xml | grep city | awk -F\- '{ print $8 }' | awk '{print $4}'}${color}
Humidité${alignr}${color2}${exec grep "yweather:atmosphere" ~/conky-meteo/meteo.xml | grep -o "humidity=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}%${alignr}${color}
Vent${alignr}${color2}${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'} km/h${alignr}${color}
Direction${alignr}${color2}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >337.5} NORD $endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=22.5} NORD $endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=67.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >22.5} N-E $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=112.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >67.5} EST $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=157.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >112.5} S-E $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=202.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >157.5} SUD $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=247.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >202.5} S-O $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=292.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >247.5} OUEST $endif$endif\
${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} <=337.5}${if_match ${exec grep "yweather:wind" ~/conky-meteo/meteo.xml | grep -o "direction=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} >292.5} N-O $endif$endif

Et le meteo.sh avec mes dernières traductions (il en manque encore, mais je complèterais au fur et à mesure)

#!/bin/bash
curl -s "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22aubagne%2C%20fr%22)%20and%20u%3D%22c%22&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | sed 's/"Sun/"Dim/g;s/"Mon/"Lun/g;s/"Tue/"Mar/g;s/"Wed/"Mer/g;s/"Thu/"Jeu/g;s/"Fri/"Ven/g;s/"Sat/"Sam/g;s/Sunny/Ensoleillé/g;s/Cloudy/Nuageux/g;s/Mostly/Plutôt/g;s/Partly/Partiellement/g;s/Rain/Pluie/g;s/Breezy/Venteux/g;s/Scattered Thunderstorms/Orages épars/g;s/Dimny/Ensoleillé/g;s/Scattered Showers/Averses éparses/g;s/Showers/Averses/g;s/Hail/Grêle/g;s/Haze/Brume/g;s/Windy/Vent Fort/g;s/Cold/Temps froid/g' | sed -e '/speed/s/\.[0-9]*//g' > ~/conky-meteo/meteo.xml
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2').png ~/conky-meteo/weather-1.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3').png ~/conky-meteo/weather-2.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4').png ~/conky-meteo/weather-3.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5').png ~/conky-meteo/weather-4.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6').png ~/conky-meteo/weather-5.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==7').png ~/conky-meteo/weather-6.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==8').png ~/conky-meteo/weather-7.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:forecast" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==9').png ~/conky-meteo/weather-8.png
ln -fs ~/conky-meteo/icons/$(grep "yweather:condition" ~/conky-meteo/meteo.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"| awk 'NR==1').png ~/conky-meteo/weather.png

EDIT du 14/05/2016 : nettoyage du code

Dernière modification par chepioq (Le 20/05/2016, à 06:26)


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

Hors ligne

#1233 Le 23/05/2016, à 23:37

Nounours80

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

Bonjour à tous.

Je viens d'essayer conky pour le fun mais je bloque.

Je suis dessus depuis quelques heures pour essayer de comprendre les différentes lignes etc quand brusquement après une enième sauvegarde de mon .conkyrc plus rien et des messages d'erreur dans le terminal.
J'ai fait quelques recherches sur internet qui se sont montrés peu concluantes.
Dans la plupart des cas je vois des histoires de mauvaise syntaxe depuis la mise a jour mais moi ça marchait encore il y a moins de 5 min.

Donc si quelqu'un peut m'expliquer je suis preneur

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
use_xft yes
xftfont Comic sans MS:size=8
xftalpha 0.8
update_interval 1
total_run_times 0
alignment top_right
maximum_width 
minimum_size 200 5
gap_x 0
gap_y 0
draw_shades no
draw_outline no
draw_borders no
stippled_borders 8
border_width 1
default_color white
default_shade_color black
default_outline_color black
no_buffers yes
uppercase no
cpu_avg_samples 4
net_avg_samples 4
override_utf8_locale yes
use_spacer none
short_units yes
 
TEXT

${alignc} Xubuntu 16.04


${alignc}AMD A10-5800K
Core 1 ${alignr 130}${cpu cpu1}% ${cpubar cpu1}
Core 2 ${alignr 130}${cpu cpu2}% ${cpubar cpu2}
Core 3 ${alignr 130}${cpu cpu3}% ${cpubar cpu3}
Core 4 ${alignr 130}${cpu cpu4}% ${cpubar cpu4}
${cpugraph}
${alignc}Température CPU : ${hwmon 0 temp 2}.0 °C


${alignc}GTX950
${alignc}Température GPU : ${exec nvidia-settings -q gpucoretemp | grep '):' | awk '{print $4}'}0 °C


Ram : ${mem}/${memmax} $alignr${memperc}%
${membar}


System : ${fs_used /}/${fs_size /} $alignr${fs_used_perc /}%
${fs_bar /}
Data : ${fs_used /home}/${fs_size /home} $alignr${fs_used_perc /home}%
${fs_bar /home}


${alignc}IP Locale: ${addr enp4s0}
${alignc}Download : ${downspeedf enp4s0}
${alignc}Upload : ${upspeedf enp4s0}
$ conky -c /home/nounours/Documents/Conky/.conkyrc
conky: Syntax error (/home/nounours/Documents/Conky/.conkyrc:1: '=' expected near 'yes') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:150: [string "converted config"]:12: unexpected symbol near ','

Hors ligne

#1234 Le 24/05/2016, à 06:56

chepioq

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

Tes erreurs indiquent que tu es avec conky version 1.10 et non avec conky 1.9.
Il faut donc ré-écrire ton conky, avec la nouvelle syntaxe, voir ici http://forum.ubuntu-fr.org/viewtopic.ph … 31521&p=49 post #1220

Je l'ai fait pour voir, et voici ce qui fonctionne chez moi :

conky.config = {
double_buffer = true,
background = false ,
use_xft = true,
font = "xftfont Comic sans MS:size=8",
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',

draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
default_color = 'white',
alignment = 'top_right',
gap_x = 0,
gap_y = 0,
no_buffers = true,
uppercase = false,
cpu_avg_samples = 4,
net_avg_samples = 4,
override_utf8_locale = true,
text_buffer_size = 1024,
}

conky.text = [[

${alignc} Xubuntu 16.04


${alignc}AMD A10-5800K
Core 1 ${goto 80}${cpu cpu1}% ${cpubar cpu1}
Core 2 ${goto 80}${cpu cpu2}% ${cpubar cpu2}
Core 3 ${goto 80}${cpu cpu3}% ${cpubar cpu3}
Core 4 ${goto 80}${cpu cpu4}% ${cpubar cpu4}
${cpugraph}
${alignc}Température CPU : ${hwmon 0 temp 2}.0 °C


${alignc}GTX950
${alignc}Température GPU : ${exec nvidia-settings -q gpucoretemp | grep '):' | awk '{print $4}'}0 °C


Ram : ${mem}/${memmax} $alignr${memperc}%
${membar}


System : ${fs_used /}/${fs_size /} $alignr${fs_used_perc /}%
${fs_bar /}
Data : ${fs_used /home}/${fs_size /home} $alignr${fs_used_perc /home}%
${fs_bar /home}


${alignc}IP Locale: ${addr enp4s0}
${alignc}Download : ${downspeedf enp4s0}
${alignc}Upload : ${upspeedf enp4s0}
]]

Dernière modification par chepioq (Le 24/05/2016, à 06:57)


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

Hors ligne

#1235 Le 24/05/2016, à 12:24

Nounours80

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

Merci chepioq.
J'avais commencé à le remettre en version 1.10 cette nuit mais j'étais loin d'arriver à ton résultat.
Tu me fais gagner un paquet de temps ^^

Par contre je ne comprends pas pourquoi j'ai pu essayer pendant au minimum 2 heures avant d'avoir ces messages ...

Merci encore et bonne journée

Hors ligne

#1236 Le 24/05/2016, à 13:31

chepioq

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

Nounours80 a écrit :

........................
Par contre je ne comprends pas pourquoi j'ai pu essayer pendant au minimum 2 heures avant d'avoir ces messages ...

C'est en effet assez bizarre, la seule explication qui me vient à l'esprit est que tu as eu une mise à jour de conky vers la version 1.10 entre temps.
Mais c'est quand même pas de chance...


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

Hors ligne

#1237 Le 24/05/2016, à 14:53

bigoud92

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

Bonjour à tous ,
Je ne sais pas si je peux poster ça ici ou pas je le supprimerai le cas échéant mais pour ceux qui comme moi débute et sont perdu avec la différence de syntaxe de conky 1.10 il existe un scripts pour convertir l'ancienne syntaxe vers la nouvelle sur le Github de conky. Attention il ne fait que la conversion , vérifié la liste des fonctions et/ou variables qui sont déprécié et leurs remplaçantes. smile

Dernière modification par bigoud92 (Le 24/05/2016, à 14:54)


Amateur d'Ubuntu depuis 2009 je suis novice mais je me soigne, et je suis animateur de podcast débutant l'apéro des papas manchots
PC portable sony vaio ubuntu 16.04 64bits : Intel® Core™ i5-2410M CPU @ 2.30GHz , 4GB ram
Ma chaîne youtube : http://www.youtube.com/c/johnguecko
Mon site : http:/www.bigoudops.fr

Hors ligne

#1238 Le 09/06/2016, à 11:13

CoolhandWarrior

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

Bonjour,

J'ai repris ce conky-lua:
https://elwan7.wordpress.com/tag/conky-lua/

Et l'ai un peu fait à mon goût:
http://nsa38.casimages.com/img/2016/06/ … 182007.png
mini_160609020013182007.png

Un peu encombrant ce conky! En double écran c'est pas mal:
http://nsa37.casimages.com/img/2016/06/ … 119455.png
mini_160609020108119455.png

Vous pouvez télécharger l'ensemble là(.conkyrc, scipts et rings.lua, fond d'écran, et les images tux, cadre transparent et grille pour le up et down du download qui m'ont servit pour modifier l'image de elwan7):
https://www.dropbox.com/s/rpd5ckq29c00y … ar.gz?dl=0

Vous devez éditer le fichier pour y mettre votre interface réseau (wifi ou ethernet ) et le chemin de votre répertoire de base (/home):
Ligne 85  remplacer les  » /home/coolhand  »  par  le votre (/home/xxxx)
Ligne 96 ,98 et 102  remplacer le  » eno1  » par votre interface wifi ou ethernet(eno1 correspond sans doute à votre eth0 ou wlan2 on tape ifconfig dans un terminal pour avoir la réponse)


.conkyrc

# Conky settings #
#background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
#imlib_cache_size 0

temperature_unit fahrenheit

# Window specifications #


own_window yes    # On dit à Conky de ne pas se mettre sur le bureau mais dans une fenêtre propre
own_window_type   override  # type de fenêtre "maison" (le type desktop convient si on n'a pas d'ombre)
own_window_hints  undecorated,below,sticky,skip_taskbar,skip_pager # définition du type
#own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

## This Resolution is set according to the sreen resolution of 1366x768 
## Adjust Accoring to yours

minimum_size 900 560
maximum_width 1300

alignment tr
gap_x 15
gap_y 25

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5

uppercase no

temperature_unit celsius


default_color FFFFFF

# Lua Load  #
lua_load ~/.conky/scripts/rings.lua
lua_draw_hook_pre ring_stats

## Adjust these fields according to the your screen size i have modded them for 1366X768

TEXT
 ${offset 700}${color EAEAEA}${font GE Inspira:pixelsize=120}${time %H:%M}${font}${voffset -84}${voffset 10}${color FFA300}${font GE Inspira:pixelsize=42}${time %d} ${voffset -15}${color EAEAEA}${font GE Inspira:pixelsize=22}${time  %B} ${time %Y}${font}${voffset 124}${font GE Inspira:pixelsize=58}${offset -800}${time %A}${font}
${offset 720}${voffset -100}${font Ubuntu:pixelsize=10}${color FFA300}HD ${offset 9}$color${fs_free /} / ${fs_size /}${offset 30}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 30}${color FFA300}CPU ${offset 9}$color${cpu cpu0}%
${voffset 10}${offset 270}${color 2c2c2c}${hr 4}
${image ~/.conky/rev-eng.png}

${offset 1010}${voffset 15}${color ffffff}${font Santana:size=8:style=Bold}CPU${voffset 9}
${offset 985}${voffset -5}${color ffffff}${font Santana:size=8:style=Bold}${cpu cpu} %
${offset 935}${voffset 10}${color ffffff}${font Santana:size=8:style=Bold}RAM${voffset 3}
${offset 915}${voffset 0}${color ffffff}${font Santana:size=8:style=Bold}${memperc} %
${offset 130}${voffset 150}${color #FFA300}${font Santana:size=9:style=Bold}root : ${font Santana:size=9:style=Bold}${fs_used /} / ${fs_size /}
${offset 130}${voffset 10}${font Santana:size=9:style=Bold}home : ${font Santana:size=9:style=Bold}${fs_used /home/coolhand} /  ${fs_size /home/coolhand}$font
${offset 120}${voffset 12}${color ffffff}${font Santana:size=9:style=Bold}swap: ${font Santana:size=8} ${swap} / ${swapfree}$font
${offset 570}${voffset -110} ${color EAEAEA}Linux ${kernel} kernel
${offset 570}${voffset 5} Uptime :${uptime}
${offset 825}${voffset -80}${color ffffff}${font Santana:size=10:style=Bold}  ${exec whoami}@${nodename}
${offset 830}${voffset 0}${font Santana:size=8:style=Bold}   CPU   RAM     Name
${offset 830}${voffset 0}${color #FFA300}${font Santana:size=8} ${top cpu 1}  ${top mem 1}     ${top name 1}
${offset 830}${voffset 0}${color #F9E101}${font Santana:size=8} ${top cpu 2}  ${top mem 2}     ${top name 2}
${offset 830}${voffset 0}${color1}${font Santana:size=8} ${top cpu 3}  ${top mem 3}     ${top name 3}
${offset 830}${voffset 0}${color1}${font Santana:size=8} ${top cpu 4}  ${top mem 4}     ${top name 4}
${offset 830}${voffset 0}${color1}${font Santana:size=8} ${top cpu 5}  ${top mem 5}     ${top name 5}
${offset 680}${voffset 110}${color ffffff}${font Santana:size=8}      IP Address : ${addr eno1} 
${offset 705}${voffset 5}${color ffffff}${font Santana:size=8}IP Public :${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}
${offset 705}${voffset 5}${color ffffff}${font Santana:size=8}Down :${downspeed eno1} k/s ${offset 8}Up:${upspeed eno1} k/s
${offset 703}${voffset 5}${color ffffff}${font Santana:size=8}TCP Connections: ${tcp_portmon 1 65535 count}
${offset 680}${voffset 5}${color ffffff}${font Santana:size=8}Speed Graph :

${offset 680}${voffset -10}${color ffffff}${font Santana:size=8}${color FF6600}${downspeedgraph eno1 32,150 FF6600 ffffff} ${color FF6600}${upspeedgraph eno1 32,150 FF6600 ffffff}

rings.lua

--[[
Ring Meters by londonali1010 (2009)

This script draws percentage meters as rings. It is fully customisable; all options are described in the 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 145 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 (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/rings-v1.2.lua
    lua_draw_hook_pre ring_stats

Changelog:
+ v1.2 -- Added option for the ending angle of the rings (07.10.2009)
+ v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
+ v1.0 -- Original release (28.09.2009)
]]

settings_table = {
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x1e7aa9,
        fg_alpha=0.8,
        x=1020, y=200,
	radius=35,
	thickness=5,
        start_angle=270,
        end_angle=570,
    },
{
        name='memperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x1e7aa9,
        fg_alpha=0.8,
        x=950, y=240,
        radius=35,
        thickness=5,
        start_angle=270,
        end_angle=570,
    },
    {
        name='swapperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x1e7aa9,
        fg_alpha=0.8,
        x=950, y=240,
        radius=28,
        thickness=5,
        start_angle=270,
        end_angle=450,
    },
}

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 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 conky_ring_stats()
    if lastValue==nil then lastValue = 0 end
    
    local function setup_rings(cr,pt)
        local str=''
        local value=0

        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
        if pt['name'] == "hddtemp" then 
            if str=="N/A" then
                value=lastValue
            else
                value=tonumber(str)
                lastValue=value
            end
        else
            value=tonumber(str)
        end
        if value==nil then value=0 end
        pct=value/pt['max']
        draw_ring(cr,pct,pt)
    end

    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
end

Dernière modification par CoolhandWarrior (Le 09/06/2016, à 14:00)

Hors ligne

#1239 Le 11/06/2016, à 21:41

ricorde

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

Bonsoir a tous
je viens de faire une mise a jour Ubuntu 16.04 et apres redemarrage j'ai un conky qui ce lance plus je poste un retour terminal merci de votre d'aide

sh -c "sleep 10; conky -c /home/lyca/.conky/conky-perso/conky;"
conky: desktop window (c00033) is subwindow of root window (2ae)
conky: window type - normal
conky: drawing to created window (0x4200002)
conky: drawing to double buffer
conky: /build/conky-C2QCeA/conky-1.10.2/src/update-cb.cc :92 : virtual void conky::priv::callback_base::merge(conky::priv::callback_base&&):  l'assertion « wait == other.wait » a échoué.
Aborted (core dumped)

Processeur : Intel Core i7-3930K 3200.0 MHz Socket R (LGA2011-0)    Carte graphique : GIGABYTE GeForce GTX 680    Carte mére : ASUS SABERTOOTH X79   Memory : Kingston DDR3 SDRAM 666.7 MHz 2 fois 8 Go

Hors ligne

#1240 Le 12/06/2016, à 06:47

chepioq

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

Quel est le contenu du conky qui ne fonctionne plus ?


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

Hors ligne

#1241 Le 12/06/2016, à 21:32

ricorde

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

Salut chepioq en faite j'avais ajouter une ligne pour connaitre adresse ip public ça a fonctionné jusqu’à la mise a jour en retirant cette ligne le conky fonctionne donc tout va pour le mieux
Merci chepioq


Processeur : Intel Core i7-3930K 3200.0 MHz Socket R (LGA2011-0)    Carte graphique : GIGABYTE GeForce GTX 680    Carte mére : ASUS SABERTOOTH X79   Memory : Kingston DDR3 SDRAM 666.7 MHz 2 fois 8 Go

Hors ligne

#1242 Le 13/06/2016, à 06:04

chepioq

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

Tu pourrais nous fournir la ligne qui pose problème, je testerais et si j'ai le même problème je ferais un rapport de bogue sur le site des développeurs de conky.

Et pourrais-tu nous fournir le résultat de la commande :

conky -v

Dernière modification par chepioq (Le 13/06/2016, à 06:45)


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

Hors ligne

#1243 Le 14/06/2016, à 16:29

bigoud92

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

Bonjour à tous j'ai un souci avec mon conky il devient illisible après quelques secondes de lancement je poste une capture d'écran qui sera plus parlante je pense.Je poste en dessous mon conkyrc et ma version est la 1.10.2
1465913750.png

 conky.config = {

	background = false,
	use_xft = true,
	font = 'Courier new:size=9',
	xftalpha = 0.1,
	out_to_console = false,
	update_interval = 2,
	total_run_times = 0,

	own_window = true,
	own_window_type = 'override',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	double_buffer = true,
	draw_shades = true,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = true,

	stippled_borders = 5,

	border_width = 1,

	no_buffers = true,
	text_buffer_size = 2048,
	uppercase = false,

	cpu_avg_samples = 2,
	net_avg_samples = 2,

	override_utf8_locale = true,
	use_spacer = 'right',

--##########################
--#   Couleurs
--##########################
	default_color = '#D62606',
	default_shade_color = '#000000',
	default_outline_color = '#000000',
	color1 = '#94c3e0',-- données
	color2 = '#60C313',-- titre

--##########################
--#   Positionner son conky
--##########################
	alignment = 'top_right',
	gap_x = 1,
	gap_y = 24,
	minimum_width = 290, minimum_height = 5,
	maximum_width = 400,

};

j'ai vérifier avec la commande

top 

ainsi qu'avec le moniteur système j'ai bien un seul conky lancer. En espérant qu'on puisse me venir en aide merci d'avance


Amateur d'Ubuntu depuis 2009 je suis novice mais je me soigne, et je suis animateur de podcast débutant l'apéro des papas manchots
PC portable sony vaio ubuntu 16.04 64bits : Intel® Core™ i5-2410M CPU @ 2.30GHz , 4GB ram
Ma chaîne youtube : http://www.youtube.com/c/johnguecko
Mon site : http:/www.bigoudops.fr

Hors ligne

#1244 Le 14/06/2016, à 20:59

chepioq

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

je pense qu'en remplaçant

own_window_type = 'override',

par

own_window_type = 'normal',

cela devrait résoudre ton soucis.


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

Hors ligne

#1245 Le 14/06/2016, à 22:03

bigoud92

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

chepioq a écrit :

je pense qu'en remplaçant

own_window_type = 'override',

par

own_window_type = 'normal',

cela devrait résoudre ton soucis.

Merci beaucoup effectivement c'est lisible maintenant mais il me semble que ça crée en une fenêtre enfin quand je passe mon curseur a proximités il me propose de redimensionner le conky .


Amateur d'Ubuntu depuis 2009 je suis novice mais je me soigne, et je suis animateur de podcast débutant l'apéro des papas manchots
PC portable sony vaio ubuntu 16.04 64bits : Intel® Core™ i5-2410M CPU @ 2.30GHz , 4GB ram
Ma chaîne youtube : http://www.youtube.com/c/johnguecko
Mon site : http:/www.bigoudops.fr

Hors ligne

#1246 Le 15/06/2016, à 06:14

chepioq

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

bigoud92 a écrit :

Merci beaucoup effectivement c'est lisible maintenant mais il me semble que ça crée en une fenêtre enfin quand je passe mon curseur a proximités il me propose de redimensionner le conky .

Je n'ai jamais eu ce type de réaction avec mes conky, qui sont tous avec own_window_type = 'normal'

Cela ne viens peur-être pas de conky, mais de ton bureau, je ne saurait le dire.

Tu peux aussi essayer, à la place de own_window_type = 'normal',

own_window_type = 'desktop',

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

Hors ligne

#1247 Le 15/06/2016, à 07:35

bigoud92

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

chepioq a écrit :
bigoud92 a écrit :

Merci beaucoup effectivement c'est lisible maintenant mais il me semble que ça crée en une fenêtre enfin quand je passe mon curseur a proximités il me propose de redimensionner le conky .

Je n'ai jamais eu ce type de réaction avec mes conky, qui sont tous avec own_window_type = 'normal'

Cela ne viens peur-être pas de conky, mais de ton bureau, je ne saurait le dire.

Tu peux aussi essayer, à la place de own_window_type = 'normal',

own_window_type = 'desktop',

La c'est encore plus étrange le conky apparait bien incrusté dans le bureau seulement quand je clique sur le bureau il disparait pourtant il tourne encore en fond de tache avec

 top

et moniteur système roll


Amateur d'Ubuntu depuis 2009 je suis novice mais je me soigne, et je suis animateur de podcast débutant l'apéro des papas manchots
PC portable sony vaio ubuntu 16.04 64bits : Intel® Core™ i5-2410M CPU @ 2.30GHz , 4GB ram
Ma chaîne youtube : http://www.youtube.com/c/johnguecko
Mon site : http:/www.bigoudops.fr

Hors ligne

#1248 Le 15/06/2016, à 18:16

jactib

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

Bonjour , j'ai un problème avec mon conky je n'arrive pas à avoir de débit internet sur mon portable (wifi)
voici l' extrait du conky.rc concernant la connexion :

### Network
${goto 20}${voffset -1}${font Ubuntu:size=9,weight:bold}${color}Network ${hr 1}
${font Ubuntu:size=9,weight:normal}
#${alignr}SSID : ${wireless_essid wlan0}  
${font Ubuntu:size=8,weight:bold}${goto 45}${voffset -8}${color7}#${hr 22}
${color4}${voffset -15}${alignr}${wireless_bitrate wlan0}
${color}${goto 78}${voffset 1}${font Ubuntu:size=8,weight:bold}Up${alignr}${totalup wlan0}  
${goto 84}${voffset 13}#${upspeedgraph wlan0 28,38 C0C6FF 167AAB}#
${alignr}${voffset -8}${font Ubuntu:size=8,weight:bold}${upspeed wlan0}/s 
${alignr}${voffset 25}${font Ubuntu:size=8,weight:bold}${downspeed wlan0}/s 
${goto 84}${voffset 5}#${downspeedgraph wlan0 28,38 C0C6FF 167AAB}#
${goto 78}${voffset -5}${color}${font Ubuntu:size=8,weight:bold}Down${alignr}${totaldown wlan0}

si vous aviez une idée ?
jacques

ljere: merci de mettre vos retours entre les balises code

Dernière modification par ljere (Le 15/06/2016, à 20:00)

Hors ligne

#1249 Le 16/06/2016, à 10:55

jactib

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

Erreur corrigée d'adresse ce n'était pas wlan0 mais wlo1
Désolé ,
Jacques

Dernière modification par jactib (Le 16/06/2016, à 10:58)

Hors ligne

#1250 Le 15/07/2016, à 18:43

lifala

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

bonjour,

on peu afficher la charge du processeur en MHz ou Ghz ?

merci


conky 1 --- conky 2 --- conkyForecast 2.09 --- Tuto Finch
Lucid minimal + openbox

Hors ligne