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.

#1051 Le 03/08/2015, à 10:01

enebre

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

bonjour,
Je viens d'installer conky sur un vieux pc, auquel j'ai désactivé le compositeur, mais dans ce cas je n'ai plus de transparence du conky, qui m'apparait avec un fond noir de noir; c'est très laid.

Y a t il une possibilité d'avoir cette transparence sans le compositeur activé et/ou avoir une couleur définie en fond de conky ?

merci

background true
use_xft yes
xftfont Sans:size=7
xftalpha 0.5
update_interval 10
#total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 70
#own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager,below
double_buffer yes
minimum_size 280 800
maximum_width 280
text_buffer_size 512
#draw_shades no
#draw_outline no
#draw_borders no
draw_graph_borders yes
default_color white
#default_shade_color black
#default_outline_color white
alignment tr
short_units
gap_x 5
gap_y 37
no_buffers yes
#uppercase no
cpu_avg_samples 2
net_avg_samples 2
#override_utf8_locale yes
color1                white
color2                white
color3                green
color4                green
color5 	9dff00
color6	orange
color7	787878
# Lua Load  #
#lua_load ~/.conky/ring.lua
#lua_draw_hook_pre clock_rings
#${color3}${font Sans:size=30}${alignc}${time %H}${time :%M}
TEXT
${font Sans:size=9}${color3}host: ${color2}${font caviar dreams:size=9}${color}Ombre-HP${offset 20}${font caviar dreams:size=9,weight:bold}"Voyager-8-X"
${font Sans:size=9}${color3}Mails :
${color1}${font caviar dreams:size=10}${offset 50}${voffset -17}ombre 
${voffset -14 }${font caviar dreams:size=9}${offset 100}${execpi 300 /home/ombre/.conky/conky-perso/gmail_generic.sh }
${offset 120}${font caviar dreams:size=10}${voffset -15} demol.marc 
${voffset -12 }${font caviar dreams:size=9}${offset 210}${execpi 300 /home/ombre/.conky/conky-perso/gmail_generic1.sh }
${font Sans:size=9}${color3}Kernel: ${color2}$kernel
${color3}Uptime:${color2} $uptime
${color3}Processus: ${color2} $processes${color3}${alignr}En cours: ${color2} $running_processes
#${color3}System Updates: $color2${execi 3600 apt-get search "~U" | wc -l | tail}
${font Ubuntu:pixelsize=12}${color2}Cpu: ${color3}${hr}${font caviar dreams:size=9,weight:normal}
${color3}Freq : ${color2}${freq_g} GHz  ${color3}  #sda: ${color2}${exec expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000} $alignc${color3}CPU: ${color2}${execi 10 hddtemp -n /dev/sda} °C

${color3}Core 1:${color2} ${cpu cpu0}%${goto 90}${color4}${cpubar cpu0 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000}${color2}
${color3}Core 2:${color2} ${cpu cpu1}%${goto 90}${color4}${cpubar cpu0 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}${color2}
#${color3}Core 3:${color2} ${cpu cpu2}%${goto 90}${color4}${cpubar cpu1 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}${color2}
#${color3}Core 4:${color2} ${cpu cpu3}%${goto 90}${color4}${cpubar cpu2 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon1/temp3_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon1/temp3_input` / 1000}${color2}
#${voffset 5}${color3}${cpugraph cpu1 13,120 9dff00 ffff66}$alignr${cpugraph cpu2 13,120 9dff00 ffff66}
#${voffset 2}${color}${font caviar dreams:size=9,weight:normal}${goto 30}graph cpu 1${goto 190}graph cpu 2
${voffset 4}${font Ubuntu:pixelsize=12}${color2}Mémoire: ${color3}${hr}${font caviar dreams:size=10,weight:normal}
${goto 10}${color3}Ram:${font caviar dreams:size=9,weight:normal}${color2} $mem/$memmax ${goto 165}${memperc}%${goto 195}${color4}${membar}${color2}${font caviar dreams:size=10,weight:normal}
${goto 10}${color3}Swap:${font caviar dreams:size=9,weight:normal}${color2} ${swap} / ${swapmax} ${goto 165}${swapperc}%${goto 195}${color4}${swapbar}
#${voffset -2}${goto 165}${font caviar dreams:size=9,weight:normal}${color2}graph mémoire
${voffset -1}${font Ubuntu:pixelsize=12}${color2}Espace Disque:${color3}${hr}${font caviar dreams:size=9,weight:normal}
${goto 15}${color3}/ ${color2}${goto 50}${fs_used /} / ${fs_size /} ${goto 165}${fs_used_perc /}% ${goto 195}${color4}${fs_bar /}\

# ${if_existing /media/marc/Drive-n-go}${voffset 15}${goto 15}${color3}D-n-g ${color2}${goto 50}${fs_used /media/marc/Drive-n-go} / ${fs_size /media/marc/Drive-n-go} ${goto 165}${fs_used_perc /media/marc/Drive-n-go}% ${goto 195}${color4}${fs_bar /media/marc/Drive-n-go}${endif}\
# ${if_existing /media/ombre/data}${voffset 15}${goto 15}${color3}data ${color2}${goto 50}${fs_used /media/ombre/data} / ${fs_size /media/ombre/data} ${goto 165}${fs_used_perc /media/ombre/data}% ${goto 195}${color4}${fs_bar /media/ombre/data}${endif}
# ${voffset -3}${goto 165}${font caviar dreams:size=9,weight:normal}${color2}graph usage disk
${font Ubuntu:pixelsize=12}${color2}${color}Charge: ${color3}${hr}${font caviar dreams:size=9}
Processus$alignr PID   CPU   MEM${color5}
  ${top name 1} $alignr${top pid 1} ${top cpu 1} ${top mem 1}
  ${top name 2} $alignr${top pid 2} ${top cpu 2} ${top mem 2}
  ${top name 3} $alignr${top pid 3} ${top cpu 3} ${top mem 3}
  ${top name 4} $alignr${top pid 4} ${top cpu 4} ${top mem 4}
  ${top name 5} $alignr${top pid 5} ${top cpu 5} ${top mem 5}
  ${top name 6} $alignr${top pid 6} ${top cpu 6} ${top mem 6}
  ${top name 7} $alignr${top pid 7} ${top cpu 7} ${top mem 7}
  ${top name 8} $alignr${top pid 8} ${top cpu 8} ${top mem 8}
  ${top name 9} $alignr${top pid 9} ${top cpu 9} ${top mem 9}
${color3}Mémoire$alignr PID   CPU   MEM${color5}
  ${top_mem name 1} $alignr${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
  ${top_mem name 2} $alignr${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
  ${top_mem name 3} $alignr${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
  ${top_mem name 4} $alignr${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
#${exec tail -n1 -f /var/log/syslog | grep note | cut -d "=" -f2}
#${exec cat tail -n1 -f /var/log/boot.log | cut -d "=" -f2} erreur
${voffset 3}${font Ubuntu:pixelsize=12}${color2}${if_existing /sys/class/net/eth0/operstate up}Réseau: ${font caviar dreams:size=9,weight:normal}${color3}${hr}
eth0 : ${color1}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}${color3 } local : ${color1}${addr eth0}
${color3}Down:${color2} ${totaldown eth0}${voffset -2}${font Ubuntu:pixelsize=14,weight:bold}${goto 120}${downspeedf eth0} k/s${voffset 3}${goto 205}${color3}${downspeedgraph eth0 10,80 9dff00 ffff66}
${voffset -3}${font Sans:size=10}${color3}Up:   ${color2} ${totalup eth0}${voffset -3}${font Ubuntu:pixelsize=14,weight:bold}${goto 120}${upspeedf eth0} k/s${goto 205}${color3}${upspeedgraph eth0 10,80 9dff00 ffff66}
# ${goto 5}${color}${font caviar dreams:size=7,weight:normal}Down: ${font caviar dreams:size=7,weight:bold}${downspeedf eth0}
# ${goto 5}${color}${font caviar dreams:size=7,weight:normal}Up     : ${font caviar dreams:size=7,weight:bold}${upspeedf eth1}
# ${voffset -3}${downspeedgraph eth1 20,120}$alignr${upspeedgraph eth0 20,120}
# ${voffset -12}${goto 50}down${goto 220}up
# ${voffset -3}${goto 205}${font caviar dreams:size=9,weight:normal}${color2}graph réseau${endif}
${if_existing /sys/class/net/wlan0/operstate up}${color}WIFI: ${color3}${hr}IP (wlan0):$alignr${addr wlan0}
AP: ${color1}${wireless_essid wlan0} ${alignr}${color3}Bitrate: ${color1}${wireless_bitrate wlan0}
${color3}Down: ${color1}${downspeed wlan0} k/s ${alignr}${color3}Up: ${color1}${upspeed wlan0} k/s
${downspeedgraph wlan0 10,80 9dff00 ffff66} ${alignr}${upspeedgraph wlan0 10,80 9dff00 ffff66}
${color3}Total: ${color1}${totaldown wlan0} ${alignr -15}${color3}Total: ${color1}${totalup wlan0}${endif}
${voffset -12}${font Ubuntu:pixelsize=12}${color2}Mes notes à l'écran : ${color3}${hr}
${voffset 3}${color5}${font LCD:size=10}${exec cat -b ~/.conky/conky-perso/ToDo.txt | grep note | cut -d "=" -f2}
${font Ubuntu:pixelsize=12}${color2}open ports:   ${font caviar dreams:size=8}${tcp_portmon 1 65535 count}${color3} ${hr}
${goto 3}${font caviar dreams:size=7,weight:bold}${color3}${offset 10}URL${goto 200}PORT
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 0} ${goto 200} ${tcp_portmon 1 65535 rport 0}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 1} ${goto 200} ${tcp_portmon 1 65535 rport 1}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 2} ${goto 200} ${tcp_portmon 1 65535 rport 2}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 3} ${goto 200} ${tcp_portmon 1 65535 rport 3}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 4} ${goto 200} ${tcp_portmon 1 65535 rport 4}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 5} ${goto 200} ${tcp_portmon 1 65535 rport 5}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 6} ${goto 200} ${tcp_portmon 1 65535 rport 6}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 7} ${goto 200} ${tcp_portmon 1 65535 rport 7}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 8} ${goto 200} ${tcp_portmon 1 65535 rport 8}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 9} ${goto 200} ${tcp_portmon 1 65535 rport 9}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 10} ${goto 200} ${tcp_portmon 1 65535 rport 10}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 11} ${goto 200} ${tcp_portmon 1 65535 rport 11}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 12} ${goto 200} ${tcp_portmon 1 65535 rport 12}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 13} ${goto 200} ${tcp_portmon 1 65535 rport 13}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 14} ${goto 200} ${tcp_portmon 1 65535 rport 14}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 15} ${goto 200} ${tcp_portmon 1 65535 rport 15}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 16} ${goto 200} ${tcp_portmon 1 65535 rport 16}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 17} ${goto 200} ${tcp_portmon 1 65535 rport 17}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 18} ${goto 200} ${tcp_portmon 1 65535 rport 18}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 19} ${goto 200} ${tcp_portmon 1 65535 rport 19}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 20} ${goto 200} ${tcp_portmon 1 65535 rport 20}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 21} ${goto 200} ${tcp_portmon 1 65535 rport 21}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 22} ${goto 200} ${tcp_portmon 1 65535 rport 22}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 23} ${goto 200} ${tcp_portmon 1 65535 rport 23}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 24} ${goto 200} ${tcp_portmon 1 65535 rport 24}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 25} ${goto 200} ${tcp_portmon 1 65535 rport 25}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 26} ${goto 200} ${tcp_portmon 1 65535 rport 26}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 27} ${goto 200} ${tcp_portmon 1 65535 rport 27}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 28} ${goto 200} ${tcp_portmon 1 65535 rport 28}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 29} ${goto 200} ${tcp_portmon 1 65535 rport 29}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 30} ${goto 200} ${tcp_portmon 1 65535 rport 30}

#${color}ToDo List: ${color3}${hr}
#${color2}${offset 5}${font Droid sans mono:size=8}${exec cat ~/.conky/conky-perso/ToDo.txt | fold -s -w 65}${font}

#{exec cat ~/.conky/conky-perso/ToDo.txt | grep note | cut -d "=" -f2}
#${exec ~/.conky/conky-perso/ToDo.txt | grep note | cut -d "=" -f2 | fold -s -w 100}

##Utiliser hddtemp dans Conky
## $sudo dpkg-reconfigure hddtemp
##À cette question, vous devez répondre oui. Pour les 2 autres (intervalle de mesure et démon hddtemp), laissez les valeurs par défaut, à savoir 0 pour l'intervalle, et non pour le lancement du démon hddtemp.
##Ensuite, testez :
## $hddtemp /dev/sda
##Voilà, vous pouvez maintenant afficher la température de votre disque dur en tant que simple utilisateur
##${execi 10 hddtemp /dev/sda}
##http://www.jeoffrey54.com/article34/utiliser-hddtemp-dans-conky#.U9ELHbtb8W0
##└─ $cat /proc/cpuinfo ▶  infos cpu
##
##
##
##${font DS\-Digital:size=30}hddtemp /dev/sda
##
##

Hors ligne

#1052 Le 03/08/2015, à 10:12

chepioq

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

Tu peux définir la couleur du fond avec la variable own_window_colour

own_window_colour 	
If own_window_transparent no, set a specified background colour (defaults to black). Takes either a hex value (e.g. ffffff, note the lack of '#') or a valid RGB name (see /usr/lib/X11/rgb.txt) 

Il faut par contre mettre la valeur de own_window_transparent sur no


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

Hors ligne

#1053 Le 03/08/2015, à 10:19

enebre

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

merci chepioq, ça fonctionne smile

own_window_transparent no
own_window_colour d70303

Dernière modification par enebre (Le 03/08/2015, à 10:26)

Hors ligne

#1054 Le 03/08/2015, à 10:36

enebre

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

J'ai la question subsidiaire...
Je me dis qu'en faisant une copie de fond écran partiel à l'emplacement du conky, ça ferait simulation de transparence, serait il possible d'indiquer le chemin de cette image pour le fond du conky ?
merci
edit:
j'ai trouvé en faisant ceci:

own_window yes
own_window_transparent no
#own_window_colour d70303
own_window /home/ombre/Images/fond-conky-core.png

résultat=http://imgur.com/n3P4Nsjl.png
c'est un peu la galère pour mettre une image, y a t il un tuto genre science et technologie pour les nuls ?
solution trouvée ici : https://forum.ubuntu-fr.org/viewtopic.p … 027431&p=1 excellent
1438594360.png


Modération : merci d'utiliser des images de petite taille (300x300) ou des miniatures pointant sur ces images (Un hébergeur comme Toile Libre le permet et c'est bien avec l'option "Insérer la miniature dans un forum :").

Dernière modification par cqfd93 (Le 05/08/2015, à 18:53)

Hors ligne

#1055 Le 05/08/2015, à 00:15

enebre

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

Je déplore une soudaine instabilité du conky, un clignote un peu et pas rapidement, plutôt de manière aléatoire puis disparaît après quelques temps. Il est pourtant toujours présent dans top.

Dernière modification par enebre (Le 05/08/2015, à 00:16)

Hors ligne

#1056 Le 05/08/2015, à 09:01

enebre

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

Le terminal dit ceci:

Conky: one or more $endif's are missing
Conky: desktop window (e00003) is subwindow of root window (89)
Conky: drawing to desktop window
Conky: drawing to double buffer

J'ai bien recherché le $endif qui serait missing mais je n'y arrive pas
le conky

background true
use_xft yes
xftfont Sans:size=7
xftalpha 0.5
update_interval 10
#total_run_times 0
own_window yes
own_window_transparent no
#own_window_colour d70303
own_window /home/ombre/.conky/conky-perso/fond-conky-core.jpeg
#own_window_argb_visual yes
#own_window_argb_value 70
#own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager,below
double_buffer yes
minimum_size 280 800
maximum_width 280
text_buffer_size 1024
#draw_shades no
#draw_outline no
#draw_borders no
draw_graph_borders yes
default_color white
#default_shade_color black
#default_outline_color white
alignment tl
short_units
gap_x 4
gap_y 37
no_buffers yes
#uppercase no
cpu_avg_samples 2
net_avg_samples 2
#override_utf8_locale yes
color1                white
color2                white
color3                green
color4                green
color5 	9dff00
color6	orange
color7	787878
# Lua Load  #
#lua_load ~/.conky/ring.lua
#lua_draw_hook_pre clock_rings
#${color3}${font Sans:size=30}${alignc}${time %H}${time :%M}
TEXT
${font Sans:size=9}${color3}host: ${color2}${font caviar dreams:size=9}${color}Ombre-HP${offset 20}${font caviar dreams:size=9,weight:bold}"Voyager-8-X"
${font Sans:size=9}${color3}Mails :
${color1}${font caviar dreams:size=10}${offset 50}${voffset -17}ombre 
${voffset -14 }${font caviar dreams:size=9}${offset 100}${execpi 300 /home/ombre/.conky/conky-perso/gmail_generic.sh }
${offset 120}${font caviar dreams:size=10}${voffset -15} demol.marc 
${voffset -12 }${font caviar dreams:size=9}${offset 210}${execpi 300 /home/ombre/.conky/conky-perso/gmail_generic1.sh }
${font Sans:size=9}${color3}Kernel: ${color2}$kernel
${color3}Uptime:${color2} $uptime
${color3}Processus: ${color2} $processes${color3}${alignr}En cours: ${color2} $running_processes
#${color3}System Updates: $color2${execi 3600 apt-get search "~U" | wc -l | tail}
${font Ubuntu:pixelsize=12}${color2}Cpu: ${color3}${hr}${font caviar dreams:size=9,weight:normal}
${color3}Freq : ${color2}${freq_g} GHz  ${color3}  #sda: ${color2}${exec expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000} $alignc${color3}CPU: ${color2}${execi 10 hddtemp -n /dev/sda} °C

${color3}Core 1:${color2} ${cpu cpu0}%${goto 90}${color4}${cpubar cpu0 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon0/temp1_input` / 1000}${color2}
${color3}Core 2:${color2} ${cpu cpu1}%${goto 90}${color4}${cpubar cpu0 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}${color2}
#${color3}Core 3:${color2} ${cpu cpu2}%${goto 90}${color4}${cpubar cpu1 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon1/temp2_input` / 1000}${color2}
#${color3}Core 4:${color2} ${cpu cpu3}%${goto 90}${color4}${cpubar cpu2 6,60}${color2}${goto 160}${exec expr `cat /sys/class/hwmon/hwmon1/temp3_input` / 1000}°C${goto 195}${color4}${execbar expr `cat /sys/class/hwmon/hwmon1/temp3_input` / 1000}${color2}
#${voffset 5}${color3}${cpugraph cpu1 13,120 9dff00 ffff66}$alignr${cpugraph cpu2 13,120 9dff00 ffff66}
#${voffset 2}${color}${font caviar dreams:size=9,weight:normal}${goto 30}graph cpu 1${goto 190}graph cpu 2
${voffset 4}${font Ubuntu:pixelsize=12}${color2}Mémoire: ${color3}${hr}${font caviar dreams:size=10,weight:normal}
${goto 10}${color3}Ram:${font caviar dreams:size=9,weight:normal}${color2} $mem/$memmax ${goto 165}${memperc}%${goto 195}${color4}${membar}${color2}${font caviar dreams:size=10,weight:normal}
${goto 10}${color3}Swap:${font caviar dreams:size=9,weight:normal}${color2} ${swap} / ${swapmax} ${goto 165}${swapperc}%${goto 195}${color4}${swapbar}
#${voffset -2}${goto 165}${font caviar dreams:size=9,weight:normal}${color2}graph mémoire
${voffset -1}${font Ubuntu:pixelsize=12}${color2}Espace Disque:${color3}${hr}${font caviar dreams:size=9,weight:normal}
${goto 15}${color3}/ ${color2}${goto 50}${fs_used /} / ${fs_size /} ${goto 165}${fs_used_perc /}% ${goto 195}${color4}${fs_bar /}\

# ${if_existing /media/marc/Drive-n-go}${voffset 15}${goto 15}${color3}D-n-g ${color2}${goto 50}${fs_used /media/marc/Drive-n-go} / ${fs_size /media/marc/Drive-n-go} ${goto 165}${fs_used_perc /media/marc/Drive-n-go}% ${goto 195}${color4}${fs_bar /media/marc/Drive-n-go}${endif}\
# ${if_existing /media/ombre/data}${voffset 15}${goto 15}${color3}data ${color2}${goto 50}${fs_used /media/ombre/data} / ${fs_size /media/ombre/data} ${goto 165}${fs_used_perc /media/ombre/data}% ${goto 195}${color4}${fs_bar /media/ombre/data}${endif}
# ${voffset -3}${goto 165}${font caviar dreams:size=9,weight:normal}${color2}graph usage disk
${font Ubuntu:pixelsize=12}${color2}${color}Charge: ${color3}${hr}${font caviar dreams:size=9}
Processus$alignr PID   CPU   MEM${color5}
  ${top name 1} $alignr${top pid 1} ${top cpu 1} ${top mem 1}
  ${top name 2} $alignr${top pid 2} ${top cpu 2} ${top mem 2}
  ${top name 3} $alignr${top pid 3} ${top cpu 3} ${top mem 3}
  ${top name 4} $alignr${top pid 4} ${top cpu 4} ${top mem 4}
  ${top name 5} $alignr${top pid 5} ${top cpu 5} ${top mem 5}
  ${top name 6} $alignr${top pid 6} ${top cpu 6} ${top mem 6}
  ${top name 7} $alignr${top pid 7} ${top cpu 7} ${top mem 7}
  ${top name 8} $alignr${top pid 8} ${top cpu 8} ${top mem 8}
  ${top name 9} $alignr${top pid 9} ${top cpu 9} ${top mem 9}
${color3}Mémoire$alignr PID   CPU   MEM${color5}
  ${top_mem name 1} $alignr${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
  ${top_mem name 2} $alignr${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
  ${top_mem name 3} $alignr${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
  ${top_mem name 4} $alignr${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
#${exec tail -n1 -f /var/log/syslog | grep note | cut -d "=" -f2}
#${exec cat tail -n1 -f /var/log/boot.log | cut -d "=" -f2} erreur
${voffset 3}${font Ubuntu:pixelsize=12}${color2}${if_existing /sys/class/net/eth0/operstate up}Réseau: ${font caviar dreams:size=9,weight:normal}${color3}${hr}
eth0 : ${color1}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}${color3 } local : ${color1}${addr eth0}
${color3}Down:${color2} ${totaldown eth0}${voffset -2}${font Ubuntu:pixelsize=14,weight:bold}${goto 120}${downspeedf eth0} k/s${voffset 3}${goto 205}${color3}${downspeedgraph eth0 10,80 9dff00 ffff66}
${voffset -3}${font Sans:size=10}${color3}Up:   ${color2} ${totalup eth0}${voffset -3}${font Ubuntu:pixelsize=14,weight:bold}${goto 120}${upspeedf eth0} k/s${goto 205}${color3}${upspeedgraph eth0 10,80 9dff00 ffff66}
# ${goto 5}${color}${font caviar dreams:size=7,weight:normal}Down: ${font caviar dreams:size=7,weight:bold}${downspeedf eth0}
# ${goto 5}${color}${font caviar dreams:size=7,weight:normal}Up     : ${font caviar dreams:size=7,weight:bold}${upspeedf eth1}
# ${voffset -3}${downspeedgraph eth1 20,120}$alignr${upspeedgraph eth0 20,120}
# ${voffset -12}${goto 50}down${goto 220}up
# ${voffset -3}${goto 205}${font caviar dreams:size=9,weight:normal}${color2}graph réseau${endif}
${if_existing /sys/class/net/wlan0/operstate up}${color}WIFI: ${color3}${hr}IP (wlan0):$alignr${addr wlan0}
AP: ${color1}${wireless_essid wlan0} ${alignr}${color3}Bitrate: ${color1}${wireless_bitrate wlan0}
${color3}Down: ${color1}${downspeed wlan0} k/s ${alignr}${color3}Up: ${color1}${upspeed wlan0} k/s
${downspeedgraph wlan0 10,80 9dff00 ffff66} ${alignr}${upspeedgraph wlan0 10,80 9dff00 ffff66}
${color3}Total: ${color1}${totaldown wlan0} ${alignr -15}${color3}Total: ${color1}${totalup wlan0}${endif}
${voffset -12}${font Ubuntu:pixelsize=12}${color2}Mes notes à l'écran : ${color3}${hr}
${voffset 3}${color5}${font LCD:size=10}${exec cat -b ~/.conky/conky-perso/ToDo.txt | grep note | cut -d "=" -f2}
${font Ubuntu:pixelsize=12}${color2}open ports:   ${font caviar dreams:size=8}${tcp_portmon 1 65535 count}${color3} ${hr}
${goto 3}${font caviar dreams:size=7,weight:bold}${color3}${offset 10}URL${goto 200}PORT
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 0} ${goto 200} ${tcp_portmon 1 65535 rport 0}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 1} ${goto 200} ${tcp_portmon 1 65535 rport 1}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 2} ${goto 200} ${tcp_portmon 1 65535 rport 2}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 3} ${goto 200} ${tcp_portmon 1 65535 rport 3}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 4} ${goto 200} ${tcp_portmon 1 65535 rport 4}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 5} ${goto 200} ${tcp_portmon 1 65535 rport 5}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 6} ${goto 200} ${tcp_portmon 1 65535 rport 6}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 7} ${goto 200} ${tcp_portmon 1 65535 rport 7}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 8} ${goto 200} ${tcp_portmon 1 65535 rport 8}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 9} ${goto 200} ${tcp_portmon 1 65535 rport 9}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 10} ${goto 200} ${tcp_portmon 1 65535 rport 10}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 11} ${goto 200} ${tcp_portmon 1 65535 rport 11}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 12} ${goto 200} ${tcp_portmon 1 65535 rport 12}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 13} ${goto 200} ${tcp_portmon 1 65535 rport 13}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 14} ${goto 200} ${tcp_portmon 1 65535 rport 14}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 15} ${goto 200} ${tcp_portmon 1 65535 rport 15}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 16} ${goto 200} ${tcp_portmon 1 65535 rport 16}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 17} ${goto 200} ${tcp_portmon 1 65535 rport 17}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 18} ${goto 200} ${tcp_portmon 1 65535 rport 18}
${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 19} ${goto 200} ${tcp_portmon 1 65535 rport 19}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 20} ${goto 200} ${tcp_portmon 1 65535 rport 20}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 21} ${goto 200} ${tcp_portmon 1 65535 rport 21}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 22} ${goto 200} ${tcp_portmon 1 65535 rport 22}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 23} ${goto 200} ${tcp_portmon 1 65535 rport 23}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 24} ${goto 200} ${tcp_portmon 1 65535 rport 24}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 25} ${goto 200} ${tcp_portmon 1 65535 rport 25}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 26} ${goto 200} ${tcp_portmon 1 65535 rport 26}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 27} ${goto 200} ${tcp_portmon 1 65535 rport 27}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 28} ${goto 200} ${tcp_portmon 1 65535 rport 28}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 29} ${goto 200} ${tcp_portmon 1 65535 rport 29}
##${goto 5}${font caviar dreams:size=7,weight:normal}${color5}${tcp_portmon 1 65535 rhost 30} ${goto 200} ${tcp_portmon 1 65535 rport 30}

#${color}ToDo List: ${color3}${hr}
#${color2}${offset 5}${font Droid sans mono:size=8}${exec cat ~/.conky/conky-perso/ToDo.txt | fold -s -w 65}${font}

#{exec cat ~/.conky/conky-perso/ToDo.txt | grep note | cut -d "=" -f2}
#${exec ~/.conky/conky-perso/ToDo.txt | grep note | cut -d "=" -f2 | fold -s -w 100}

##Utiliser hddtemp dans Conky
## $sudo dpkg-reconfigure hddtemp
##À cette question, vous devez répondre oui. Pour les 2 autres (intervalle de mesure et démon hddtemp), laissez les valeurs par défaut, à savoir 0 pour l'intervalle, et non pour le lancement du démon hddtemp.
##Ensuite, testez :
## $hddtemp /dev/sda
##Voilà, vous pouvez maintenant afficher la température de votre disque dur en tant que simple utilisateur
##${execi 10 hddtemp /dev/sda}
##http://www.jeoffrey54.com/article34/utiliser-hddtemp-dans-conky#.U9ELHbtb8W0
##└─ $cat /proc/cpuinfo ▶  infos cpu
##
##
##
##${font DS\-Digital:size=30}hddtemp /dev/sda
##
##

Dernière modification par enebre (Le 05/08/2015, à 09:03)

Hors ligne

#1057 Le 06/08/2015, à 06:41

F50

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

Désolé du retard...
En effet, pas de souci à l'extraction de l'archive sur l'ordi fixe contrairement au portable, il doit me manquer un paquet. Je vais regarder ce conky, merci chepioq.

#1058 Le 07/08/2015, à 07:34

chepioq

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

@enebre

Je vois ceci pour ton premier endif :

# ${if_existing /media/marc/Drive-n-go}${voffset 15}${goto 15}${color3}D-n-g ${color2}${goto 50}${fs_used /media/marc/Drive-n-go} / ${fs_size /media/marc/Drive-n-go} ${goto 165}${fs_used_perc /media/marc/Drive-n-go}% ${goto 195}${color4}${fs_bar /media/marc/Drive-n-go}${endif}\

C'est peut être le \ à la fin de la ligne qui gêne.


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

Hors ligne

#1059 Le 07/08/2015, à 16:54

chepioq

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

Ce que je vois aussi :

${voffset 3}${font Ubuntu:pixelsize=12}${color2}${if_existing /sys/class/net/eth0/operstate up}Réseau: ${font caviar dreams:size=9,weight:normal}${color3}${hr}
eth0 : ${color1}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}${color3 } local : ${color1}${addr eth0}
${color3}Down:${color2} ${totaldown eth0}${voffset -2}${font Ubuntu:pixelsize=14,weight:bold}${goto 120}${downspeedf eth0} k/s${voffset 3}${goto 205}${color3}${downspeedgraph eth0 10,80 9dff00 ffff66}
${voffset -3}${font Sans:size=10}${color3}Up:   ${color2} ${totalup eth0}${voffset -3}${font Ubuntu:pixelsize=14,weight:bold}${goto 120}${upspeedf eth0} k/s${goto 205}${color3}${upspeedgraph eth0 10,80 9dff00 ffff66}
# ${goto 5}${color}${font caviar dreams:size=7,weight:normal}Down: ${font caviar dreams:size=7,weight:bold}${downspeedf eth0}
# ${goto 5}${color}${font caviar dreams:size=7,weight:normal}Up     : ${font caviar dreams:size=7,weight:bold}${upspeedf eth1}
# ${voffset -3}${downspeedgraph eth1 20,120}$alignr${upspeedgraph eth0 20,120}
# ${voffset -12}${goto 50}down${goto 220}up
# ${voffset -3}${goto 205}${font caviar dreams:size=9,weight:normal}${color2}graph réseau${endif}

Ton ${endif} est dans une ligne commentée (commençant par un #)
Je la transformerai comme ceci :

# ${voffset -3}${goto 205}${font caviar dreams:size=9,weight:normal}${color2}graph réseau
${endif}

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

Hors ligne

#1060 Le 24/08/2015, à 10:47

enebre

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

chepioq Bonjour, je viens de rentrer de voyage et trouve ta réponse à mon soucis de conky, c'est bien ce endif qui causait le problème d'instabilité.
Je retrouve enfin mon bon vieux conky de surveillance.
Merci mon ami d'y avoir posé ton oeil d'expert.

Hors ligne

#1061 Le 01/09/2015, à 10:53

ragamatrix

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

Bonjour à tous,
J'ai un problème 'lua' avec un de mes conky préféré sad :
avec cette erreur:

 conky -c ~/.conky/ConkyChronoClear/ConkyChronoClear
conky: Syntax error (/home/raphix/.conky/ConkyChronoClear/ConkyChronoClear:2: '=' expected near 'yes') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: llua_load: /home/raphix/.conky/ConkyChronoClear/ChronoClear.lua:32: attempt to call global 'rgb_to_r_g_b' (a nil value)
conky: desktop window (29b) is root window
conky: window type - normal
conky: drawing to created window (0x2400001)
conky: drawing to double buffer
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_bg execution failed: attempt to call a nil value
..........etc

je crois que la ligne posant problème dans le script lua serait celle-ci :

 conky: llua_load: /home/raphix/.conky/ConkyChronoClear/ChronoClear.lua:32: attempt to call global 'rgb_to_r_g_b' (a nil value)

Mais je ne sais pas comment la corriger... roll
voici le script.lua:

 --[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
 21 Jun 2012 - Chronograph modifications by Sector11
 22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
 12 Nov 2012 - memory leak plugged - mrpeachy
 14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
 27 Jan 2014 - Personnalisation - ragamatrix (#! forum (en,fr) ubuntu.fr))	
use in conkyrc

lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT

]]

require 'cairo'
--Position et taille horloge
local init={
center_x=245,
center_y=235,
radius=220, -- do not touch
lang="French", --English or Spanish or French
hour=12, --12 or 24
second=true, --true or false
line=false, --hand secondes true or false
handday=false, --hand day true or false
handdaynum=false, --hand day number true or false
handmonth=false, --hand month true or false
color=0xF8F8FF, --color for day, day number and month if none hand
alpha=1 --alpha for day, day number and month if none hand
}

local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)

function conky_main()
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)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
---[##drawings_new_hands
--this function caluculates coordinates for a point around a circle
function pt(px,py,prad,pdeg)--px,py=center coordinates for circle, prad=radius,pdeg is position in degrees, 0 is top
local ppo=(math.pi/180)*pdeg
local px1=px+prad*(math.sin(ppo))
local py1=py-prad*(math.cos(ppo))
return px1,py1--returns coordinates, use in main function like this, x,y=pt(px,py,prad,pdeg)
end

--this function draws hands
function hands(clock_centerx,clock_centery,degrees,length,hand_center_width,hand_mid_width,hand_end_width,distance_to_mid)
--draw_middle
--calc start point
xs,ys=pt(clock_centerx,clock_centery,hand_center_width,degrees-90)
cairo_move_to(cr,xs,ys)
x1,y1=pt(clock_centerx,clock_centery,length*distance_to_mid,degrees-(hand_mid_width/2))
cairo_line_to (cr,x1,y1)
x2,y2=pt(clock_centerx,clock_centery,length,degrees)
cairo_arc(cr,x2,y2,hand_end_width,(degrees+180)*(math.pi/180),(degrees)*(math.pi/180))
--cairo_line_to (cr,x2,y2)
x3,y3=pt(clock_centerx,clock_centery,length*distance_to_mid,degrees+(hand_mid_width/2))
cairo_line_to (cr,x3,y3)
--calc end point
xe,ye=pt(clock_centerx,clock_centery,hand_center_width,degrees+90)
cairo_line_to (cr,xe,ye)
cairo_arc(cr,clock_centerx,clock_centery,hand_center_width,(degrees)*(math.pi/180),(degrees+180)*(math.pi/180))
cairo_fill(cr)
end

-- ########################################################
-- SETTINGS AREA
-- local cpu=conky_parse("${cpu}")
-- local red-1=conky_parse("${image ~/Conky/images/red_1.png -p 0,0 -s 35x35}")

local clock_type_A=init.hour -- Large Main 24 HR Clock

-- ###### CLOCK SETTINGS ##################################
-- SET BORDER OPTIONS FOR "CLOCKS" ########################
local clock_border_width=0
-- set color and alpha for clock border
local cbr,cbg,cbb,cba=1,1,1,1  -- full opaque white
-- gap from clock border to minute marks
local b_to_m=1

-- ########################################################
-- ### START DIAL B ### Top - Week Day Names Dial #########
-- DIAL POSITION FOR TEXT
local center_x=init.center_x-0
local center_y=init.center_y-120
local radius=45
-- FONT
cairo_select_font_face (cr, "Andale Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 13)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",}	end	-- English
if init.lang == "Spanish" then text_days={"Dom","Lun","Mar","Mie","Jue","Vie","Sab",}	end	-- Spanish
if init.lang == "French" then text_days={"Dim","Lun","Mar","Mer","Jeu","Ven","Sam",}	end	-- French
local day_number=tonumber(os.date("%w"))
if init.handday == true then
  for i=1,7 do
    -- work out points
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=35
  for i=1,7 do
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
  -- DRAW HAND -- snaps to current day of week
  local hand_length=30
  local point=(math.pi/180)*((360/7)*(day_number))
  local x=0+hand_length*(math.sin(point))
  local y=0-hand_length*(math.cos(point))
  local hand_width=2
  cairo_move_to (cr,center_x,center_y)
  cairo_line_to (cr,center_x+x,center_y+y)
  cairo_stroke (cr)
else
  for i=1,7 do
    -- work out points
    if day_number == i-1 then
      cairo_set_source_rgba (cr,colr, colg, colb, cola)
    else
      cairo_set_source_rgba (cr,121/255,128/255,144/255,1)--Days ---181, 224, 255
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle####Points days
  local radius=28
  for i=1,7 do
    if day_number == i-1 then
      cairo_set_source_rgba (cr,colr, colg, colb, cola)
    else
      cairo_set_source_rgba (cr,112/255,128/255,144/255,1)
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end

end
-- ### END DIAL B #########################################

-- ########################################################
-- ### START DIAL C ### Right - Month Names Dial ##########
-- DIAL POSITION FOR TEXT
local center_x=init.center_x+100
local center_y=235
local radius=55
-- FONT
cairo_select_font_face (cr, "Andale Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 13)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end -- English
if init.lang == "Spanish" then text_days={"Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic",} end -- Spanish
if init.lang == "French" then text_days={"Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aôu","Sep","Oct","Nov","Déc",} end -- French
local this_month=tonumber(os.date("%m"))

if init.handmonth == true then
  for i=1,12 do
    -- OUTTER POINTS POSiTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=32
  for i=1,12 do
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
  -- DRAW HAND -- snaps to current month
  local hand_length=28 --radius for this calculation
  local point=(math.pi/180)*((360/12)*(this_month-1))
  local x=0+hand_length*(math.sin(point))
  local y=0-hand_length*(math.cos(point))
  cairo_move_to (cr,center_x,center_y)
  cairo_line_to (cr,center_x+x,center_y+y)
  cairo_stroke (cr)
else
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,colr, colg, colb, cola)
    else
      cairo_set_source_rgba (cr,112/255,128/255,144/255,1)
    end
    -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=-3-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=35
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,colr, colg, colb, cola)
    else
      cairo_set_source_rgba (cr,112/255,128/255,144/255,1)
    end
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end

end
-- ### END CLOCK C ########################################

-- ########################################################
-- ### START DIAL D ### Left - Day Numbers Dial ###########
-- GET NUMBER OF DAYS IN CURRENT MONTH
-- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
if init.hour == 12 then
  febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
else
  febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
end
-- MONTH TABLE
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
-- TEXT positioning
local center_x=init.center_x-100
local center_y=init.center_y-3
local radius=55
cairo_select_font_face (cr, "Andale Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 13)
cairo_set_source_rgba (cr,1,1,1,1) --(cr,245/255,242/255,143/255,1) -- (cr,1,1,1,1)
local this_day=tonumber(os.date("%d"))
if init.handdaynum == true then
  for i=1,number_days do
    -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    --only print even numbers
    if math.mod(i, 2) == 0 then
      --set text when even
      text=string.format("%02d",i) --formats numbers to double digits
    else
      --set text when odd
      text=""
    end--odd even matching
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=40
  for i=1,number_days do
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
  -- DRAW HAND -- snaps to current DAY
  local hand_length=35--radius for this calculation
  local point=(math.pi/180)*((360/number_days)*(this_day-1))
  local x=0+hand_length*(math.sin(point))
  local y=0-hand_length*(math.cos(point))
  cairo_move_to (cr,center_x,center_y)
  cairo_line_to (cr,center_x+x,center_y+y)
  cairo_stroke (cr)
else
  for i=1,number_days do
    if this_day == i then
      cairo_set_source_rgba (cr,colr, colg, colb, cola)
    else
      cairo_set_source_rgba (cr,112/255,128/255,144/255,1)
    end
    -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    --only print even numbers
    if math.mod(i, 2) == 0 then
      --set text when even
      text=string.format("%02d",i) --formats numbers to double digits
    else
      --set text when odd
      text=""
    end--odd even matching
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=40
  for i=1,number_days do
    if this_day == i then
      cairo_set_source_rgba (cr,colr, colg, colb, cola)
    else
      cairo_set_source_rgba (cr,112/255,128/255,144/255,1)--points day numbers
    end
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ### END CLOCK D ########################################

-- ########################################################
-- ### START CLOCK E ######################################
-- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
local number_marks_E=12
-- set mark length
local m_length_E=0
-- set mark width
local m_width_E=0
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,0,1-- opaque white
-- SETUP HOUR HANDS #######################################
-- CLOCK E HOUR HAND
-- set length of hour hand
hh_length_E=25
-- set hour hand width
hh_width_E=2
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
hhr,hhg,hhb,hha=1,1,0,1-- fully opaque white
-- SETUP MINUTE HANDS #####################################
-- CLOCK E MINUTE HAND SETUP
-- set length of minute hand
mh_length_E=35
-- set minute hand width
mh_width_E=2
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
mhr,mhg,mhb,mha=1,1,0,1-- fully opaque white
-- SETUP SECOND HANDS #####################################
-- CLOCK E SECOND HAND SETUP
-- set length of seconds hand
sh_length_E=32
-- set hour hand width
sh_width_E=1
-- set hour hand line cap
sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
shr,shg,shb,sha=1,0,0,1-- fully opaque red
-- CLOCK E ###### 12 HR TIME ##############################
-- CLOCK SETTINGS
clock_radius=45
clock_centerx=init.center_x
clock_centery=init.center_y+85
-- DRAWING CODE
-- DRAW BORDER
cairo_set_source_rgba (cr,169/255,169/255,169/255,1)
cairo_set_line_width (cr,clock_border_width)
cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
cairo_stroke (cr)
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_E
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_E)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR SECOND MARKS
for i=1,number_marks_E do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_E))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_E))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line-- MARKS AROUND CLOCK A
cairo_stroke (cr)
end-- of for loop
-- SET MARKS ##############################################
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=init.hour
-- set mark length
local m_length_A=0
-- set mark width
local m_width_A=0
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,1 -- opaque white
-- ================================================================
-- SETUP HOUR HANDS #######################################
-- CLOCK A HOUR HAND#######################################new-one=
-- set length of hour hand
hh_length_A=150
-- set hour hand width
hh_width_A=3
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
hhr,hhg,hhb,hha=1,1,1,.4-- fully opaque white & opacity
-- SETUP MINUTE HANDS #####################################
-- CLOCK A MINUTE HAND SETUP###############################new-one=
-- set length of minute hand
mh_length_A=200
-- set minute hand width
mh_width_A=2
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
mhr,mhg,mhb,mha=1,1,1,.4-- fully opaque white & opacity
-- SETUP SECOND HANDS #####################################
-- CLOCK A SECOND HAND SETUP
-- set length of seconds hand
sh_length_A=150
-- set hour hand width
sh_width_A=2
-- set hour hand line cap
sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
shr,shg,shb,sha=1,0,0,1-- fully opaque red
-- CLOCK A ###### 12 HR TIME ##############################
-- ==============================================================
-- CLOCK SETTINGS
clock_radius=200
clock_centerx=init.center_x
clock_centery=init.center_y
-- DRAWING CODE
-- DRAW BORDER
cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
cairo_set_line_width (cr,clock_border_width)
cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
cairo_stroke (cr)
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_A)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end-- of for loop
-- HOUR MARKS
-- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A))-- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_A
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,hhr,hhg,hhb,hha)
cairo_set_line_cap  (cr, hh_cap)
--NEW HAND DRAWING CODE ##################################################
--call hand drawing function
hands(
clock_centerx,--string or coodinate for clock center x
clock_centery,--string or coodinate for clock center y
hsec_degs,--string or value for hand degrees
hh_length_A,--string or value for hand length (radius)
2,--set hand center width in pixels
10,--set hand mid width in degrees
0,--set hand end width in pixels, 0=a point
0.8--number from 0 to 1 as a propotion of total hand length, ie 0.5 is exact middle distance
)

--#########################################################################
-- DRAW MINUTE HAND
-- get minutes and seconds just as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,mhr,mhg,mhb,mha)
cairo_set_line_cap  (cr, mh_cap)
--NEW HAND DRAWING CODE ##################################################
--call hand drawing function
hands(
clock_centerx,--string or coodinate for clock center x
clock_centery,--string or coodinate for clock center y
msec_degs,--string or value for hand degrees
mh_length_A,--string or value for hand length (radius)
2,--set hand center width in pixels
6,--set hand mid width in degrees
0,--set hand end width in pixels, 0=a point
0.75--number from 0 to 1 as a propotion of total hand length, ie 0.5 is exact middle distance
)
-- DRAW SECOND HAND

--[[
-- calculate degrees for each second
sec_degs=seconds*6
-- set radius to calculate hand points
radius=sh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of seconds hand
point=(math.pi/180)*sec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))BOLD
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes
cairo_set_line_width (cr,sh_width_A)
cairo_set_source_rgba (cr,shr,shg,shb,sha)
cairo_set_line_cap  (cr, sh_cap)
cairo_stroke (cr)
]]
-- ####################################################################
local center_x=init.center_x
local center_y=init.center_y
local radius=init.radius-5
cairo_select_font_face (cr, "Andale Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 15)
cairo_set_source_rgba (cr,220/255,220/255,220/255,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
-- TABLE OF TEXT -- in order
if init.hour == 12 then 
  text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
  for i=1,12 do
    -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=180
  for i=1,12 do
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
if init.hour == 24 then 
  text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
  for i=1,24 do
    -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
  -- INNER POINTS POSITION, radius smaller than text circle
  local radius=150
  for i=1,24 do
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end

-- part of a second hand
--position
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
if init.line == true then
  local arc=(math.pi/180)*((360/60)*seconds)
  --calculate point 1
  local radius1=140
  local x1=0+radius1*math.sin(arc)
  local y1=0-radius1*math.cos(arc)
  --calculate point 2
  local radius2=158
  local x2=0+radius2*math.sin(arc)
  local y2=0-radius2*math.cos(arc)
  --draw line connecting points-- 255, 138, 255
  cairo_move_to (cr, center_x+x1,center_y+y1)
  cairo_line_to (cr, center_x+x2, center_y+y2)
  cairo_set_source_rgba (cr,255/255,0/255,0/255,1)
  cairo_stroke (cr)
end
-- ####################################################################
-- POSITION FOR TEXT HOUR NUMBERS
--affiche secondes
  if init.hour == 12 and init.second == true then
    text_days={"","1","2","3","4","","6","7","8","9","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",} 
    -- INNER POINTS POSITION, radius smaller than text circle
    cairo_set_source_rgba (cr,1,1,1,1)
    cairo_select_font_face (cr, "Andale Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    for i=1,60 do
      local radius=200
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
      if seconds == i-1 then
        cairo_set_source_rgba (cr,220/255,220/255,220/255,1)---point for seconds---
      else
        if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
          cairo_set_source_rgba (cr,1,1,1,1)---points for hours
        else
          cairo_set_source_rgba (cr,112/255,128/255,144/255,1)---points for minutes
        end
      end
      cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
      cairo_stroke (cr)
    end
    radius=radius-3
    cairo_set_font_size (cr, 10)
    for i=1,60 do
      -- OUTTER POINTS POSTION FOR TEXT
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
      -- CALCULATE CENTRE OF TEXT
      local text=text_days[i]--gets text from table
      if seconds == tonumber(text) then
        cairo_set_source_rgba (cr,248/255,248/255,255/255,1)--trotteuse color
      else
        cairo_set_source_rgba (cr,112/255,128/255,144/255,1)--minutes numbers color
      end
      --local extents=cairo_text_extents_t:create()
      cairo_text_extents(cr,text,extents)
      local width=extents.width
      local height=extents.height
      cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
      cairo_show_text (cr, text)
      cairo_stroke (cr)
    end
  end
-- Fin affiche secondes
-- FONT

-- ########################################################
cairo_stroke (cr)
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function

function rgb_to_r_g_b(col,alp) -- ONLY NEED ONE COPY OF THIS FUNCTION
  return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end

D'avance merci si quelqu'un connait la correction à apporter.

Hors ligne

#1062 Le 02/09/2015, à 17:38

ragamatrix

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

^pb résolu ici

Hors ligne

#1063 Le 27/10/2015, à 12:25

los_tintinos

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

Bonjour,

Pourquoi changer quelque chose qui fonctionne bien...
Suite a mon passage à la 15.04, je réinstalle conky et voilà que ce dernier ne fonctionne plus. alors que tout fonctionnait parfaitement depuis un moment maintenant.

Déja depuis la version 1.10, il y a une nouvelle syntaxe du code conky (a la sauce script lua). Bon j'ai fait la conversion (cf. copie du script ci-dessous) mais cela ne change pas mon bléme. Le soucis ne vient pas de conky proprement dit mais du script "lua ring".

Voici l'erreur que j'ai

seb@seb-Touchsmart-tm2:~$ conky -c /home/seb/.conky/conky-meteo/meteo6jours/conkyrc_new
conky: desktop window (1600016) is subwindow of root window (bd)
conky: window type - dock
conky: drawing to created window (0x2600002)
conky: drawing to double buffer
conky: Unknown setting 'xftfont'
conky: forked to background, pid is 30471
seb@seb-Touchsmart-tm2:~$ 
conky: obj->data.i 1 info.cpu_count 0
conky: attempting to use more CPUs than you have!

N'étant pas trop con j'ai bien compris que le soucis venait du nombre de cpu. Le probléme c'est que ce script fonctionnait trés bien tel quel sur la 14.04.

Voici mon conky nouvelle formule puis le script lua incriminé. Mais lisez bien la suite aprés les scripts, c'est encore plus drôle qu'une erreur de script (quel teasing !!)
Mon Conky :

conky.config = {
--Conky settings,
    background = true,
    update_interval = 1,

    cpu_avg_samples = 2,
    net_avg_samples = 2,

    override_utf8_locale = true,

    double_buffer = true,
    no_buffers = true,

    text_buffer_size = 2048,
    imlib_cache_size = 0,

    short_units = true,

--Window specifications,
    own_window_class = 'Conky',
    own_window = true,
    own_window_type = 'dock',
    own_window_transparent = false,
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    own_window_argb_visual = true,
    own_window_argb_value = 130,

    border_inner_margin = 0,
    border_outer_margin = 0,

--Taille et positon,
    alignment = 'top_left',
    minimum_width = 190,
    minimum_height = 350,

--Ecart avec le bord x=gauche ou droit y= haut ou bas,
    gap_x = 1080,
    gap_y = 40,

--Graphics settings,
    draw_shades = false,
    draw_outline = false,
    draw_borders = false,
    draw_graph_borders = true,

--Text settings,
    use_xft = true,
    xftfont = 'MaiandraGD:size=24',
    xftalpha = 0.4,
    top_name_width = 8,

    uppercase = false,

    default_color = '8b8b8b',

--Lancement des scripts Lua,
    lua_load = '~/.conky/conky-meteo/meteo6jours/scripts/ring_new.lua',
    lua_draw_hook_pre = 'ring_stats',

	
own_window_colour = '000000',
}


conky.text = [[
${voffset 30}${color d8d8d8}${font Helvetica LT Std :size=8:weight=bold}${goto 80}CPU
${voffset 65}${color d8d8d8}${font Helvetica LT Std :size=8:weight=bold}${goto 78}RAM
${voffset 60}${color d8d8d8}${font Helvetica LT Std :size=8:weight=bold}${goto 74}BATT.
${voffset 0}${color bab8b8}${goto 78}${battery_percent BAT0} %
${voffset 58}${goto 78}${color d8d8d8}WIFI 
${color bab8b8}${goto 78}${wireless_link_qual_perc wlan0}%

${voffset 30}${color whitesmoke}${font Helvetica LT Std :size=8:weight=bold}${goto 20}Process${goto 90}CPU${goto 140}MEM
${font Helvetica LT Std :size=8}${goto 20}${top name 1}${goto 85}${top cpu 1}%${goto 135}${top mem 1}%
${goto 20}${top name 2}${goto 85}${top cpu 2}%${goto 135}${top mem 2}%
${goto 20}${top name 3}${goto 85}${top cpu 3}%${goto 135}${top mem 3}%
${voffset 10}${font Helvetica LT Std :size=8}${goto 20}Machine:${goto 70}$nodename
${goto 20}Distro:${goto 70}${exec cat /etc/issue.net}
${goto 20}Kernel:${goto 70}$kernel

${goto 20}SSID : ${wireless_essid wlan0}
${goto 20}IP      : ${addr wlan0}
${goto 20}IP ext : ${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}

${goto 20}Etat batterie : ${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Discharging"}Se décharge${endif}${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Unknown"}En charge${endif}${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Full"}Pleine${endif}
${goto 20}Consomation : ${execi 30 upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep energy-rate | cut -c 26-29} Watts
${goto 20}CPU : ${hwmon 0 temp 1}C°    M/B : ${hwmon 0 temp 2}C°
]]

Mon script lua ring

--[[
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='cpu 0',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=40,
	radius=20,
	thickness=4,
        start_angle=270,
        end_angle=570,
    },
{
        name='cpu',
        arg='cpu 1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=40,
	radius=25,
	thickness=4,
        start_angle=270,
        end_angle=570,
    }, 
{
        name='cpu',
        arg='cpu 2',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=40,
	radius=30,
	thickness=4,
        start_angle=270,
        end_angle=570,
    },
{
        name='cpu',
        arg='cpu 3',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=40,
	radius=35,
	thickness=4,
        start_angle=270,
        end_angle=570,
    },
{
        name='battery_percent',
        arg='BAT0',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=200,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570,
    },
 
{
        name='memperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=120,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570,
    },

{
        name='wireless_link_qual_perc',
        arg='wlan0',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0xa5ff07,
        fg_alpha=0.8,
        x=92, y=280,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570,
    },
}

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

Donc le plus fort c'est que ce script :
- quand je laisse que le "cpu0" actif et que je lance conky, ca marche normalement mais je n'ai qu'un cercle cpu (normal en même temps)
- quand j'ajoute 1 à 1 les cpu 1,2 et 3 pendant que lua tourne et se recharge à chaque modification, CA MARCHE, et j'ai donc mes 4 cercles cpu.
- Si une fois les modifs faîtes, je kill le conky et que je relance tout le bouzin, je me retrouve avec l'erreur ci-dessus.

C'est t'y pas banal mon histoire !!!

Perso je séche totalement sur le probléme et encore plus donc sur la solution.

Pour finir une capture ecran du conky en fonctionnement "normal" avec les 4 cpu (je venais de finir les modifs sur le scripts lua), suite à une relance du conky, ca à planté ensuite (alors que je n'ai rien changé au  scripts).

mini_409318Capturedcrande20151027111020.png


"Le hardware c'est ce qu'on frappe quand le software plante" Dicton geek
"Quand les mouettes ont pieds il est temps de virer" Dicton breton
"Sauver un arbre, bouffer un castor" Dicton Bio

Hors ligne

#1064 Le 30/10/2015, à 11:35

los_tintinos

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

Yo tous le monde,

Bon je m'auto répond...
Je n'est pas trouvé de solution proprement dit. J'ai finalement laissé tombe le script lua et j'ai fait des graphe-barre directement avec conky. C'est moins beau mais tout fonctionne.
Il me reste encore à bidouiller la couleur mais tout est là.

mini_269515Capturedcrande20151030102719.png


Et la partie texte du conky

${color white}${font Helvetica LT Std :size=8:weight=bold}
${alignc}UTILISATION CPU${font Helvetica LT Std :size=8}${color whitesmoke}
${goto 15}CPU 1 : ${cpu cpu 0} % ${goto 100}${cpubar cpu0 4,80}
${goto 15}CPU 2 : ${cpu cpu 1} % ${goto 100}${cpubar cpu1 4,80}
${goto 15}CPU 3 : ${cpu cpu 2} % ${goto 100}${cpubar cpu2 4,80}
${goto 15}CPU 4 : ${cpu cpu 3} % ${goto 100}${cpubar cpu3 4,80}
${color white}${font Helvetica LT Std :size=8:weight=bold}
${alignc}UTILISATION RAM${font Helvetica LT Std :size=8}${color whitesmoke}
${alignc}${memperc} % 
${alignc}${membar 4,80}
${color white}${font Helvetica LT Std :size=8:weight=bold}
${alignc}ETAT BATTERIE${font Helvetica LT Std :size=8}${color whitesmoke}
${alignc}Capacité : ${battery_percent BAT0}% 
${alignc}${battery_bar 4,80}
${color white}${font Helvetica LT Std :size=8:weight=bold}
${alignc}WIFI${font Helvetica LT Std :size=8}${color whitesmoke}
${alignc}Qualité :${wireless_link_qual_perc wlan0} % 
${alignc}${wireless_link_bar 4,80 wlan0}

${color whitesmoke}${font Helvetica LT Std :size=8:weight=bold}${goto 20}Process${goto 90}CPU${goto 140}MEM
${font Helvetica LT Std :size=8}${goto 20}${top name 1}${goto 85}${top cpu 1}%${goto 135}${top mem 1}%
${goto 20}${top name 2}${goto 85}${top cpu 2}%${goto 135}${top mem 2}%
${goto 20}${top name 3}${goto 85}${top cpu 3}%${goto 135}${top mem 3}%
${voffset 10}${font Helvetica LT Std :size=8}${goto 20}Machine:${goto 70}$nodename
${goto 20}Distro:${goto 70}${exec cat /etc/issue.net}
${goto 20}Kernel:${goto 70}$kernel

${goto 20}SSID : ${wireless_essid wlan0}
${goto 20}IP      : ${addr wlan0}
${goto 20}IP ext : ${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}

${goto 20}Etat batterie : ${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Discharging"}Se décharge${endif}${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Unknown"}En charge${endif}${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Full"}Pleine${endif}
${goto 20}Consomation : ${execi 30 upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep energy-rate | cut -c 26-29} Watts
${goto 20}CPU : ${hwmon 0 temp 1}C°    M/B : ${hwmon 0 temp 2}C°

"Le hardware c'est ce qu'on frappe quand le software plante" Dicton geek
"Quand les mouettes ont pieds il est temps de virer" Dicton breton
"Sauver un arbre, bouffer un castor" Dicton Bio

Hors ligne

#1065 Le 30/10/2015, à 12:06

zephirin

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

los_tintinos :

Si tu veux virer l'ancre présente sur ton conky :

- afficher fichiers cachés puis linux/.config/plank/dock1/settings
A la ligne ShowDockItem=true
- remplacer true par false


AIO tactile 27" Samsung  i5 8GB DDR3 W11 - tour Antec Asus P5GCMX1333 W11
iMac 27" fin 2009 i5 750 16GBssd2TB cg512 HighSierra - MacBookAir 13" 2017 i5 8GB ssd120 Monterey - MacBookPro mi 2012 8GB DDR3 Catalina

Hors ligne

#1066 Le 01/11/2015, à 21:08

chepioq

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

Pour la nouvelle syntaxe de conky 1.10 j'ai trouvé ceci, si cela peut aider : http://www.manjaro.fr/forum/viewtopic.php?f=20&t=5874
Et aussi ce sujet de quatre pages, mais en anglais : https://bbs.archlinux.org/viewtopic.php?id=199217


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

Hors ligne

#1067 Le 13/11/2015, à 13:55

konrad54

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

Quelqu'un peut t'il me donnez un coup de main pour créer les ligne de code et assemblé des conky a partir de ces code merci d'avance je suis debutant dans le conky et j'ai besoin d'aide

FONCTION BLUETOOTH
       bt_pand (nom_appareil) (intervalle)
              Pan affichage Bluetooth (Personal Area Network) statut de
              nom de l'appareil.
              Nom de l'appareil est spécifié comme un bnep0. (par défaut est bnep0)
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_lq bluetooth_address (intervalle)
              Afficher LINK QUALITÉ de périphérique Bluetooth de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_lq_bar (hauteur), (largeur) bluetooth_address
              bluetooth qualité de la liaison de l'appareil de bluetooth_address en bar.

       bt_tpl bluetooth_address (intervalle)
              Niveau Courant Puissance de transmission du dispositif Bluetooth Affichage de
              bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_max_tpl bluetooth_address (intervalle)
              Max Puissance de transmission Niveau d'affichage du dispositif de bluetooth
              bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_rssi bluetooth_address (intervalle)
              RSSI (Receiver Signal Strength Display périphérique Bluetooth
              Niveau de l'indicateur) de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_name bluetooth_address (intervalle)
              Afficher le nom des cordes de périphérique Bluetooth de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_num (intervalle)
              Connected display nombre de périphériques Bluetooth.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       if_bt bluetooth_address
              si bluetooth_address existe dans la liste connecté, affichage
              tout entre $ if_bt et l'appariement $ endif

       indice de if_bt_idx
              si le dispositif de l'indice de bluetooth existe dans la liste connecté, affichage
              tout entre if_bt_idx $ et l'appariement $ endif
              indice doit être de 0 à 19 (... MAX 7? Je ne sais pas)

       Indice bt_lq_idx (intervalle)
              Même que bt_lq mais index par «index»
       Indice bt_lq_bar_idx
              Même que bt_lq_bar mais index par «index»
       Indice bt_tpl_idx (intervalle)
              Même que bt_tpl mais index par «index»
       Indice bt_max_tpl_idx (intervalle)
              Même que bt_max_tpl mais index par «index»
       Indice bt_rssi_idx (intervalle)
              Même que bt_rssi mais index par «index»
       Indice bt_name_idx (intervalle)
              Même que bt_name mais index par «index»
       Indice bt_addr_idx (intervalle)
              Afficher l'adresse de périphérique Bluetooth par l'indice.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       Indice bt_scan (intervalle)
              Scannez périphérique bluetooth et afficher une partie d'un index.
              Indice d'affichage, adresse, nom et nom du fournisseur.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)
       Indice bt_scan_addr (intervalle)
       indice de bt_scan_name (intervalle)
       bt_scan_vend index (intervalle)
       Indice bt_scan_class (intervalle)
       Indice bt_scan_major (intervalle)
       Indice bt_scan_minor (intervalle)
              Nom / adresse / nom du fournisseur de dispositif aussi afficher détecté /
              classe / texte majeur de classe / texte de la classe mineure

              Note!
              Lorsque le dispositif est pas déjà connecté, le nom du fournisseur requête
              besoin de privilèges root.

       Indice bt_scan_age (intervalle)
              Lorsque le dispositif détecté est invisible, incrémenter âge.
              Si l'âge au cours de la bt_scan_aged_out_min, appareil purger de
              liste des périphériques détectés.

       Indice bt_scan_age_t (intervalle)
              Même que bt_scan_age, mais afficher le format hh: mm: ss.
              HH peut longueur flexible (H, HH, HHH, ...).

       bt_scan_find (intervalle)
              Affichage détecté un nombre de périphériques.

       bt_scan_tick (option)
              fausse ticker du temps jusqu'à la prochaine numérisation dans le deuxième.
              Si l'option 't' ou 'T' est présent, texte par défaut
              «Attendez nnn.n sec. et 'contrôlé' affiche.
              Voici mon code de l'échantillon pour ticker plus émotionnelle.
                  $ {if_match "$ {} bt_scan_tick" == "0"} $ {} color3 enquête $ {color}
                  $ {else} Scannez attendre pour $ {} bt_scan_tick secondes.
                  $ {endif}
             
       bt_scan_bar (hauteur), (largeur) (direction)
              barre défilante faux.
              direction est nombre positif ou négatif pour diriger la barre.

       bt_age_bar (hauteur), (largeur) Index
              Affichage du temps restant de la vie du périphérique détecté dans le bar.
              Calculer à partir de ces paramètres.
              (Heure - La dernière fois vu) / bt_scan_aged_out_min.

       Indice if_bt_scan
              Si l'index existe dans la liste numérisée, affichage
              tout entre if_bt_scan $ et l'appariement $ endif

       if_lbt
              si hci0 Bluetooth local existe, affichage
              tout entre $ if_lbt et l'appariement $ endif

       bt_local
              afficher périphérique Bluetooth local (hci0) Adresse

Hors ligne

#1068 Le 13/11/2015, à 17:31

chepioq

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

konrad54 a écrit :

Quelqu'un peut t'il me donnez un coup de main pour créer les ligne de code et assemblé des conky a partir de ces code merci d'avance je suis debutant dans le conky et j'ai besoin d'aide

FONCTION BLUETOOTH
       bt_pand (nom_appareil) (intervalle)
              Pan affichage Bluetooth (Personal Area Network) statut de
              nom de l'appareil.
              Nom de l'appareil est spécifié comme un bnep0. (par défaut est bnep0)
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_lq bluetooth_address (intervalle)
              Afficher LINK QUALITÉ de périphérique Bluetooth de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_lq_bar (hauteur), (largeur) bluetooth_address
              bluetooth qualité de la liaison de l'appareil de bluetooth_address en bar.

       bt_tpl bluetooth_address (intervalle)
              Niveau Courant Puissance de transmission du dispositif Bluetooth Affichage de
              bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_max_tpl bluetooth_address (intervalle)
              Max Puissance de transmission Niveau d'affichage du dispositif de bluetooth
              bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_rssi bluetooth_address (intervalle)
              RSSI (Receiver Signal Strength Display périphérique Bluetooth
              Niveau de l'indicateur) de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_name bluetooth_address (intervalle)
              Afficher le nom des cordes de périphérique Bluetooth de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_num (intervalle)
              Connected display nombre de périphériques Bluetooth.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       if_bt bluetooth_address
              si bluetooth_address existe dans la liste connecté, affichage
              tout entre $ if_bt et l'appariement $ endif

       indice de if_bt_idx
              si le dispositif de l'indice de bluetooth existe dans la liste connecté, affichage
              tout entre if_bt_idx $ et l'appariement $ endif
              indice doit être de 0 à 19 (... MAX 7? Je ne sais pas)

       Indice bt_lq_idx (intervalle)
              Même que bt_lq mais index par «index»
       Indice bt_lq_bar_idx
              Même que bt_lq_bar mais index par «index»
       Indice bt_tpl_idx (intervalle)
              Même que bt_tpl mais index par «index»
       Indice bt_max_tpl_idx (intervalle)
              Même que bt_max_tpl mais index par «index»
       Indice bt_rssi_idx (intervalle)
              Même que bt_rssi mais index par «index»
       Indice bt_name_idx (intervalle)
              Même que bt_name mais index par «index»
       Indice bt_addr_idx (intervalle)
              Afficher l'adresse de périphérique Bluetooth par l'indice.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       Indice bt_scan (intervalle)
              Scannez périphérique bluetooth et afficher une partie d'un index.
              Indice d'affichage, adresse, nom et nom du fournisseur.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)
       Indice bt_scan_addr (intervalle)
       indice de bt_scan_name (intervalle)
       bt_scan_vend index (intervalle)
       Indice bt_scan_class (intervalle)
       Indice bt_scan_major (intervalle)
       Indice bt_scan_minor (intervalle)
              Nom / adresse / nom du fournisseur de dispositif aussi afficher détecté /
              classe / texte majeur de classe / texte de la classe mineure

              Note!
              Lorsque le dispositif est pas déjà connecté, le nom du fournisseur requête
              besoin de privilèges root.

       Indice bt_scan_age (intervalle)
              Lorsque le dispositif détecté est invisible, incrémenter âge.
              Si l'âge au cours de la bt_scan_aged_out_min, appareil purger de
              liste des périphériques détectés.

       Indice bt_scan_age_t (intervalle)
              Même que bt_scan_age, mais afficher le format hh: mm: ss.
              HH peut longueur flexible (H, HH, HHH, ...).

       bt_scan_find (intervalle)
              Affichage détecté un nombre de périphériques.

       bt_scan_tick (option)
              fausse ticker du temps jusqu'à la prochaine numérisation dans le deuxième.
              Si l'option 't' ou 'T' est présent, texte par défaut
              «Attendez nnn.n sec. et 'contrôlé' affiche.
              Voici mon code de l'échantillon pour ticker plus émotionnelle.
                  $ {if_match "$ {} bt_scan_tick" == "0"} $ {} color3 enquête $ {color}
                  $ {else} Scannez attendre pour $ {} bt_scan_tick secondes.
                  $ {endif}
             
       bt_scan_bar (hauteur), (largeur) (direction)
              barre défilante faux.
              direction est nombre positif ou négatif pour diriger la barre.

       bt_age_bar (hauteur), (largeur) Index
              Affichage du temps restant de la vie du périphérique détecté dans le bar.
              Calculer à partir de ces paramètres.
              (Heure - La dernière fois vu) / bt_scan_aged_out_min.

       Indice if_bt_scan
              Si l'index existe dans la liste numérisée, affichage
              tout entre if_bt_scan $ et l'appariement $ endif

       if_lbt
              si hci0 Bluetooth local existe, affichage
              tout entre $ if_lbt et l'appariement $ endif

       bt_local
              afficher périphérique Bluetooth local (hci0) Adresse

Et avec ça ?
Deux café et l'addition ?


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

Hors ligne

#1069 Le 13/11/2015, à 23:40

konrad54

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

avec sa je veut faire un conky lol mais je pense c'est impossible j'ai essyer plein truc j'arrive pas a le mettre en forme merci

Hors ligne

#1070 Le 13/11/2015, à 23:44

konrad54

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

je suis arrivez a écrire un script déjà c'est pas mal mais mettre le bt dedans impossible

Hors ligne

#1071 Le 14/11/2015, à 16:09

konrad54

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

chepioq a écrit :
konrad54 a écrit :

Quelqu'un peut t'il me donnez un coup de main pour créer les ligne de code et assemblé des conky a partir de ces code merci d'avance je suis debutant dans le conky et j'ai besoin d'aide

FONCTION BLUETOOTH
       bt_pand (nom_appareil) (intervalle)
              Pan affichage Bluetooth (Personal Area Network) statut de
              nom de l'appareil.
              Nom de l'appareil est spécifié comme un bnep0. (par défaut est bnep0)
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_lq bluetooth_address (intervalle)
              Afficher LINK QUALITÉ de périphérique Bluetooth de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_lq_bar (hauteur), (largeur) bluetooth_address
              bluetooth qualité de la liaison de l'appareil de bluetooth_address en bar.

       bt_tpl bluetooth_address (intervalle)
              Niveau Courant Puissance de transmission du dispositif Bluetooth Affichage de
              bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_max_tpl bluetooth_address (intervalle)
              Max Puissance de transmission Niveau d'affichage du dispositif de bluetooth
              bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_rssi bluetooth_address (intervalle)
              RSSI (Receiver Signal Strength Display périphérique Bluetooth
              Niveau de l'indicateur) de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_name bluetooth_address (intervalle)
              Afficher le nom des cordes de périphérique Bluetooth de bluetooth_address.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       bt_num (intervalle)
              Connected display nombre de périphériques Bluetooth.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       if_bt bluetooth_address
              si bluetooth_address existe dans la liste connecté, affichage
              tout entre $ if_bt et l'appariement $ endif

       indice de if_bt_idx
              si le dispositif de l'indice de bluetooth existe dans la liste connecté, affichage
              tout entre if_bt_idx $ et l'appariement $ endif
              indice doit être de 0 à 19 (... MAX 7? Je ne sais pas)

       Indice bt_lq_idx (intervalle)
              Même que bt_lq mais index par «index»
       Indice bt_lq_bar_idx
              Même que bt_lq_bar mais index par «index»
       Indice bt_tpl_idx (intervalle)
              Même que bt_tpl mais index par «index»
       Indice bt_max_tpl_idx (intervalle)
              Même que bt_max_tpl mais index par «index»
       Indice bt_rssi_idx (intervalle)
              Même que bt_rssi mais index par «index»
       Indice bt_name_idx (intervalle)
              Même que bt_name mais index par «index»
       Indice bt_addr_idx (intervalle)
              Afficher l'adresse de périphérique Bluetooth par l'indice.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)

       Indice bt_scan (intervalle)
              Scannez périphérique bluetooth et afficher une partie d'un index.
              Indice d'affichage, adresse, nom et nom du fournisseur.
              intervalle est facultatif (par défaut est la valeur bt_update_interval)
       Indice bt_scan_addr (intervalle)
       indice de bt_scan_name (intervalle)
       bt_scan_vend index (intervalle)
       Indice bt_scan_class (intervalle)
       Indice bt_scan_major (intervalle)
       Indice bt_scan_minor (intervalle)
              Nom / adresse / nom du fournisseur de dispositif aussi afficher détecté /
              classe / texte majeur de classe / texte de la classe mineure

              Note!
              Lorsque le dispositif est pas déjà connecté, le nom du fournisseur requête
              besoin de privilèges root.

       Indice bt_scan_age (intervalle)
              Lorsque le dispositif détecté est invisible, incrémenter âge.
              Si l'âge au cours de la bt_scan_aged_out_min, appareil purger de
              liste des périphériques détectés.

       Indice bt_scan_age_t (intervalle)
              Même que bt_scan_age, mais afficher le format hh: mm: ss.
              HH peut longueur flexible (H, HH, HHH, ...).

       bt_scan_find (intervalle)
              Affichage détecté un nombre de périphériques.

       bt_scan_tick (option)
              fausse ticker du temps jusqu'à la prochaine numérisation dans le deuxième.
              Si l'option 't' ou 'T' est présent, texte par défaut
              «Attendez nnn.n sec. et 'contrôlé' affiche.
              Voici mon code de l'échantillon pour ticker plus émotionnelle.
                  $ {if_match "$ {} bt_scan_tick" == "0"} $ {} color3 enquête $ {color}
                  $ {else} Scannez attendre pour $ {} bt_scan_tick secondes.
                  $ {endif}
             
       bt_scan_bar (hauteur), (largeur) (direction)
              barre défilante faux.
              direction est nombre positif ou négatif pour diriger la barre.

       bt_age_bar (hauteur), (largeur) Index
              Affichage du temps restant de la vie du périphérique détecté dans le bar.
              Calculer à partir de ces paramètres.
              (Heure - La dernière fois vu) / bt_scan_aged_out_min.

       Indice if_bt_scan
              Si l'index existe dans la liste numérisée, affichage
              tout entre if_bt_scan $ et l'appariement $ endif

       if_lbt
              si hci0 Bluetooth local existe, affichage
              tout entre $ if_lbt et l'appariement $ endif

       bt_local
              afficher périphérique Bluetooth local (hci0) Adresse

Et avec ça ?
Deux café et l'addition ?

tu pense y arrivée?

Hors ligne

#1072 Le 14/11/2015, à 19:25

chepioq

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

konrad54 a écrit :

tu pense y arrivée?

Je ne sais même pas par où commencer...


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

Hors ligne

#1073 Le 16/11/2015, à 04:56

konrad54

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

c'est vraiment pas facile pour de vrai moi g du ma a faire quelque choseavec si ya des gent qui veule bien essayé le moi prochain cent euro a la clé payable via paypal

Hors ligne

#1074 Le 18/11/2015, à 00:56

Ferod

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

Bonsoir
Je suis passé à la nouvelle version de conky qui oblige à tout réécrire 1.10. J'ai retardé jusqu'à maintenant la mise à jour mais là je pense qu'elle empêchait la mise à jour d'autres paquets.
Bref le travail qu'avait fait Didier ne fonctionne pas avec la nouvelle version. C'est surtout la météo et je pense tout ce qui utilise json (ça reste assez mystérieux cette partie justement). J'ai des problèmes de ce type en pagaille :

conky: llua_do_call: function conky_main execution failed: ./meteo.lua:128: bad argument #1 to 'floor' (number expected, got nil)

Je comprends bien l'erreur : il y a une variable (ici la pression, mais ça peut être une autre, spécialement un chiffre à virgule) qui n'est pas lue correctement dans le fichier json et qui est donc de type 'nil' et qui bloque lorsque je demande de la tronquer avec la fonction floor.
Donc j'ai dupliqué le fichier meteo.lua (il s'appelle test.lua) et j'ai essayé d'afficher les variables qui bloquent une à une. J'y suis arrivé. Cela veut dire que le fichier json créé est correct et que le code utilisé pour désigné la variable marche à condition d'utiliser la fonction maj() avant.
Par contre ce que je ne comprends pas c'est comment marche le fichier meteo.lua avec script.lua. Dans la fonction principale de 'script.lua' on trouve la commande meteo.maj(departement,"all"). Donc là il y a la mise à jour des données. Ça c'est bon. Par contre quand j'appelle la fonction meteo.info(valeur) pour afficher la pression ou la température, où est stocké la valeur que j'obtient ? Parce que j'ai l'impression que c'est carrément les variables cc ou sj qui ne sont pas initialisées. Est-ce que je dois faire une maj plus haut dans script.lua ?
Voici un lien vers mon package conky "version 1.10" :
https://transfer.sh/12ESGP/conky-1.10
Merci pour toute aide !

Dernière modification par Ferod (Le 22/11/2015, à 10:44)


"When I was in the military, they gave me a medal for killing
two men, and a descharge for loving one !" Leonard Matlovich

Hors ligne

#1075 Le 18/11/2015, à 17:23

chepioq

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

Je suis aussi passer sur conky 1.10 avec ma Fedora 24 rawhide, et chez moi aucun script lua ne veut fonctionner correctement.

J'ai eu beau chercher sur le net, je n'ai trouvé nulle part un tuto expliquant comment fonctionne un script .lua avec cette nouvelle version.
Quelqu'un aurait une idée, ou un lien ?


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

Hors ligne