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.

#3076 Le 05/10/2010, à 16:29

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

wlourf a écrit :
maestroom a écrit :

ha hé aussi je remerci wlourf pour le script

de rien smile
pas mal ton intégration par contre un peu difficile à lire sur ton fond d'écran (qui est classe je dois dire)
Essaye de terminer les gradients par du noir avec opacité 100 % au lieu du 999999 transparent :
Au lieu de ça,

{{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},

un truc du genre :

{{0,0x000000,1},{0.5,0x999999,1}, {1,0x000000,1}},

Je n'ai pas essayé personnellement !

effectivement un peu plus déterminer dans mes rings smile

chepioq a écrit :

@maestroom

Essaye en modifiant le ligne background de ton conky:au lieu de

background yes

tu mets:

background no

j'ai effectuer le changement mais par curiosité ormis le fait qu'il n'est plus dans le background en koi ceci apportera comme changement dans mon conky? (dsl je suis un peu curieux XD)

je vous remercie tous deux wlourf et chepioq

ha! et Wlourf... mon background vient du site de nvidia smile si ceci t'intéresse et il y en a d'autre qui son sublime.. et qui permettrait de faire d'autre conky a l'imagination varié smile


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3077 Le 06/10/2010, à 21:11

Fenouille84

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonsoir tout le monde !

Voici mon conky.
[hs] oui, mon bureau a été élu le moins joyeux du monde [/hs] lol

Screen :
obbinary.th.png

conkyrc1 (classique, sauf pour la gestion USB, la gestion de VLC et le script des fenêtres roll)

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

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

#Mémoire
  double_buffer yes            #Éviter le clignotement
  no_buffers yes                #Soustraire les mémoires tampons de la mémoire utilisée
  text_buffer_size 1024            #Taille du cache pour le texte

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

#Fenêtre conky
  alignment top_left            #Alignement
 #---
  minimum_size 215 10            #Taille minimum (px) ; largeur / hauteur
  maximum_width 215            #Largeur maximum (px)
 #---
  gap_x 5                    #Écart avec le bord gauche / droit
  gap_y 8                    #Écart avec le bord haut / bas
 #---
  draw_shades no                #Afficher les ombres
  draw_outline no                #Afficher les contours de fenêtre
  draw_borders no                #Afficher des contours autour des blocs de texte
  border_width 1                #Largeur du contour
  border_inner_margin 1            #Largeur des marges
 #---
  own_window yes                #Utiliser sa propre fenêtre
  own_window_type override         #Type de fenêtre ; normal / override / desktop
  own_window_transparent yes        #Pseudo transparence

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

#Couleurs
  default_color FFFFFF             #Couleur par défaut
  default_shade_color 333333        #Couleur des ombres
  default_outline_color black        #Couleur des contours
 #---
  color1 606075                #Gris
  color2 AF4C00                #Orange
 #---
  short_units yes                #Unités courtes
  pad_percents 2                #Unité à 2 décimales


TEXT
${color1}SYS Control
${voffset -8}${hr}
  ${uptime}${alignr}${exec grep "CODE" /etc/lsb-release | cut -d "=" -f2 | sed 's/^.\| [a-z]/\U&/g'}
  ${exec uname -r | cut -c 1-9}${alignr}${exec cat /etc/lsb-release | grep "REL" | cut -d "=" -f2}
  ${voffset -5}${stippled_hr}${voffset 2}
  Core1:${cpu cpu1}%
  Temp1:${platform coretemp.0 temp 1}${offset -7}°
${goto 90}${voffset -31}${cpugraph cpu1}
  Core2:${cpu cpu2}%
  Temp2:${platform coretemp.1 temp 1}${offset -7}°
${goto 90}${voffset -31}${cpugraph cpu2}

MEM Control
${voffset -8}${hr}
  RAM :${memperc}% ${membar}
  Swap:${swapperc}% ${swapbar}

NET Control
${voffset -8}${hr}
  WiFi
   UL:${totalup wlan0}
   DL:${totaldown wlan0}
${voffset -39}${goto 120}  Link
${goto 120}    UL:${totalup eth0}
${goto 120}    DL:${totaldown eth0}
${if_existing /proc/net/route wlan0}${execpi 120 $HOME/Script/wifi_crous}${else}${endif}
#
HDD Control
${voffset -8}${hr}
  Temp1:${hddtemp /dev/sda}${offset -7}°
  /root:${fs_used_perc /}% ${fs_bar 6,80 /} ${fs_free /}
  /home:${fs_used_perc /home}% ${fs_bar 6,80 /home} ${fs_free /home}

USB Control
${voffset -8}${hr}${if_match ${execp ls /media | wc -l} >0}${if_mounted /media/LEXAR}
  Lexar:${fs_used_perc /media/LEXAR}% ${fs_bar /media/LEXAR} ${fs_free /media/LEXAR}${else}${endif}${if_mounted /media/Linux}
  Linux:${fs_used_perc /media/Linux}% ${fs_bar /media/Linux} ${fs_free /media/Linux}${else}${endif}${if_mounted /media/LaCie_PC}
  LaCie:${fs_used_perc /media/LaCie_PC}% ${fs_bar /media/LaCie_PC} ${fs_free /media/LaCie_PC}${else}${endif}${if_mounted /media/ZMATH}
  ZMath:${fs_used_perc /media/ZMATH}% ${fs_bar /media/ZMATH} ${fs_free /media/ZMATH}${else}${endif}${else}
  No device detected${endif}

VLC Control
${voffset -8}${hr}
${if_running vlc}${execi 2 $HOME/Script/httpvlc}${else}  No music${endif}

${hr}
${font Tlwg Typist:size=9}${execp cal | sed '1d ; /./!d ; s/^/ /g ; s/$/ /g ; s/'" $(date +%e) "'/ \${color2}'"$(date +%e)"'\${color1} /1 ; s/^/\${goto 65}/g'}${font}
${hr}
${voffset -110}${font Sans:size=25}${time %H}${color2}${voffset -54}
${goto 45}${font Sans:size=9}${time :%M}
${goto 45}${time :%S}${color1}${voffset 8}
${goto 12}- - - - - -${voffset 5}
${font Sans:size=25}${time %d}${color2}${voffset -54}
${goto 45}${font Sans:size=9}.${time %m}
${goto 45}.${time %y}${font}${color1}



WIN Control
${voffset -8}${hr}
${exec $HOME/Script/Fen}

Fen.sh => Script listant automatiquement le nombre de bureau ainsi que les fenêtres ouvertes.

#!/bin/bash

############################### Vers. 2.0 #
#                                         #
#    Conky Script - Window Viewer         #
#    ----------------------------         #
#         ---By Fen84---                  #
#          -28/09/2010-                   #
#                                         #
#    -Liste les fenetres ouvertes         #
#    -Dependances : wmctrl,xprop          #
#                                         #
#    -Contributions                       #
#       wlourf                            #
#                                         #
###########################################

#Bureau actif entre crochets
  #desktop_name=$(wmctrl -d | grep -E ^$num | awk '{print $10}')
  #actif=$(wmctrl -d | grep -E ^$num | awk '{print $2}')
  #if [ "$actif" == "*" ]
  #then desktop_name="["$desktop_name"]" 
  #fi

#Variable pour le nombre de bureau
  num=0

#Nombre total de bureau
  total=$(xprop -root | grep -m 1 _NET_NUMBER_OF_DESKTOPS |awk '{print $3}')

#Nom de la machine
  nompc=$(uname -n)
  
while [ $num != $total ]
do
  #Nom du bureau traité
  desktop_name=" $(wmctrl -d | grep -E ^$num | awk '{print  $10}')"

  #Nom du bureau actif
  actif=$(wmctrl -d | grep -E ^$num | awk '{print $2}')

  #Bureau actif avec étoile
  if [ "$actif" == "*" ]
  then desktop_name=$(sed 's/^ /*/g' <<< "$desktop_name")
  fi

  #Fenêtres ouvertes
  desktop=$(wmctrl -l -p | grep "  $num " | sed 's/^.*  '"$num"'/ /g ; s/'"$nompc"'//g' | cut -d "-" -f1)

  #Affichage
  echo -e "$desktop_name\n$desktop" | sed '/^$/d'

  #Incrémentation pour la boucle
  let "num+=1"
done

exit 0

Voilà voilà !! Promis, le prochain, je mets de la couleur et je fais un truc classe wink lol


Ma page Deviant Art : conky inside ;-)
.
-- DropBox (online backup) : 2Go + 250 Mo pour vous et moi par parrainage --

Hors ligne

#3078 Le 06/10/2010, à 21:19

Leyna

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Fenouille84 a écrit :

Bonsoir tout le monde !

Voici mon conky.
[hs] oui, mon bureau a été élu le moins joyeux du monde [/hs] lol

[...]
Voilà voilà !! Promis, le prochain, je mets de la couleur et je fais un truc classe wink lol

C'est vrai que tu nous as habitués à plus joyeux quand même... C'est la ptite déprime de l'automne c'est ça? tongue

Hors ligne

#3079 Le 06/10/2010, à 21:25

Fenouille84

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Leyna a écrit :

C'est vrai que tu nous as habitués à plus joyeux quand même... C'est la ptite déprime de l'automne c'est ça? tongue

Sa doit être sa tongue lol


Ma page Deviant Art : conky inside ;-)
.
-- DropBox (online backup) : 2Go + 250 Mo pour vous et moi par parrainage --

Hors ligne

#3080 Le 07/10/2010, à 16:03

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

bon enfin j'ai trouvé un avatar qui fit avec le 60x60 pixels XD j'espère qu'il vous plait avec son grossssss sourire xD


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3081 Le 07/10/2010, à 19:30

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

bonjour! un message surtout pour Wlourf s'il est dans le forum XD

j'ai mis en fonction mon conky avec de beau ring.. mais j'ai pas le droit de le voir plus de 20 minutes.. parce que mon conky fait planter ma session... et hop je me reconnecte sur ma session hmm étrange surtout que lorsqu'il n'est pas activé ben rien ne plante

j'ai p-t une théorie ces a vous de me dire si ce serait plausible:
le script pour démarrer le conky un peu tardivement.

#!/bin/bash
sleep 20
conky -c /etc/conky/conky.conf &

si j'ajoute un killall ?... ça évitera tu le plantage

autre symptôme du conky: par moment.. il clignote un GROS coup..avant il ne le fesait pas..

merçi bcp de votre aide et mon conky me manque terriblement XD


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3082 Le 07/10/2010, à 19:33

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Si tu ajoutes un killall sur ton conky, cela supprimera le conky...
Donc plus de plantage, mais plus de conky...:lol:

==EDIT==
Et si tu ajoutai un exit 0 à la fin de ton script?

Dernière modification par chepioq (Le 07/10/2010, à 19:35)


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

Hors ligne

#3083 Le 07/10/2010, à 20:54

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

se que je désire comprendre surtout ces pourquoi il fait planter ma session? et ton script me permettrait t'il de garder mon conky ouvert? La en se moment il est fermé pour ainsi travailler sur mon prochain conky.. ces l'automn donc.. on remanie un peu le desktop XD et aussi pour que ceci ne replente pas...

haaaaaaaaa en faite pour tout le monde ces l'automn on pourrais faire un p'tit concour de conky pour ceux qui veullent si amuser. Et ainsi pour but de faire sortir de beau conky pour les nouveau venue.

voici un text d'encouragement smile pour s'inspiré:

L'Automne, c'est une préparation néanmoins destive vers le repli hivernal, la fin annoncée des beaux jours. 
Ces aussi le temps du remerciement pour toutes les récoltes que nous avons moissonées durant le temps de la croissance. 
L'Automne ces aussi l'équilibre, l'équilibre entre les jours et les nuits de façon égaux.

bon j'espères qu'il y en aura tout plein de belle couleur smile

Dernière modification par maestroom (Le 07/10/2010, à 21:23)


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3084 Le 07/10/2010, à 21:21

wlourf

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

salut maestroom,

je ne voudrais pas être la cause des plantages de ton pc! tout ce que je peux te proposer c'est de démarrer ton conky dans une console et attendre que ça plante ! a ce moment tu auras éventuellement quelque chose d'affiché dans ta console que tu pourras nous transmettre .


Bon, tu nous dis que ta session (gnome ?) plante carrément alors tu n'auras pas accès aux messages de ta console.

Si tu lances conky comme ça tu pourras peut-être récupérer quelque chose:

conky  -c /chemin/conkyrc > ~/conky.txt

Le plantage peut aussi être dû à un problème avec compiz ou la transparence, je sais pas trop ce que tu as d'installé.

Hors ligne

#3085 Le 07/10/2010, à 21:44

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

dsl je ne veux pas te mettre en cause.. mais le script ces toi qui la créé donc j'imagine que tu le connais mieu que moi ..... donc s'il y a une erreur dans le copiage.. ben tu va surement plus le remarqué que moi..

je suis navré car je ne voulais pas te viser... ^^

voila le résultat de ton code smile

Conky: /etc/conky/conky.conf: 41: no such configuration: 'border_margin'
Conky: use_spacer should have an argument of left, right, or none.  'no' seems to be some form of 'false', so defaulting to none.
Conky: statfs '/media/Lexar': No such file or directory
Conky: desktop window (24000a9) is subwindow of root window (15a)
Conky: window type - override
Conky: drawing to created window (0x5400001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: statfs '/media/Lexar': No such file or directory
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: statfs '/media/Lexar/': No such file or directory
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: statfs '/media/Lexar/': No such file or directory
Conky: statfs '/media/Lexar': No such file or directory
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: statfs '/media/Lexar/': No such file or directory
Conky: statfs '/media/Lexar': No such file or directory
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value
^CConky: received SIGINT or SIGTERM to terminate. bye!

pour ce qui est du media.. il est débrancher en se moment.. mais il le fait tout de même lorsqu'il est branché
je vais tenter de refaire planter ma session avec conky... et tenter de prendre des notes... car il y avait de l'écriture.... donc je sais pas si ces celui du plantage.. ou les codes de démarrage

Dernière modification par maestroom (Le 07/10/2010, à 21:46)


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3086 Le 07/10/2010, à 22:00

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

je vient d'aller voir mon script... par de même... enclancher mon conky.. ces un test...

et j'aurais du le voir (ces le temps de rire de ma gueule la)....

Conky: llua_do_call: function conky_draw_text execution failed: attempt to call a nil value

je ne m'en sert pas... et j'ai oublié d'enlever la ligne en même temps que le fichier text...


et merçi Wlourf ces graçe a ton script pour voir les erreurs qui ma permis d'allumer XD la j'ai plus de bug comme on dit.. et seul moi en était la cause...

p.s. toutes causes d'erreur dans l'ordi est celui entre la chaise et le clavier XD

Dernière modification par maestroom (Le 07/10/2010, à 22:01)


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3087 Le 07/10/2010, à 22:06

wlourf

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

enlève aussi ça dans ton conky :
border_margin

faut dire que tu as 12 anneaux! ça doit bouffer un peu de cpu et de ram ça, si l'update_interval est court, non ?

PS; je suis pas vexé, je plaisantais !

Hors ligne

#3088 Le 07/10/2010, à 22:28

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

^^ HIHI... j'ai 4 go de ram.. un quad core... bofff.. ça bouffe pas temps que ça XD


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3089 Le 07/10/2010, à 22:33

fouduroi

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

salut les gens, je débute un peu en conky, j'ai bien parcouru le forum et divers site
j'ai realisé ces 2 conky mais je n'arrive pas a afficher les t° de mes hdd et de ma cg nvidia!!!
capture1m.th.png


background        no
update_interval        2.0
double_buffer        yes

use_xft            yes
override_utf8_locale
xftfont            URW Palladio L:size=11
xftalpha        0.8
own_window        yes
own_window_transparent    yes
#own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager
#on_bottom        yes

minimum_size        300 250
draw_shades        no
draw_outline        no
draw_borders        no
draw_graph_borders    yes
stippled_borders    0
border_margin        3
border_width        0
text_buffer_size 1024

default_color        white
default_shade_color    black
default_outline_color    black
color0 FFFFFF
color1 e49c16
color2 ffc11f

alignment top_right
gap_x            1682
gap_y             70

no_buffers        yes

    

TEXT
${font  Larkspur BRK:size=20}$alignc $time${font}

${font Larkspur BRK:size=14}$alignc${color }${execi 120 ~/.conky/meteo.sh /FRXX4744}meteo a
  $alignc${execi 120 ~/.conky/meteo2.sh "Ville"}

${color}Aujourd'hui : ${execi 120 ~/.conky/meteo2.sh "Température aujourd'hui"}  
${font weather:size=40}${voffset -30}${offset 230}${execi 120 ~/.conky/meteo2.sh "Conditions aujourd'hui"}${font}${voffset -16}
Vent : ${execi 120 ~/.conky/meteo2.sh "Vent aujourd'hui"}
Lever du soleil : ${execi 120 ~/.conky/meteo2.sh "Lever du soleil"}
Coucher du soleil : ${execi 120 ~/.conky/meteo2.sh "Coucher du soleil"}
${font Larkspur BRK:size=14}Demain : ${font}${execi 120 ~/.conky/meteo2.sh "Température demain"}
${font weather:size=40}${voffset -30}${offset 230}${execi 120 ~/.conky/meteo2.sh "Conditions demain"}${font}

mon conkyrc2:

background        no
update_interval        2.0
double_buffer        yes

use_xft            yes
override_utf8_locale
xftfont           Bitstream Charter:size=11
xftalpha        0.8

own_window        yes
own_window_transparent    yes
#own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager
#on_bottom        yes

minimum_size        300 250
maximum_width     600
minimum_height    600
draw_shades        no
draw_outline        no
draw_borders        no
draw_graph_borders    yes
stippled_borders    0
border_margin        0
border_width        0
text_buffer_size 1024

default_color        white
default_shade_color    black
default_outline_color    black
color0 FFFFFF
color1 e49c16
color2 ffc11f

alignment top_right
gap_x            1368
gap_y             70

no_buffers        yes

    

TEXT
${color1}Uptime:$color $uptime ${color0}
${color1}CPU Utilisé :${color0} $cpu% 
${color2}${if_match $cpu > 3}${cpubar}${else}${execbar echo 3}${endif}${execbar echo 0}
${color1}Mémoire RAM :
${color0} $mem/$memmax - $memperc% ${color2}${goto 150}
${membar}${execbar echo 0}
${color1}Utilisation du Swap :
${color0} $swap/$swapmax - $swapperc% ${color2}${goto 150}
${if_match $swapperc > 3}
${swapbar}${else}${execbar echo 3}${endif}${execbar echo 0}
${color1}Processus : $color $processes   ${color1}En cours : $color $running_processes

${color #F3FF17}Utilisation Core 1:${color} ${color #17FF3A}${cpu cpu1} %   ${color}${color2}${cpubar cpu1}${color}
${color #F3FF17}Utilisation Core 2:${color} ${color #17FF3A}${cpu cpu2} %   ${color}${color2}${cpubar cpu2}${color}
${color #F3FF17}Utilisation Core 3:${color} ${color #17FF3A}${cpu cpu3} %   ${color}${color2}${cpubar cpu3}${color}
${color #F3FF17}Utilisation Core 4:${color} ${color #17FF3A}${cpu cpu4} %   ${color}${color2}${cpubar cpu4}${color}
${color #F3FF17}Utilisation Core 5:${color} ${color #17FF3A}${cpu cpu5} %   ${color}${color2}${cpubar cpu5}${color}
${color #F3FF17}Utilisation Core 6:${color} ${color #17FF3A}${cpu cpu6} %   ${color}${color2}${cpubar cpu6}${color}
${color #F3FF17}Utilisation Core 7:${color} ${color #17FF3A}${cpu cpu7} %   ${color}${color2}${cpubar cpu7}${color}
${color #F3FF17}Utilisation Core 8:${color} ${color #17FF3A}${cpu cpu8} %   ${color}${color2}${cpubar cpu8}${color}
$stippled_hr
${color1}Espace Disque Libre :
${color #17FF3A}Mountpoint${goto 120}% Utilisé
${color0}${execpi 30 grep ^\/dev /etc/mtab | grep -v [\,\ ]ro[\,\ ] | cut -d" " -f2 | sed '2d;' | while read line ; do
echo $line '${goto 140}${fs_used_perc '$line'}%${goto 180}${color2}${fs_bar '$line'}${offset -100}${color2}${execbar echo 0}${color}'
done }
${color #17FF3A}Température des disques durs:${color}
/dev/sda ${hddtemp /dev/sda}
/dev/sdb ${hddtemp /dev/sdb}
/dev/sdc ${hddtemp /dev/sdc}
$stippled_hr
Réseau (Gigabit - eth0): 
Descendant: ${offset 40}${color #17FF3A}${downspeedf eth0} Ko/s${color}
Montant:      ${offset 40}${color #17FF3A}${upspeedf eth0} Ko/s${color}
${color2}$downspeedgraph${color}
$stippled_hr
nVidia Geforce  GT220:
Fréquences GPU: ${execi 10 nvclock -i | grep "GPU clock" | grep '[0-9][0-9][0-9].[0-9]' -o}MHz / RAM:${execi 300 nvclock -i | grep "Clock" | grep '[0-9][0-9][0-9].[0-9]' -o}MHz
Température GPU: ${execi 10 nvclock -T | grep "temperature" | grep '[0-9][0-9]' -o}°C
$stippled_hr
${color}Noms              PID     CPU%   MEM%
${color}Utilisation CPU
${color #ddaa00} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
$stippled_hr
${color}Utilisation Mémoire
${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
$stippled_hr

j'ai bien installé hddtemp et quand je tape:

hddtemp /dev/sda

j'obtiens:

&&&&@&&&&-desktop:~$ hddtemp /dev/sda
/dev/sda: Maxtor 6Y080M0: 50°C

Dernière modification par fouduroi (Le 07/10/2010, à 22:36)


ubuntu 14.04 64 bits  / ubuntu 16.04 64 bits
asus p6t, core i7 920, 7go ram, nvidia gt630
http://www.pullco.fr/  association pour la Promotion de l’Utilisation des Logiciels Libres en COrrèze
pourquoi Linux est le meilleur?

Hors ligne

#3090 Le 07/10/2010, à 22:50

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

pour ma part en ce qui est des température hddtemp /dev/sda ne fonctionne pas
je dois écrire hddtemp /media/lenomdudisquedur

et pour ma carte graphique ya plus simple essais ceci pour la température et la fréquence etc etc

nvidia     threshold     Nvidia graficcard support for the XNVCtrl library. Each option can be shortened to the least significant part. Temperatures are printed as float, all other values as integer.

    * threshold - The thresholdtemperature at which the gpu slows down
    * temp - Gives the gpu current temperature
    * ambient - Gives current air temperature near GPU case
    * gpufreq - Gives the current gpu frequency
    * memfreq - Gives the current mem frequency
    * imagequality - Which imagequality should be chosen by OpenGL applications

exemple :

{color #CB0C29}${font Alice in Wonderland:size=15}${goto 260}${color grey}Température ACtuel : ${color grey}${nvidia temp}­°C

CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3091 Le 07/10/2010, à 23:20

fouduroi

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

merci bien a toi pour la cg mais pour les hdd ça marche toujours pas!


ubuntu 14.04 64 bits  / ubuntu 16.04 64 bits
asus p6t, core i7 920, 7go ram, nvidia gt630
http://www.pullco.fr/  association pour la Promotion de l’Utilisation des Logiciels Libres en COrrèze
pourquoi Linux est le meilleur?

Hors ligne

#3092 Le 07/10/2010, à 23:25

Litteul-Korrigan

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Salut,

Voila ce que j'utilise pour ma carte graph (Nvidia):

#CARTE GRAPH
${color2}${font UnZialish:size=16,weight:bold}Carte Graph.${font} ${hr 2}${color}

Fréquence   Gpu  :  ${nvidia gpufreq} MHz${color}
Fréquence  Mem  :  ${nvidia memfreq} MHz${color}
Température       :  ${nvidia temp}°C${color}

Linux: Si les Gendarmes y arrivent, tout le monde peut y arriver.

Hors ligne

#3093 Le 07/10/2010, à 23:48

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

fouduroi a écrit :

merci bien a toi pour la cg mais pour les hdd ça marche toujours pas!

ha tu configurer hddtemp??? parcequ'il faut le faire pour l'initialiser pour conky


CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3094 Le 08/10/2010, à 05:16

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Chez moi non plus la fonction hddtemp de conky ne fonctionne pas, et je ne suis pas le seul dans ce cas.
je suis obligé de passer par un ${execi}, j'ai par exemple:

${execi 90 hddtemp /dev/sda | awk '{print $4}'}

pour afficher la température de mon disque dur.


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

Hors ligne

#3095 Le 08/10/2010, à 05:28

maestroom

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

si hddtemp ne fonctionne pas chez vous esseyer ce code dans une console pour voir

sudo sensors-detect

CM: Asus Maximus extreme VI/ cpu: intel Core I7-4770 /carte graphique: nvidia GTX 760 /os: Ubuntu gnome-shell 14.04 "" 64 bits avec dual boot windows 8.1 64bit

Hors ligne

#3096 Le 08/10/2010, à 08:04

nik75011

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonjour,

alors voilà pour ma réalisation grâce à tous les trucs et astuces disponibles sur ce forum:
captureqsn.th.png

Par contre, j'ai un soucis, dés que j'ai une icone sur le bureau, c'est un arbre de Noël, elle clignote en permanence ? Je croyais que l'option double_buffer permettait de résoudre ce problème mais apparemment pas. Si quelqu'un a une idée, elle serait la bienvenue !

Et pour les éléments de mon conky, si ça peut intéresser quelqu'un
pour mon conkyrc:

# -- Conky settings -- #
background no
update_interval 1

cpu_avg_samples 1
net_avg_samples 1

override_utf8_locale yes

double_buffer yes
no_buffers yes             # soustraire la mémoire tampon de la mémoire utiliser

text_buffer_size 2048
imlib_cache_size 0

# Utiliser Xft (polices lissées etc)
use_xft yes
xftalpha .1
override_utf8_locale yes # force UTF8

#police a utiliser : use_xft doit être a "yes"
xftfont Comic Sans MS:size=7#OCR A Std:size=6
# Tout le texte en majuscule
uppercase no

#own_window_type desktop
#own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
own_window no
own_window_transparent yes
own_window_argb_visual yes
own_window_title rings + text widgets

border_inner_margin 0
border_outer_margin 0

minimum_size 230 200
maximum_width 195
alignment top_left

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

default_color 999999
color1 E65E04
color7 FFFFFF

gap_x 20                # ecart avec le bord gauche ou droit
gap_y 700#            # ecart avec le bord haut ou bas

# -- Lua load -- #
lua_load ~/scripts/rings_v2.0.lua
lua_load ~/scripts/text.lua
lua_draw_hook_pre main_rings
lua_draw_hook_post draw_text
TEXT

le rings.lua

--[[ RINGS with SECTORS widget
	v1.0 by wlourf (08.08.2010)
	this widget draws a ring with differents effects 
	http://u-scripts.blogspot.com/2010/08/rings-sectors-widgets.html
	
To call the script in a conky, use, before TEXT
	lua_load /path/to/the/script/rings.lua
	lua_draw_hook_pre main_rings
and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name		- the name of the conky variable to display,
			  for example for {$cpu cpu0}, just write name="cpu"
arg			- the argument of the above variable,
			  for example for {$cpu cpu0}, just write arg="cpu0"
		  	  arg can be a numerical value if name=""
max			- the maximum value the above variable can reach,
			  for example for {$cpu cpu0}, just write max=100
	
Optional parameters:
xc,yc		- coordinates of the center of the ring,
			  default = middle of the conky window
radius		- external radius of the ring, in pixels,
			  default = quarter of the width of the conky window
thickness	- thickness of the ring, in pixels, default = 10 pixels
start_angle	- starting angle of the ring, in degrees, value can be negative,
			  default = 0 degree
end_angle	- ending angle of the ring, in degrees,
			  value must be greater than start_angle, default = 360 degrees
sectors		- number of sectors in the ring, default = 10
gap_sectors - gap between two sectors, in pixels, default = 1 pixel
cap			- the way to close a sector, available values are
				"p" for parallel , default value 
				"r" for radial (follow the radius)
inverse_arc	- if set to true, arc will be anticlockwise, default=false
border_size	- size of the border, in pixels, default = 0 pixel i.e. no border
fill_sector	- if set to true, each sector will be completely filled,
			  default=false, this parameter is inoperate if sectors=1
background	- if set to false, background will not be drawn, default=true
foreground	- if set to false, foreground will not be drawn, default=true

Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table : 
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table : 
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table : 
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}

bg_colour1	- colour table for background,
			  default = {{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
fg_colour1	- colour table for foreground,
			  default = {{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}}
bd_colour1	- colour table for border,
			  default = {{0,0xFFFF00,0.5},{0.5,0xFFFF00,1},{1,0xFFFF00,0.5}}			  

Seconds tables for radials gradients :
bg_colour2	- second colour table for background, default = no second colour
fg_colour2	- second colour table for foreground, default = no second colour
bd_colour2	- second colour table for border, default = no second colour

v1.0 (08 Aug. 2010) original release

]]


require 'cairo'
function conky_main_rings()
-- START PARAMETERS HERE
rings_settings={

--[[	{
	--Ring 1 :seconds
	name="time",
	arg="%S",
	max=60,
	xc=1512,
	yc=145,
	radius=40,
	thickness=10,
	sectors=59,
	gap_sectors=2,
	fill_sector=true,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X09B7A0,0},{0.5,0x09B7A0,1}, {1,0x09B7A0,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
]]
	{
	--ring 2 :cpu0
	name="cpu",
	arg="cpu0",
	max=100,
	xc=375,
	yc=835,
	radius=35,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},

	{
	--ring 2 :cpu1
	name="cpu",
	arg="cpu1",
	max=100,
	xc=375,
	yc=835,
	radius=32,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},

	{
	--ring 2 :cpu2
	name="cpu",
	arg="cpu2",
	max=100,
	xc=450,
	yc=835,
	radius=35,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},

	{
	--ring 2 :cpu3
	name="cpu",
	arg="cpu3",
	max=100,
	xc=450,
	yc=835,
	radius=32,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	
	{
	--ring 3 : memory
	name="memperc",
	arg="",
	max=100,
	xc=525,
	yc=835,
	radius=35,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},

	{
	--ring 4-1 : SWAP
	name="swapperc",
	arg="",
	max=100,
	xc=525,
	yc=835,
	radius=32,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	border_size=0,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	{
	--ring 8-1 : file system usage for /
	name="fs_used_perc",
	arg="/",
	max=100,
	xc=725,
	yc=835,
	radius=35,
	thickness=10,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0XFF0000,1}, {1,0XFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	{
	--ring 8-1 : file system usage for /home
	name="fs_used_perc",
	arg="/home",
	max=100,
	xc=800,
	yc=835,
	radius=35,
	thickness=10,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0XFF0000,1}, {1,0XFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},

	{
	--ring 8-1 : file system usage for /data
	name="fs_used_perc",
	arg="/data",
	max=100,
	xc=875,
	yc=835,
	radius=35,
	thickness=10,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0XFF0000,1}, {1,0XFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	

	{
	--right half ring 5 : upload speed
	name="upspeedf",
	arg="wlan0",
	max=600,
	xc=1075,
	yc=835,
	radius=32,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	
	
	{
	--left half ring 5 : download speed
	name="downspeedf",
	arg="wlan0",
	max=1200,
	xc=1075,
	yc=835,
	radius=35,
	thickness=5,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},	

	{
	--ring 4-1 : temperature
	name="exec",
	arg="sensors | grep 'temp1' | cut -c15-16",
	max=80,
	xc=1150,
	yc=835,
	radius=35,
	thickness=10,
	start_angle=-120,
	end_angle=120,
	border_size=0,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	fg_colour2={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	
	{
	--battery
	name="battery_percent",
	arg="",
	max=100,
	xc=1225,
	yc=835,
	radius=35,
	thickness=10,
	start_angle=-120,
	end_angle=120,
	sectors=10,
	bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
	fg_colour1={{0,0XFF0000,0},{0.5,0xFF0000,1}, {1,0xFF0000,0}},
	fg_colour2={{0,0X5BF444,0},{0.5,0x5BF444,1}, {1,0x5BF444,0}},
	bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
	},
	
			
}
--END OF PARAMETERS HERE

--main function

	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)
	cr=cairo_create(cs)

	if tonumber(conky_parse('${updates}'))>5 then
		for i in pairs(rings_settings) do
			draw_ring(rings_settings[i])
		end
	end

	cairo_destroy(cr)

end




function draw_ring(t)

	local function rgba_to_r_g_b_a(tcolour)
		colour,alpha=tcolour[2],tcolour[3]
		return ((colour / 0x10000) % 0x100) / 255., 
			((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
	end
			
			
	local function calc_delta(tcol1,tcol2)
		--calculate deltas P R G B A to table_colour 1

		for x = 1, #tcol1 do
			tcol1[x].dA	= 0
			tcol1[x].dP = 0
	 		tcol1[x].dR = 0
			tcol1[x].dG = 0
			tcol1[x].dB = 0
			if tcol2~=nil and #tcol1 == #tcol2 then
				local r1,g1,b1,a1 = rgba_to_r_g_b_a(tcol1[x])
				local r2,g2,b2,a2 = rgba_to_r_g_b_a(tcol2[x])
				tcol1[x].dP = (tcol2[x][1]-tcol1[x][1])/t.sectors
		 		tcol1[x].dR = (r2-r1)/t.sectors
				tcol1[x].dG = (g2-g1)/t.sectors
				tcol1[x].dB = (b2-b1)/t.sectors
				tcol1[x].dA = (a2-a1)/t.sectors		
				
			end
		end
		
		return tcol1
	end

	--check values
	local function setup(t)
		if t.name==nil and t.arg==nil then 
			print ("No input values ... use parameters 'name'" +
				" with 'arg' or only parameter 'arg' ") 
			return
		end

		if t.max==nil then
			print ("No maximum value defined, use 'max'")
			print ("for name=" .. t.name)
			print ("with arg=" .. t.arg)
			return
		end
		if t.name==nil then t.name="" end
		if t.arg==nil then t.arg="" end

		if t.xc==nil then t.xc=conky_window.width/2 end
		if t.yc==nil then t.yc=conky_window.height/2 end
		if t.thickness ==nil then t.thickness = 10 end
		if t.radius ==nil then t.radius =conky_window.width/4 end
		if t.start_angle==nil then t.start_angle =0 end
		if t.end_angle==nil then t.end_angle=360 end
		if t.bg_colour1==nil then 
			t.bg_colour1={{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
		end
		if t.fg_colour1==nil then
			t.fg_colour1={{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}}
		end
		if t.bd_colour1==nil then
			t.bd_colour1={{0,0xFFFF00,0.5},{0.5,0xFFFF00,1},{1,0xFFFF00,0.5}}
		end
		if t.sectors==nil then t.sectors=10 end
		if t.gap_sectors==nil then t.gap_sectors=1 end 
		if t.fill_sector==nil then t.fill_sector=false end
		if t.sectors==1 then t.fill_sector=false end
		if t.border_size==nil then t.border_size=0 end
		if t.cap==nil then t.cap="p" end
		--some checks
		if t.thickness>t.radius then t.thickness=t.radius*0.1 end
		t.int_radius = t.radius-t.thickness

		--check colors tables 
		for i=1, #t.bg_colour1 do 
			if #t.bg_colour1[i]~=3 then t.bg_colour1[i]={1,0xFFFFFF,0.5} end
		end
		for i=1, #t.fg_colour1 do 
			if #t.fg_colour1[i]~=3 then t.fg_colour1[i]={1,0xFF0000,1} end
		end
		for i=1, #t.bd_colour1 do 
			if #t.bd_colour1[i]~=3 then t.bd_colour1[i]={1,0xFFFF00,1} end
		end
	
		if t.bg_colour2~=nil then
			for i=1, #t.bg_colour2 do 
				if #t.bg_colour2[i]~=3 then t.bg_colour2[i]={1,0xFFFFFF,0.5} end
			end
		end
		if t.fg_colour2~=nil then
			for i=1, #t.fg_colour2 do 
				if #t.fg_colour2[i]~=3 then t.fg_colour2[i]={1,0xFF0000,1} end
			end
		end
		if t.bd_colour2~=nil then
			for i=1, #t.bd_colour2 do 
				if #t.bd_colour2[i]~=3 then t.bd_colour2[i]={1,0xFFFF00,1} end
			end
		end 	
		
		if t.start_angle>=t.end_angle then
		 local tmp_angle=t.end_angle
		 t.end_angle= t.start_angle
		 t.start_angle = tmp_angle
		 -- print ("inversed angles")
			if t.end_angle-t.start_angle>360 and t.start_angle>0 then
				t.end_angle=360+t.start_angle
				print ("reduce angles")
			end
		
			if t.end_angle+t.start_angle>360 and t.start_angle<=0 then
				t.end_angle=360+t.start_angle
				print ("reduce angles")
			end
		
			if t.int_radius<0 then t.int_radius =0 end
			if t.int_radius>t.radius then
				local tmp_radius=t.radius
				t.radius=t.int_radius
				t.int_radius=tmp_radius
				print ("inversed radius")
			end
			if t.int_radius==t.radius then
				t.int_radius=0
				print ("int radius set to 0")
			end 
		end
		
		t.fg_colour1 = calc_delta(t.fg_colour1,t.fg_colour2)
		t.bg_colour1 = calc_delta(t.bg_colour1,t.bg_colour2)
		t.bd_colour1 = calc_delta(t.bd_colour1,t.bd_colour2)
	end
	
	--initialize table
	setup(t)
	--[[grid
	h=conky_window.height
	w=conky_window.width
	cairo_set_source_rgba(cr,1,1,1,1)
	cairo_set_line_width(cr,0.5)
	cairo_move_to(cr,0,t.yc)
	cairo_line_to(cr,w,t.yc)
	cairo_stroke(cr)
	cairo_move_to(cr,t.xc,0)
	cairo_line_to(cr,t.xc,h)
	cairo_stroke(cr)
	cairo_move_to(cr,t.xc,t.yc)
	cairo_line_to(cr,t.xc+200*math.sin(math.pi/4),t.yc-200*math.cos(math.pi/4))
	cairo_stroke(cr)
	cairo_move_to(cr,0,t.yc-t.radius)
	cairo_line_to(cr,w,t.yc-t.radius)
	cairo_stroke(cr)
	cairo_move_to(cr,0,t.yc-t.int_radius)
	cairo_line_to(cr,w,t.yc-t.int_radius)
	cairo_stroke(cr)
	cairo_move_to(cr,0,t.yc-t.gap_sectors)
	cairo_line_to(cr,w,t.yc-t.gap_sectors)
	cairo_stroke(cr)
	cairo_set_source_rgba(cr,1,0,0,0.5)
	cairo_arc(cr,t.xc,t.yc,t.radius,0,2*math.pi)
	cairo_stroke(cr)
	cairo_arc(cr,t.xc,t.yc,t.int_radius,0,2*math.pi)	
	cairo_stroke(cr)	
	cairo_set_source_rgba(cr,0,1,0,1)	
	cairo_move_to(cr,t.xc+t.gap_sectors,t.yc-t.gap_sectors)
	cairo_line_to(cr,t.xc+400*math.sin(math.pi/4),t.yc-400*math.cos(math.pi/4))
	cairo_stroke(cr)
	--END GRID
	]]
	
	--initialize cairo context
	cairo_save(cr)
	cairo_translate(cr,t.xc,t.yc)
	cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND)
	cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND)

	--get value
	local value = 0
	if t.name ~="" then
		value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
	else
		value = tonumber(t.arg)
	end
	if value==nil then value =0 end

	--initialize sectors
	--angle of a sector :
	angleA = ((t.end_angle-t.start_angle)/t.sectors)*math.pi/180
	--value of a sector : 
	valueA = t.max/t.sectors
	--first angle of a sector : 
	lastAngle = t.start_angle*math.pi/180


	local function draw_sector(type_arc,angle0,angle,valpc, idx)
	 
		--this function draws a portion of arc
	 	--type of arc, angle0 = strating angle, angle= angle of sector,
	 	--valpc = percentage inside the sector, idx = sctor number #
		 if type_arc=="bg" then 		--background
			 if valpc==1 then return end
		 	tcolor=t.bg_colour1
		 elseif type_arc=="fg" then	--foreground
		 	if valpc==0 then return end
		 	tcolor=t.fg_colour1
		 elseif type_arc=="bd" then	--border
		 	tcolor=t.bd_colour1
		 end 

		--angles equivalents to gap_sector
		local ext_delta=math.atan(t.gap_sectors/(2*t.radius))
		local int_delta=math.atan(t.gap_sectors/(2*t.int_radius))

		--angles of arcs
		local ext_angle=(angle-ext_delta*2)*valpc
		local int_angle=(angle-int_delta*2)*valpc

		--define colours to use for this sector
		if #tcolor==1 then 
			--plain color
			local vR,vG,vB,vA = rgba_to_r_g_b_a(tcolor[1])
			cairo_set_source_rgba(cr,vR+tcolor[1].dR*idx,
									vG+tcolor[1].dG*idx,
									vB+tcolor[1].dB*idx,
									vA+tcolor[1].dA*idx	)
		else
			--radient color
			local pat=cairo_pattern_create_radial(0,0,t.int_radius,0,0,t.radius)
			for i=1, #tcolor do
				local vP,vR,vG,vB,vA = tcolor[i][1], rgba_to_r_g_b_a(tcolor[i])
				cairo_pattern_add_color_stop_rgba (pat, 
									vP+tcolor[i].dP*idx,
									vR+tcolor[i].dR*idx,
									vG+tcolor[i].dG*idx,
									vB+tcolor[i].dB*idx,
									vA+tcolor[i].dA*idx	)
			end
			cairo_set_source (cr, pat)
			cairo_pattern_destroy(pat)
		end

		--start drawing
		 cairo_save(cr)
		--x axis is parrallel to start of sector
		cairo_rotate(cr,angle0-math.pi/2)

		local ri,re = t.int_radius ,t.radius

		--point A 
		local angle_a
	
		if t.cap == "p" then 
			angle_a = int_delta
			if t.inverse_arc and type_arc ~="bg" then
				angle_a = angle-int_angle-int_delta
			end
			if not(t.inverse_arc) and type_arc =="bg" then
				angle_a = int_delta+int_angle
			end
		else --t.cap=="r"
			angle_a = ext_delta
			if t.inverse_arc and type_arc~="bg" then
				angle_a = angle-ext_angle-ext_delta
			end
			if not(t.inverse_arc) and type_arc=="bg" then
				angle_a = ext_delta+ext_angle
			end
		end
		local ax,ay = ri*math.cos(angle_a),ri*math.sin(angle_a)


		--point B
		local angle_b = ext_delta
		if t.cap == "p" then 
			if t.inverse_arc and type_arc ~="bg" then
				angle_b = angle-ext_angle-ext_delta
			end
			if not(t.inverse_arc) and type_arc=="bg" then
				angle_b = ext_delta+ext_angle
			end
		else
			if t.inverse_arc and type_arc ~="bg" then
				angle_b = angle-ext_angle-ext_delta
			end
			if not(t.inverse_arc) and type_arc=="bg" then
				angle_b = ext_delta+ext_angle
			end
		end
		local bx,by = re*math.cos(angle_b),re*math.sin(angle_b)

		-- EXTERNAL ARC B --> C
		if t.inverse_arc then
			if type_arc=="bg" then
				b0,b1= ext_delta, angle-ext_delta-ext_angle
			else
				b0,b1= angle-ext_angle-ext_delta, angle-ext_delta
			end
		else
			if type_arc=="bg" then
				b0,b1= ext_delta+ext_angle, angle-ext_delta
			else
				b0,b1= ext_delta, ext_angle+ext_delta
			end
		end
		
		---POINT D
		local angle_c 
		if t.cap == "p" then 
			angle_d = angle-int_delta
			if t.inverse_arc and type_arc=="bg" then
				angle_d = angle-int_delta-int_angle	
			end
			if not(t.inverse_arc) and type_arc~="bg" then
				angle_d=int_delta+int_angle
			end
		else
			angle_d = angle-ext_delta
			if t.inverse_arc and type_arc=="bg" then
				angle_d =angle-ext_delta-ext_angle
			end
			if not(t.inverse_arc) and type_arc~="bg" then
				angle_d = ext_angle+ext_delta
			end
		end
		local dx,dy = ri*math.cos(angle_d),ri*math.sin(angle_d)
		
		-- INTERNAL ARC D --> A
		if t.cap=="p" then	
			if t.inverse_arc then	
				if type_arc=="bg" then
					d0,d1= angle-int_delta-int_angle,int_delta
				else
					d0,d1= angle-int_delta, angle- int_angle-int_delta
				end
			else
				if type_arc=="bg" then
					d0,d1= angle-int_delta, int_delta+int_angle
				else
					d0,d1= int_delta+int_angle, int_delta
				end
			end
		else
			if t.inverse_arc then	
				if type_arc=="bg" then	
					d0,d1= angle-ext_delta-ext_angle,ext_delta
				else
					d0,d1= angle-ext_delta, angle- ext_angle-ext_delta
				end
			else
				if type_arc=="bg" then	
					d0,d1= angle-ext_delta,ext_delta+ext_angle
				else	
					d0,d1= ext_angle+ext_delta, ext_delta
				end
			end			
		end
			
		--draw sector
		cairo_move_to(cr,ax,ay)
		cairo_line_to(cr,bx,by)
		cairo_arc(cr,0,0,re,b0,b1)
		cairo_line_to(cr,dx,dy) 
		cairo_arc_negative(cr,0,0,ri,d0,d1)
		 cairo_close_path (cr);

		--stroke or fill sector
		 if type_arc=="bd" then
		 	cairo_set_line_width(cr,t.border_size)
		 	cairo_stroke(cr)
		 else
			 cairo_fill(cr)
		 end

		 cairo_restore(cr)

	 end
	--draw sectors
	local n0,n1,n2 = 1,t.sectors,1
	if t.inverse_arc then n0,n1,n2 = t.sectors,1,-1 end
	local index = 0
	for i = n0,n1,n2 do 
		index = index +1
		local valueZ=1
		local cstA, cstB = (i-1),i
		if t.inverse_arc then cstA,cstB = (t.sectors-i), (t.sectors-i+1) end
		
		if value>valueA *cstA and value<valueA*cstB then
			if not t.fill_sector then
				valueZ = (value-valueA*cstA)/valueA
			end
		else
			if value<valueA*cstB then valueZ=0 end
		end
		
		local start_angle= lastAngle+(i-1)*angleA
		if t.foreground ~= false then 
			draw_sector("fg",start_angle,angleA,valueZ, index)
		end
		if t.background ~= false then 
			draw_sector("bg",start_angle,angleA,valueZ, i)
		end
		if t.border_size>0 then draw_sector("bd",start_angle,angleA,1, i) end
	end

	cairo_restore(cr)
end


--[[END OF RING-SECTORS WIDGET]]


function axis(ctx,alpha)
	cairo_set_line_width(ctx,1)
	cairo_set_source_rgba(ctx,1,0,0,alpha)
	cairo_move_to(ctx,0,0)
	cairo_line_to(ctx,150,0)
	cairo_stroke(ctx)
	cairo_set_source_rgba(ctx,0,1,0,alpha)
	cairo_move_to(ctx,0,0)
	cairo_line_to(ctx,0,150)
	cairo_stroke(ctx)
end

le text.lua

--[[TEXT WIDGET v1.3 by Wlourf 25/06/2010
This widget can drawn texts set in the "text_settings" table with some parameters
http://u-scripts.blogspot.com/2010/06/text-widget.html

The parameters (all optionals) are :
text        - text to display, default = "Conky is good for you"
			  use conky_parse to display conky value ie text=conly_parse("${cpu cpu1}")
            - coordinates below are relative to top left corner of the conky window
x           - x coordinate of first letter (bottom-left), default = center of conky window
y           - y coordinate of first letter (bottom-left), default = center of conky window
h_align		- horizontal alignement of text relative to point (x,y), default="l"
			  available values are "l": left, "c" : center, "r" : right
v_align		- vertical alignment of text relative to point (x,y), default="b"
			  available values "t" : top, "m" : middle, "b" : bottom
font_name   - name of font to use, default = Free Sans
font_size   - size of font to use, default = 14
italic      - display text in italic (true/false), default=false
oblique     - display text in oblique (true/false), default=false (I don' see the difference with italic!)
bold        - display text in bold (true/false), default=false
angle       - rotation of text in degrees, default = 0 (horizontal)
colour      - table of colours for text, default = plain white {{1,0xFFFFFF,1}}
			  this table contains one or more tables with format {P,C,A}
              P=position of gradient (0 = beginning of text, 1= end of text)
              C=hexadecimal colour 
              A=alpha (opacity) of color (0=invisible,1=opacity 100%)
              Examples :
              for a plain color {{1,0x00FF00,0.5}}
              for a gradient with two colours {{0,0x00FF00,0.5},{1,0x000033,1}}
              or {{0.5,0x00FF00,1},{1,0x000033,1}} -with this one, gradient will start in the middle of the text
              for a gradient with three colours {{0,0x00FF00,0.5},{0.5,0x000033,1},{1,0x440033,1}}
			  and so on ...
orientation	- in case of gradient, "orientation" defines the starting point of the gradient, default="ww"
			  there are 8 available starting points : "nw","nn","ne","ee","se","ss","sw","ww"
			  (n for north, w for west ...)
			  theses 8 points are the 4 corners + the 4 middles of text's outline
			  so a gradient "nn" will go from "nn" to "ss" (top to bottom, parallele to text)
			  a gradient "nw" will go from "nw" to "se" (left-top corner to right-bottom corner)
radial		- define a radial gradient (if present at the same time as "orientation", "orientation" will have no effect)
			  this parameter is a table with 6 numbers : {xa,ya,ra,xb,yb,rb}
			  they define two circle for the gradient :
			  xa, ya, xb and yb are relative to x and y values above
reflection_alpha    - add a reflection effect (values from 0 to 1) default = 0 = no reflection
                      other values = starting opacity
reflection_scale    - scale of the reflection (default = 1 = height of text)
reflection_length   - length of reflection, define where the opacity will be set to zero
					  calues from 0 to 1, default =1
skew_x,skew_y    - skew text around x or y axis
			  

Needs conky 1.8.0 

To call this script in the conkyrc, in before-TEXT section:
    lua_load /path/to/the/lua/script/text.lua
    lua_draw_hook_pre draw_text
 
v1.0	07/06/2010, Original release
v1.1	10/06/2010	Add "orientation" parameter
v1.2	15/06/2010  Add "h_align", "v_align" and "radial" parameters
v1.3	25/06/2010  Add "reflection_alpha", "reflection_length", "reflection_scale", 
                    "skew_x" et "skew_y"


]]
require 'cairo'

function conky_draw_text()
	--BEGIN OF PARAMETRES
    text_settings={

--[[		{
			text=conky_parse("${time %H:%M}"),
			font_name="Ubuntu",
			font_size=16,
			h_align="c",
			bold=true,
			x=1512,
			y=150,
			colour={{1,0xFFFFFF,1}},
		},
]]		
		{
			text="Core 1",
			font_name="Comic Sans MS",
			font_size=13,
			h_align="c",
			bold=true,
			x=375,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

		{
			text=conky_parse("${cpu cpu1} %"),
			font_name="Comic Sans MS",
			font_size=10,
			h_align="c",
			bold=false,
			x=375,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

		{
			text="Core 2",
			font_name="Comic Sans MS",
			font_size=13,
			h_align="c",
			bold=true,
			x=450,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

		{
			text=conky_parse("${cpu cpu3} %"),
			font_name="Comic Sans MS",
			font_size=10,
			h_align="c",
			bold=false,
			x=450,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

		{
			text="Memory",
			font_name="Comic Sans MS",
			font_size=12,
			h_align="c",
			bold=false,
			x=525,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

		{
			text=conky_parse("$memperc %"),
			font_name="Comic Sans MS",
			font_size=10,
			h_align="c",
			bold=false,
			x=525,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

--[[
		{
			text="Use",
			font_name="Comic Sans MS",
			font_size=12,
			h_align="c",
			bold=false,
			x=505,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
]]
		{
			text=conky_parse("Ram : $mem / $memfree / $memmax" ),
			font_name="Comic Sans MS",
			font_size=10,
			h_align="c",
			bold=false,
			x=455,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
--[[
		{
			text="Free",
			font_name="Comic Sans MS",
			font_size=12,
			h_align="c",
			bold=false,
			x=505,
			y=890,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		
		{
			text=conky_parse("$memfree"),
			font_name="Comic Sans MS",
			font_size=10,
			h_align="c",
			bold=false,
			x=545,
			y=890,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
]]				
		{
			text="/",
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=true,
			x=725,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		{
			text=conky_parse("${fs_used_perc /} %"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=725,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		{
			text=conky_parse("${fs_free /}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=725,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
				
		{
			text="/home",
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=true,
			x=800,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		{
			text=conky_parse("${fs_used_perc /home} %"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=800,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
--[[
		{
			text=conky_parse("${fs_size /home}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=800,
			y=890,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
]]
		{
			text=conky_parse("${fs_free /home}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=800,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
				
		{
			text="/data",
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=true,
			x=875,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		{
			text=conky_parse("${fs_used_perc /data} %"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=875,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		{
			text=conky_parse("${fs_free /data}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=875,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},		
		
		{
			text=conky_parse("${downspeedf wlan0}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=1075,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},						
		{
			text="Net",
			font_name="Ubuntu",
			font_size=12,
			h_align="c",
			bold=true,
			x=1075,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},
		{
			text=conky_parse("Down ${totaldown wlan0} Up ${totalup wlan0} batterie ${battery_time}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			x=1150,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	

		{
			text="temp",
			font_name="Comic Sans MS",
			font_size=12,
			h_align="c",
			bold=true,
			x=1150,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${exec sensors | grep 'temp1' | cut -c15-16}°C"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=false,
			x=1150,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},			

		{
			text="Battery",
			font_name="Comic Sans MS",
			font_size=12,
			h_align="c",
			bold=true,
			x=1225,
			y=860,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${battery_percent}%"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=false,
			x=1225,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
--[[		
		{
			text=conky_parse("${battery_time}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=false,
			x=1225,
			y=875,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
]]		
		{
			text=conky_parse("                           id      Mem  Cpu"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=120,
			y=805,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${top_mem name 1}${top_mem pid 1}${top_mem mem 1}${top_mem cpu 1}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=200,
			y=820,
			colour={{0,0XFF0000,0.5},{0.5,0xFF0000,1}, {1,0xFF0000,0.5}},
		},		
		
		{
			text=conky_parse("${top_mem name 2}${top_mem pid 2}${top_mem mem 2}${top_mem cpu 2}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=200,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${top_mem name 3}${top_mem pid 3}${top_mem mem 3}${top_mem cpu 3}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=200,
			y=850,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
			
		
		{
			text=conky_parse("${top_mem name 4}${top_mem pid 4}${top_mem mem 4}${top_mem cpu 4}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=200,
			y=865,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${top_mem name 5}${top_mem pid 5}${top_mem mem 5}${top_mem cpu 5}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=200,
			y=880,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},

		{
			text=conky_parse("${execi 86400 lsb_release -si} ${execi 86400 lsb_release -sr} ${execi 86400 lsb_release -sc}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=false,
			x=450,
			y=890,
			colour={{0,0XFF0000,0.5},{0.5,0x5BF444,1}, {1,0xFF0000,0.5}},
		},	
		
		{
			text=conky_parse("$sysname $kernel $machine"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=false,
			x=800,
			y=890,
			colour={{0,0XFF0000,0.5},{0.5,0x5BF444,1}, {1,0xFF0000,0.5}},
		},	
		
		{
			text=conky_parse("Uptime $uptime"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="c",
			bold=false,
			x=1150,
			y=890,
			colour={{0,0XFF0000,0.5},{0.5,0x5BF444,1}, {1,0xFF0000,0.5}},
		},	
		
		{
			text=conky_parse("                       id      Cpu    Mem"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=1520,
			y=805,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=1590,
			y=820,
			colour={{0,0XFF0000,0.5},{0.5,0xFF0000,1}, {1,0xFF0000,0.5}},
		},		
		
		{
			text=conky_parse("${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=1590,
			y=835,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=1590,
			y=850,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
			
		
		{
			text=conky_parse("${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=1590,
			y=865,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},	
		
		{
			text=conky_parse("${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}"),
			font_name="Comic Sans MS",
			font_size=11,
			h_align="r",
			bold=false,
			x=1590,
			y=880,
			colour={{0,0X999999,0.5},{0.5,0x999999,1}, {1,0x999999,0.5}},
		},						
			
    }
	
 
           
    
    
--------------END OF PARAMETERES----------------
    if conky_window == nil then return end
    if tonumber(conky_parse("$updates"))<3 then return end
       
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)

    for i,v in pairs(text_settings) do    
        cr = cairo_create (cs)
        display_text(v)
        cairo_destroy(cr)
    end
    
    cairo_surface_destroy(cs)
    


end

function rgb_to_r_g_b2(tcolour)
    colour,alpha=tcolour[2],tcolour[3]
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function display_text(t)

    local function set_pattern()
        --this function set the pattern
        if #t.colour==1 then 
            cairo_set_source_rgba(cr,rgb_to_r_g_b2(t.colour[1]))
        else
            local pat
            
            if t.radial==nil then
                local pts=linear_orientation(t,te)
                pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
            else
                pat = cairo_pattern_create_radial (t.radial[1],t.radial[2],t.radial[3],t.radial[4],t.radial[5],t.radial[6])
            end
        
            for i=1, #t.colour do
                cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgb_to_r_g_b2(t.colour[i]))
            end
            cairo_set_source (cr, pat)
        end
    end
    
    --set default values if needed
    if t.text==nil then t.text="Conky is good for you !" end
    if t.x==nil then t.x = conky_window.width/2 end
    if t.y==nil then t.y = conky_window.height/2 end
    if t.colour==nil then t.colour={{1,0xFFFFFF,1}} end
    if t.font_name==nil then t.font_name="Free Sans" end
    if t.font_size==nil then t.font_size=14 end
    if t.angle==nil then t.angle=0 end
    if t.italic==nil then t.italic=false end
    if t.oblique==nil then t.oblique=false end
    if t.bold==nil then t.bold=false end
    if t.radial ~= nil then
        if #t.radial~=6 then 
            print ("error in radial table")
            t.radial=nil 
        end
    end
    if t.orientation==nil then t.orientation="ww" end
    if t.h_align==nil then t.h_align="l" end
    if t.v_align==nil then t.v_align="b" end    
    if t.reflection_alpha == nil then t.reflection_alpha=0 end
    if t.reflection_length == nil then t.reflection_length=1 end
    if t.reflection_scale == nil then t.reflection_scale=1 end
    if t.skew_x==nil then t.skew_x=0 end
    if t.skew_y==nil then t.skew_y=0 end    
    cairo_translate(cr,t.x,t.y)
    cairo_rotate(cr,t.angle*math.pi/180)
    cairo_save(cr)       
     
 

    local slant = CAIRO_FONT_SLANT_NORMAL
    local weight =CAIRO_FONT_WEIGHT_NORMAL
    if t.italic then slant = CAIRO_FONT_SLANT_ITALIC end
    if t.oblique then slant = CAIRO_FONT_SLANT_OBLIQUE end
    if t.bold then weight = CAIRO_FONT_WEIGHT_BOLD end
    
    cairo_select_font_face(cr, t.font_name, slant,weight)
 
    for i=1, #t.colour do    
        if #t.colour[i]~=3 then 
            print ("error in color table")
            t.colour[i]={1,0xFFFFFF,1} 
        end
    end

    local matrix0 = cairo_matrix_t:create()
    skew_x,skew_y=t.skew_x/t.font_size,t.skew_y/t.font_size
    cairo_matrix_init (matrix0, 1,skew_y,skew_x,1,0,0)
    cairo_transform(cr,matrix0)
    cairo_set_font_size(cr,t.font_size)
    te=cairo_text_extents_t:create()
    cairo_text_extents (cr,t.text,te)
    
    set_pattern()


            
    mx,my=0,0
    
    if t.h_align=="c" then
        mx=-te.width/2
    elseif t.h_align=="r" then
        mx=-te.width
    end
    if t.v_align=="m" then
        my=-te.height/2-te.y_bearing
    elseif t.v_align=="t" then
        my=-te.y_bearing
    end
    cairo_move_to(cr,mx,my)
    
    cairo_show_text(cr,t.text)

     
        
        
   if t.reflection_alpha ~= 0 then 
        local matrix1 = cairo_matrix_t:create()
        cairo_set_font_size(cr,t.font_size)

        cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(te.height+te.y_bearing+my)*(1+t.reflection_scale))
        cairo_set_font_size(cr,t.font_size)
        te=cairo_text_extents_t:create()
        cairo_text_extents (cr,t.text,te)
        
                
        cairo_transform(cr,matrix1)
        set_pattern()
        cairo_move_to(cr,mx,my)
        cairo_show_text(cr,t.text)

        local pat2 = cairo_pattern_create_linear (0,
                                        (te.y_bearing+te.height+my),
                                        0,
                                        te.y_bearing+my)
        cairo_pattern_add_color_stop_rgba (pat2, 0,1,0,0,1-t.reflection_alpha)
        cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)    
        
        
        cairo_set_line_width(cr,1)
        dy=te.x_bearing
        if dy<0 then dy=dy*(-1) end
        cairo_rectangle(cr,mx+te.x_bearing,te.y_bearing+te.height+my,te.width+dy,-te.height*1.05)
        cairo_clip_preserve(cr)
        cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
        --cairo_stroke(cr)
        cairo_mask(cr,pat2)
        cairo_pattern_destroy(pat2)
        cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
    end
    
end


function linear_orientation(t,te)
    local w,h=te.width,te.height
    local xb,yb=te.x_bearing,te.y_bearing
    
    if t.h_align=="c" then
        xb=xb-w/2
    elseif t.h_align=="r" then
        xb=xb-w
       end    
    if t.v_align=="m" then
        yb=-h/2
    elseif t.v_align=="t" then
        yb=0
       end    
       
    if t.orientation=="nn" then
        p={xb+w/2,yb,xb+w/2,yb+h}
    elseif t.orientation=="ne" then
        p={xb+w,yb,xb,yb+h}
    elseif t.orientation=="ww" then
        p={xb,h/2,xb+w,h/2}
    elseif vorientation=="se" then
        p={xb+w,yb+h,xb,yb}
    elseif t.orientation=="ss" then
        p={xb+w/2,yb+h,xb+w/2,yb}
    elseif vorientation=="ee" then
        p={xb+w,h/2,xb,h/2}        
    elseif t.orientation=="sw" then
        p={xb,yb+h,xb+w,yb}
    elseif t.orientation=="nw" then
        p={xb,yb,xb+w,yb+h}
    end
    return p
end

le conkyrc_meteo

background no
use_xft yes
xftfont Sans:size=9
xftalpha 0.8
update_interval 1
double_buffer yes

draw_shades yes
draw_outline no
background yes                # pour que conky tourne en arriere plan "no" pour les tests
own_window yes                # utiliser sa propre fenetre
own_window_transparent yes        # transparence
own_window_type override # yes        # type de fenetre normal "override / desktop"

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_colour black

use_spacer left                # ? fonctionne uniquement avec la police Monospace
override_utf8_locale yes        # dépassement caractères accentués
use_xft yes                # utilise les polices lissées
font Comic Sans MS:bold:size=8    # police et taille a utiliser
xftfont Comic Sans MS:bold:size=8    # police et taille a utiliser
xftalpha 0.8                #
update_interval 4#5.1            # taux de raffraichissement de la fenetre en secondes
uppercase no                 # majuscule
stippled_borders 2#0             # longueur d'un trait en pixels
#border_margin 6 #2            # largeur des marges
border_width 1 #2            # largeur du contour
default_outline_color black        # couleur par defaut du contour
default_shade_color black        # couleur par defaut de l'ombre
draw_borders no                # afficher les contours autour des blocs de texte
draw_outline no#yes             # afficher les contours texte
draw_shades yes             # afficher les ombres
default_color DCDCDC             # couleur par défaut du texte
# ********      couleurs ci-dessous utilisées dans le script
color0 FF000C            # définition des couleurs "0 - 1 - 2 -3 - ect..
color1 708094            #
color2 E7E1D6            #
color3 ffcb48            #
color4 0000fa            #
color5 778899            #
#7FFFD4 #Aquamarine
#CD5C5C #IndianRed #00CED1 DarkTurquoise #FFA07A LightSalmon #00FFFF Cyan 
#FF8C00 #Darkorange #D2691E #Chocolate
#7FFF00 #Chartreuse
#778899 #LightSlateGrey
#FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue        
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
# *******
minimum_size 100        # taille mini
maximum_width 205        # largeur maxi
alignment top_right        # Position sur l'écran : top_left (haut gauche), top_right (haut droit), bottom_left (bas gauche), bottom_right (bas droit)
gap_x 10                # ecart avec le bord gauche ou droit
gap_y 75#            # ecart avec le bord haut ou bas

text_buffer_size 2048#1536#6144     # Augmente la taille de la mémoire tampon de 128k a 1024k
no_buffers yes             # soustraire la mémoire tampon de la mémoire utiliser
short_units yes
pad_percents 2            # commande à conky de n'afficher pour les pourcentages que 2 chiffres après la virgule (ou le point)

imlib_cache_size 0    Taille du cache image pour Imlib2, en bytes. Defini à 4MiB par défaut. Augmentez la valeur si vous utilisez souvent $image

TEXT
${execpi 1800 conkyForecast --location=FRXX0076 --template=/home/nico/.conkyrc_template}

le conkyrc_template utilisé dans la météo

${alignc}${color2}${font Comic Sans MS:style=Bold:size=9}Paris
${alignc}${color2}${voffset -5}${font Comic Sans MS:size=8}${alignc}Dernière mise à jour
${alignc}[datatype=LU]
${color2}${hr}
${image [--datatype=WI] -p 10,50 -s 70x70}
${voffset 50}${goto 40}${color2}[--datatype=HT --hideunits --centeredwidth=3]/[--datatype=LT --hideunits --centeredwidth=3]
#${image [--datatype=BI] -p 18,165 -s 50x50}
#${voffset 60}${goto 25}${color2}[--datatype=WS --imperial] - [--datatype=WD]
${voffset -70}${goto 100}${color2}${font Ubuntu:style=Bold:size=9}[--datatype=CT]${font}
${voffset -10}
${goto 100}${color5}Pluie ${color2}${alignr}[--datatype=PC --startday=0]
${goto 100}${color5}Humidité ${color2}${alignr}[--datatype=HM]
${goto 100}${color5}Hpa ${color2}${alignr}[--datatype=BR]
${goto 100}${color5}Matin ${color2}${alignr}[--datatype=SR]
${goto 100}${color5}Soir ${color2}${alignr}[--datatype=SS]
${image [--datatype=MI] -p 20,168 -s 50x50}
${color2}${goto 100}${font Ubuntu:style=Bold:size=9}[--datatype=MP]${font}
${color2}${hr}
${goto 20}[--datatype=DW --shortweekday --startday=1]${goto 100}[--datatype=DW --shortweekday --startday=2]${goto 180}[--datatype=DW --shortweekday --startday=3]
${image [--datatype=WI --startday=1] -p 10,240 -s 30x30}${image [--datatype=WI --startday=2] -p 90,240 -s 30x30}${image [--datatype=WI --startday=3] -p 170,240 -s 30x30}

${font Ubuntu:bold:size=7}${voffset 7}${goto 15}${color3}[--datatype=HT --startday=1 --hideunits --centeredwidth=3]/[--datatype=LT --startday=1 --hideunits --centeredwidth=3]${goto 95}[--datatype=HT --startday=2 --hideunits --centeredwidth=3]/[--datatype=LT --startday=2 --hideunits --centeredwidth=3]${goto 175}[--datatype=HT --startday=3 --hideunits --centeredwidth=3]/[--datatype=LT --startday=3 --hideunits --centeredwidth=3]

Dernière modification par nik75011 (Le 08/10/2010, à 08:07)


Simple Comme Ubuntu --> http://www.framabook.org/ubuntu.html
Documentation géniale --> http://doc.ubuntu-fr.org/

Hors ligne

#3097 Le 08/10/2010, à 09:49

Levi59

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

fouduroi a écrit :

merci bien a toi pour la cg mais pour les hdd ça marche toujours pas!

As tu fait :

sudo dpkg-reconfigure hddtemp

en console pour autoriser l'utilisation en simple utilisateur?

Hors ligne

#3098 Le 08/10/2010, à 10:40

Fenouille84

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonjour à tous smile

Petite mise à jour pour le script listant les fenêtres.
Voici le code pour n'afficher que le "type" de fenêtre (par exemple : gedit, mozilla firefox, navigateur de fichier...)

Pour cela, il faut remplacer :

  desktop=$(wmctrl -l -p | grep "  $num " | sed 's/^.*  '"$num"'/ /g ; s/'"$nompc"'//g' | cut -d "-" -f1)

Par :

  desktop=$(wmctrl -l -p | grep "  $num " | sed 's/^.*  '"$num"'/ /g ; s/'"$nompc"'.*-.//g ; s/'"$nompc"'.//g')


..::: Edit :::..
J'ai mis à jour et complété mon précédent post.

Dernière modification par Fenouille84 (Le 08/10/2010, à 11:05)


Ma page Deviant Art : conky inside ;-)
.
-- DropBox (online backup) : 2Go + 250 Mo pour vous et moi par parrainage --

Hors ligne

#3099 Le 08/10/2010, à 11:57

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

nik75011 a écrit :

Bonjour,

alors voilà pour ma réalisation grâce à tous les trucs et astuces disponibles sur ce forum:
http://img202.imageshack.us/img202/2783 … qsn.th.png

Par contre, j'ai un soucis, dés que j'ai une icone sur le bureau, c'est un arbre de Noël, elle clignote en permanence ? Je croyais que l'option double_buffer permettait de résoudre ce problème mais apparemment pas. Si quelqu'un a une idée, elle serait la bienvenue !

Essaye en changeant la valeur de own_window, de :

own_window no

tu la mets à

own_window yes

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

Hors ligne

#3100 Le 08/10/2010, à 13:36

nik75011

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

bonjour cheploq,

ça ne marche plus du tout avec cette option à yes


Simple Comme Ubuntu --> http://www.framabook.org/ubuntu.html
Documentation géniale --> http://doc.ubuntu-fr.org/

Hors ligne