Hum, je suis bien embêté avec mon conky sous xfce...
En fait, il se lance plusieurs fois ...
J'ai fait un petit script ~/.conkyScript.sh afin de bien faire un killall et ensuite de lancer mes conky comme il le faut mais j'ai l'impressioj que le script est éxécuté trop tôt (et donc qu'après le système lance d'autre conky par dessus :/)

Quelqu'un a t'il déjà été confronté à ce problème ?
avec un

sleep <nombre de seconde>


en début de script, il n'executera les commandes suivantes de ton script qu'après le nombre de seconde donné... commence avec un sleep 20 et tu verras bien ce que ça donne.. mais si il lance plusieurs fois ton conky, c'est que tu as dû lui demander.. donne nous plutôt ton script que l'on puisse t'aider...
Même en faisant ça salement ça ne fonctionne pas :
[Arkezis@localhost ~]$ more .conkyScript.sh 
#!/bin/bash
killall conky
sleep 30
killall conky
sleep 20

conky
#conky -c /home/Arkezis/.conkyrc
conky -c /home/Arkezis/.conky/conkyrc2

killall conky
sleep 50

conky
conky -c /home/Arkezis/.conky/conkyrc2
attends mais pour qu'il lance un conky avant l'execution de ton script il faut que tu lui ais demandé de lancer un conky on est d'accord ? tu n'as pas dans je ne sais quel lanceur automatique demandé de lancer conky ? C'est on ne peut plus embrouillé on dirait, explique nous les démarches que tu as faites. (Dans système>préférence>systeme>session ou son équivalent dans XFCE tu as demandé l'exécution de quoi ?) comment demandes-tu le lancement de ton script ?

Je suppose que XFCE est comme n'importe quel gnome ou kde. il ne lance rien si on ne lui a rien demandé.. si tu es obligé de faire des killall.. c'est qu'à un moment tu as demandé le lancement de ces conky.. va plutôt dans ce sens..
Je sais très bien et c'est que je passe mon temps à bidouiller 😉 !

J'ai beau avoir viré conky des lanceurs au démarrage, avoir décoché "Charger les services Gnome au démarrage" (même si ça n'a rien à voir je pense), il me lance quand même mes conkyrc !
Et ce qui est le plus bizarre, c'est qu'il me lance même mon conkyrc2 !!
[Arkezis@localhost ~]$ ps -def | grep conky
Arkezis  19036     1  1 15:13 ?        00:00:01 conky -c /home/Arkezis/.conky/conkyrc2
Arkezis  19038     1  1 15:13 ?        00:00:01 conky -c /home/Arkezis/.conky/conkyrc2
Arkezis  19044     1  0 15:13 ?        00:00:00 conky
Arkezis  19047     1  0 15:13 ?        00:00:00 conky
Arkezis  19048     1  0 15:13 ?        00:00:00 conky
Arkezis  19049     1  0 15:13 ?        00:00:00 conky
Arkezis  19050     1  0 15:13 ?        00:00:00 conky -c /home/Arkezis/.conkyrc
Arkezis  19051     1  0 15:13 ?        00:00:00 conky -c /home/Arkezis/.conkyrc
Arkezis  20052 18979  0 15:15 pts/0    00:00:00 grep conky
VOilà ce que j'ai après un boot !
Sachant que le script conkyScript.sh n'a pas été éxécuté !
Je ne peux pas aller dans tes souvenirs pour savoir où tu as demandé le lancement de tes conky... C'est à toi de trouver .. le bashrc peut être..
Ben justement, c'est ça qui est chaud ...
J'avais ce problème avant ma réinstallation donc j'ai fait gaffe de pas trifouiller partout !

C'est pour ça que j'aimerais qu'un utilisateur de XFCE me dise s'il a été confronté à ce problème ^^
Dans kde, il y a une option pour lancer une session vide quand tu re-démarre, sinon tu re-démarre avec sous la session précédente (donc avec tes conky lancés).
Sous gnome et XFCE il doit y avoir le même genre d'option, mais je ne sais pas ou cela se trouve...
Bon, j'ai réussi à me démerder pour lancer une session vide à chaque démarrage . Le problème c'est qu'à chaque fois je dois donner un nom à ma session à et me prend 3 clics de plus ... Donc faudra que j'essayes de trouver le fichier de conf qui s'occupe de ça ^^



En attendant, je vous file mes conkyrc :
Mon ~/.conkyScript.sh :
#!/bin/bash
killall conky
sleep 20

conky
conky -c /home/Arkezis/.conky/conkyrc2
Mon ~/.conkyrc (le conky du haut) :
# set to yes if you want Conky to be forked in the background
background yes

cpu_avg_samples 2
net_avg_samples 2

short_units yes

out_to_console no

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont monospace-8

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 1

# Create own window instead of using desktop (required in nautilus)
own_window_transparent yes
own_window_colour black
own_window yes
own_window_type root
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 300 5
maximum_width 450

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 5

# border width
border_width 0

# drawn 1 pixel border around graphs or not
draw_graph_borders yes

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

# Text alignment, other possible values are commented
alignment top_right

# Gap between borders of screen and text

gap_x 490
gap_y 10

# Add spaces to keep things from moving about?  This only affects certain objects.
#use_spacer right

# Subtract file system buffers from used memory?
no_buffers no

# set to yes if you want all text to be in uppercase
uppercase no

#A lot of text in Conky ?
text_buffer_size 1024

####################################
####################################
####################################
####################################
TEXT
${font Verdana:size=11}$alignc${color #DBAA82}${Time %A %d %B %Y} 
$alignc${color #FFFB00}${time %H:%M:%S}${font Sans:size=8.5}
${color #565868}${hr 2}
${color #DBAA82}$sysname : ${color #565868}$kernel ${color #DBAA82}on ${color #565868}$machine
${color #DBAA82}Uptime : ${color #B6A291}$uptime | ${color #DBAA82}Temp : ${color #B6A291}${acpitemp}°C
${color #DBAA82}Adaptateur : ${color #FFFB00}${acpiacadapter}
${color #DBAA82}Autonomie batterie : ${color #FFFB00}${battery_percent BAT0}%
${color #FFFB00}${battery_bar BAT0}
${color #DBAA82}Charge cpu : (${color #FFFB00}${freq} MHz${color #DBAA82}) cpu 1: ${color #FFFB00}${cpu cpu1}%  ${color #DBAA82}cpu 2: ${color #FFFB00}${cpu cpu2}%
$alignc${color #FFFFFF}${cpugraph cpu1 32,100 0000ff ff4500} ${color #FFFFFF} ${cpugraph cpu2 32,100 0000ff ff4500}
${color #DBAA82}ram : ${color #3652FF}$mem ${color #DBAA82}/ $memmax - ${color #FFFB00}$memperc% ${alignr 140}${color #344299}$membar
${color #DBAA82}swap : ${color #3652FF}$swap ${color #DBAA82}/ $swapmax - ${color #FFFB00}$swapperc% ${alignr 140}${color #344299}$swapbar
${color #565868}${hr 2}
${color #DBAA82}Disques (${color #FFFB00}${execi 10 hddtemp -n /dev/sda}°C${color #DBAA82}) :
${color #DBAA82}racine : ${color #3652FF}${fs_used /} ${color #DBAA82}/ ${fs_size /} (${color #FFFB00}${fs_free_perc /}% ${color #DBAA82}libre)
${color #344299}${fs_bar /}
${color #DBAA82}home : ${color #3652FF}${fs_used /home/Arkezis} ${color #DBAA82}/ ${fs_size /home/Arkezis} (${color #FFFB00}${fs_free_perc /home/Arkezis}% ${color #DBAA82}libre)
${color #344299}${fs_bar /home/Arkezis}
${color #DBAA82}data : ${color #3652FF}${fs_used /mnt/data} ${color #DBAA82}/ ${fs_size /mnt/data} (${color #FFFB00}${fs_free_perc /mnt/data}% ${color #DBAA82}libre)
${color #344299}${fs_bar /mnt/data}
${if_mounted /media/disk}${color #DBAA82}clé(ext) : ${color #3652FF}${fs_used /media/disk} ${color #DBAA82}/ ${fs_size /media/disk} (${color #FFFB00}${fs_free_perc /media/disk}% ${color #DBAA82}libre)
${color #344299}${fs_bar /media/disk}${else}${color #DBAA82}${alignc}clé non montée$endif
Et mon ~/.conky/conkyrc2 (celui du bas) :
# set to yes if you want Conky to be forked in the background
background yes

cpu_avg_samples 2
net_avg_samples 2

short_units yes

out_to_console no

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont monospace-8

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 1

# Create own window instead of using desktop (required in nautilus)
own_window_transparent yes
own_window_colour black
own_window yes
own_window_type root
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 200 255
maximum_width 500
maximum_height 500

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 0

# border width
border_width 0

# drawn 1 pixel border around graphs or not
draw_graph_borders yes

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

# Text alignment, other possible values are commented
alignment bottom_right

# Gap between borders of screen and text

gap_x 515
gap_y 150

# Add spaces to keep things from moving about?  This only affects certain objects.
#use_spacer right

# Subtract file system buffers from used memory?
no_buffers no

# set to yes if you want all text to be in uppercase
uppercase no

#A lot of text in Conky ?
text_buffer_size 1024

####################################
####################################
####################################
####################################
TEXT
${color #DBAA82}Processus${alignr 52}PID ${alignr 20} %cpu
${color #FFFB00}${top name 1}${alignr 38}${top pid 1} ${alignr 20} ${top cpu 1}
${color #565868}${top name 2}${alignr 38}${top pid 2} ${alignr 20} ${top cpu 2}
${color #565868}${top name 3}${alignr 38}${top pid 3} ${alignr 20} ${top cpu 3}
${color #565868}${top name 4}${alignr 38}${top pid 4} ${alignr 20} ${top cpu 4}
${color #565868}${top name 5}${alignr 38}${top pid 5} ${alignr 20} ${top cpu 5}
${color #565868}${hr 2}
${color #DBAA82}Processus$color ${alignr 52}PID ${alignr 20} %mem
${color #FFFB00}${top_mem name 1}${alignr 26}${top_mem pid 1}  ${alignr 14} ${top_mem mem 1}${color #ffc11f} 
${color #565868}${top_mem name 2}${alignr 26}${top_mem pid 2}  ${alignr 14} ${top_mem mem 2}${color #ffc11f} 
${color #565868}${top_mem name 3}${alignr 26}${top_mem pid 3}  ${alignr 14} ${top_mem mem 3}${color #ffc11f} 
${color #565868}${top_mem name 4}${alignr 26}${top_mem pid 4}  ${alignr 14} ${top_mem mem 4}${color #ffc11f} 
${color #565868}${top_mem name 5}${alignr 26}${top_mem pid 5}  ${alignr 14} ${top_mem mem 5}${color #ffc11f} 
${color #565868}${hr 2}
${if_existing /proc/net/route eth0}${color #DBAA82}Ethernet : $color${addr eth0}
${color #DBAA82}Download : $color${downspeed eth0} kiB/s ${alignr}${color #DBAA82}Upload : $color${upspeed eth0} kiB/s
${color #DBAA82}Total : $color${totaldown eth0} ${alignr}${color #DBAA82}Total : $color${totalup eth0}
$endif${if_existing /proc/net/route wlan0}${color #DBAA82}Wi-Fi : $color${wireless_bitrate wlan0} ${alignr}${color #DBAA82}IP Locale : $color${addr wlan0}
${color #DBAA82}Signal : $color${wireless_link_qual wlan0} % ${color2}${wireless_link_bar wlan0}
${color #DBAA82}SSID : $color${wireless_essid wlan0} ${alignr}${color #DBAA82}MAC : $color${wireless_ap wlan0}
${color #DBAA82}Download : $color${downspeed wlan0} kiB/s ${alignr}${color #DBAA82}Upload : $color${upspeed wlan0} kiB/s
${color #DBAA82}Total : $color${totaldown wlan0} ${alignr}${color #DBAA82}Total : $color${totalup wlan0}
$endif
un mois plus tard
Bonjour
En furetant un peu sur le forum anglais de ubuntu, j'ai trouvé une commande pour pouvoir afficher le nom et la version de fedora (ou d'une autre distribution)
[dominique@Dominique ~]$ lsb_release -d
Description:    Fedora release 10 (Cambridge)
[dominique@Dominique ~]$ lsb_release -i
Distributor ID:    Fedora
[dominique@Dominique ~]$ lsb_release -r
Release:    10
[dominique@Dominique ~]$ lsb_release -c
Codename:    Cambridge
Je l'ai intégré a mon conky:
background no
font 6x10
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
#minimum_size 280 5
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
gap_x 12
gap_y 270
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right

TEXT
${font MgOpen Modata L:size=12:bold} $alignc ${color #cd5555}${execi 1800 lsb_release -d | awk '{print $2$4}'} ${execi 1800 lsb_release -c | awk '{print $2}'}
${font} $alignc ${color #cd5555}$sysname $kernel on $machine
${color #000080}$stippled_hr
${color #cd5555}Système de fichiers ouvert depuis: ${color #11B3F8}$uptime
${color #cd5555}Fréquence CPU: ${color #11B3F8}$freq
${color #0000ff}${cpugraph cpu1 32,181 0000ff ff4500} ${color #0000ff}${cpugraph cpu2 32,181 0000ff ff4500}
${color #cd5555}Utilisation Core 1:          ${color #11B3F8}${cpu cpu1}%                  ${color #cd5555}Utilisation Core 2:          ${color #11B3F8}${cpu cpu2}% 
${color #cd5555}Température Core 1:  ${color #11B3F8}${exec sensors | grep 0: | awk '{print $3}'}               ${color #cd5555}Température Core 2:  ${color #11B3F8}${exec sensors | grep 1: | awk '{print $3}'}
${color #000080}$stippled_hr
${color #cd5555}Version du pilote NVidia: ${color #11B3F8}${execi 1800 nvidia-settings -q NvidiaDriverVersion | grep Attribute |  awk '{print $4}'}
${color #cd5555}Température GPU:     ${color #11B3F8}${exec nvidia-settings -q gpucoretemp | grep Attribute | awk '{print $4}' | cut -c1-2}°C ${color #cd5555}            Fréquence GPU:     ${color #11B3F8}${exec nvidia-settings -q GPUCurrentClockFreqs | grep Attribute | awk '{print $4}' | cut -c1-7} Mhz
${color #000080}$stippled_hr
${color #cd5555}Utilisation RAM ${color #0000ff}$alignc           Totale           Utilisée          Pourcentage
$alignc ${color #11B3F8}$memmax           $mem            $memperc%
${color #0000ff}${memgraph 0000ff ff4500}
${color #cd5555}Utilisation Swap :   ${color #11B3F8} $swap/$swapmax - $swapperc% ${color #00f5ff} ${swapbar}
${color #000080}$stippled_hr
${color #cd5555}Internet:
${color #0000ff}Reception:${color #ff4500} ${downspeedf eth0} k/s                      ${color #11B3F8}       Envoi: ${color #ff4500}${upspeedf eth0} k/s
${color #0000ff}Total:       ${color #ff4500} ${totaldown eth0}                               ${color #11B3F8}Total:${color #ff4500} ${totalup eth0}
${color #0000ff}${downspeedgraph eth0 32,181 0000ff ff4500} ${color #22ccff}${upspeedgraph eth0 32,181 0000ff ff4500}
${color #000080}$stippled_hr
${color #cd5555}Systèmes de fichiers:
${color #cd5555}Système ${color #11B3F8} ${fs_used /} / ${fs_size /}: ${color #00f5ff}${fs_bar /}
${color #cd5555}Home      ${color #11B3F8} ${fs_used /home} / ${fs_size /home} : ${color #00f5ff}${fs_bar /home}
${color #000080}$stippled_hr
${color #cd5555}Processus : ${color #11B3F8}$processes       ${color #11B3F8}En cours: ${color #ff4500}$running_processes
${color #0000ff}En cours:       $alignc       PID      CPU%      MEM%
${color #ff4500} ${top name 1}  $alignc  ${top pid 1}      ${top cpu 1}      ${top mem 1}
${color #11B3F8} ${top name 2}  $alignc  ${top pid 2}      ${top cpu 2}      ${top mem 2}
${color #11B3F8} ${top name 3}  $alignc  ${top pid 3}      ${top cpu 3}      ${top mem 3}
${color #11B3F8} ${top name 4}  $alignc  ${top pid 4}      ${top cpu 4}      ${top mem 4}
${color #0000ff}En mémoire:
${color #ff4500} ${top_mem name 1} $alignc   ${top_mem pid 1}      ${top_mem cpu 1}      ${top_mem mem 1}
${color #11B3F8} ${top_mem name 2} $alignc   ${top_mem pid 2}      ${top_mem cpu 2}      ${top_mem mem 2}
${color #11B3F8} ${top_mem name 3} $alignc   ${top_mem pid 3}      ${top_mem cpu 3}      ${top_mem mem 3}
Et voila le résultat:
22 jours plus tard
Salut!
Je voudrais faire un conky permettant d'afficher la musique que j'écoute. Le problème sait que suivant mon humeur
j'utilise soit amarok2 ou rhythmbox. Pour le deuxième il n'y a pas de soucis., mais je n'arrive pas à récupérer la durée totale de la musique et
là ou l'on en est rendu.

mon .conkyrc
${if_running rhythmbox}
Rhythmbox
Titre : ${execi 1 rhythmbox-client --no-start --print-playing-format "%tt"}
Artiste : ${execi 1 rhythmbox-client --no-start --print-playing-format "%aa"}
Album : ${execi 1 rhythmbox-client --no-start --print-playing-format "%at"}
Durée : ${execi 1 rhythmbox-client --no-start --print-playing-format "%te / %td"}
$endif
${if_running amarok}
Amarok
Artiste : ${execi 1 ~/.conky/amarok artist}
Titre : ${execi 1 ~/.conky/amarok title}
Album : ${execi 1 ~/.conky/amarok album}
$endif
et mon fichier amarok
#!/bin/bash
# amaroK info display script by eirc <eirc.eirc@gmail.com>

case "$1" in

# Now Playing Info
artist) qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata |grep ^artist:|cut -d ":" -f2;;
title)  qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata |grep ^title:|cut -d ":" -f2;;
album)  qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata |grep ^album:|cut -d ":" -f2;;

progress)       // voilà les lignes que je 'arrive pas à faire fonctionner
    curr=`qdbus org.kde.amarok trackCurrentTime`  
    tot=`qdbus org.kde.amarok trackTotalTime`
    if (( $tot )); then
        expr $curr \* 100  / $tot
    fi
    ;;

esac
le script amarok fonctionnait bien avec amarok mais plus sous amarok2 !!! Et je ne suis pas une terreur des commandes bash :hammer::hammer:

Avec la commande :
qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata|grep ^time:
j'arrive à récupérer la durée totale en seconde (je crois...) mais c'est tout.
Et j'ai encore rien trouve sur le net.
20 jours plus tard
Alors j'ai réussi à résoudre mon problème, en pompant à droite à gauche ( doc ubuntu surtout ) et en faisant aussi un peu fonctionner
mes méninges,
je poste du coup le resultat, même si je pense que sa peut facilement être amélioré ( le shell n'est pas ma langue maternelle :-D ) :

~/.conky/rhythmbox
#!/bin/bash

case "$1" in

# Now Playing Info
artist) rhythmbox-client --no-start --print-playing-format "%aa";;
title)  rhythmbox-client --no-start --print-playing-format "%tt";;
album)  rhythmbox-client --no-start --print-playing-format "%at";;
courant)rhythmbox-client --no-start --print-playing-format "%te/%td";;
progress)
    curr=`rhythmbox-client --no-start --print-playing-format "%te" | grep -v "Pas de lecture en cours"`
    tot=`rhythmbox-client --no-start --print-playing-format "%td" | grep -v "Pas de lecture en cours" | grep -v Inconnu`
    a=`date +'%S' | sed 's/^0\+//'`
if [ "$a" = "" ]; then
    a=0
fi
    b=$(( ($a*100) / 30 ))
    c=$(( 200-$b ))
#si pas de durée totale, augmente pendant les 30 premieres secondes puis diminu pendant les 30 suivantes...
    if [ "$tot" = "" ]; then 
    if [ $a -le 30 ]; then
       expr $b
    else
       expr $c
    fi
    else
#Si durée totale déterminée, il faut traiter le retour de la commande donnant $curr (pour courant et $tot pour total, logique) qui renvoit une donné sous la forme hh:mm:ss
    d="1"
    nbcurr=`echo $curr | wc -m`       #nbr de caractères permet de déterminer si il y a seulement m:ss ou si il y a h:mm:ss (au minimum, m:ss)
    posm=$(( $nbcurr-5 ))             #pour faire une commande cut générique, il faut définir l'endroit ou on coupe d'ou posx (position des minutes ici)
if [ $posm -lt $d ]; then
posm=``                               #Si position inférieur à 1, renvoit variable vide pour ne pas bloque cut
fi
    posm2=$(( $nbcurr-4 ))            #Forcément 1 indication minute (minimum)= pas besoin de vérifier si >1
    posh=$(( $nbcurr-8 ))             #Idem pour les heures
if [ $posh -lt $d ]; then
posh=``
fi
    posh2=$(( $nbcurr-7 ))
    currs=`echo $curr | tail -c3 | sed 's/^0\+//'` # Récupération des secondes forcément à la fin et supression du premier 0 pour ne pas avoir de problème de base (08 en hexa ou base 10)
if [ "$currs" = "" ]; then
    currs=0                          #si uniquement des zeros, ils sont tous supprimé donc redonner la valeur
fi
    currma=`echo $curr | cut -c$posm-$posm2 | sed 's/^0\+//'`
if [ "$currma" = "" ]; then
    currma=0                         #idem pour minutes
fi
    currm=$(( $currma*60 ))          #conversion en secondes
if [ $posh2 -lt $d ]; then
currh=0
else
    currha=`echo $curr | cut -c$posh-$posh2 | sed 's/^0\+//'`
if [ "$currha" = "" ]; then         #idem heures
    currha=0
fi
currh=$(( $currha*3600 ))          # conversion en secondes
fi

    currt=$(( ($currh+$currm) + $currs )) #calcule du nombre de secondes total

    nbtot=`echo $tot | wc -m`      #Même schema pour la suite mais avec la durée totale
    tposm=$(( $nbtot-5 ))
if [ $tposm -lt $d ]; then
tposm=``
fi
    tposm2=$(( $nbtot-4 ))
    tposh=$(( $nbtot-8 ))
if [ $tposh -lt $d ]; then
tposh=``
fi
    tposh2=$(( $nbtot-7 ))
    tots=`echo $tot | tail -c3 | sed 's/^0\+//'` ## OK
if [ "$tots" = "" ]; then
    tots=0
fi
    totma=`echo $tot | cut -c$tposm-$tposm2 | sed 's/^0\+//'` ## OK
if [ "$totma" = "" ]; then
    totma=0
fi
    totm=$(( $totma*60 )) ## OK
if [ $tposh2 -lt $d ]; then
toth=0
else
    totha=`echo $tot | cut -c$tposh-$tposh2 | sed 's/^0\+//'` ## OK
if [ "$totha" = "" ]; then
    totha=0
fi
toth=$(( $totha*3600 )) ## OK
fi

    tott=$(( ($toth+$totm) + $tots )) ## OK
        expr $currt \* 100  / $tott    #Et finalement expression du pourcentage accompli
    fi
    ;;
esac
le script amarok fonctionne avec amarok2
~/.conky/amarok
#!/bin/bash                     
#fetch conky amarok2 information
#by Mjheagle8                   
#requires: amarok >= 2.0, qdbus 
#[ $(pgrep amarok) ] || exit  #This just tests whether amarok is running and exits if it's not.

case "$1" in
    version)
        qdbus org.kde.amarok / Identity   # There's no point in using an echo here when the qdbus command will spit out the information itself.
        ;;                                # Also, with qdbus, it's not necessary to call the full method interface. Just 'Identity' here suffices.
    artist)                                                                                                                                       
        qdbus org.kde.amarok /Player GetMetadata | grep artist: | cut -c 9-                                                                       
        ;;                                # When you're using the cut command, it's not necessary to supply an ending position if you just want to cut to the end.
                                         title)                                                                                                                                                        
        qdbus org.kde.amarok /Player GetMetadata | grep title: | cut -c 8-                                                                                        
        ;;                                                                                                                                                        
    album)                                                                                                                                                        
        qdbus org.kde.amarok /Player GetMetadata | grep album: | cut -c 8-
        ;;
    year)
        qdbus org.kde.amarok /Player GetMetadata | grep year: | cut -c 7-
        ;;
    genre)
        qdbus org.kde.amarok /Player GetMetadata | grep genre: | cut -c 8-
        ;;
    bitrate)
        echo `qdbus org.kde.amarok /Player GetMetadata | grep audio-bitrate: | cut -c 16-`' Kb/s'
        ;;
    rating)
        qdbus org.kde.amarok /Player GetMetadata | grep rating: | cut -c 9-
        ;;
    type)
        type=`qdbus org.kde.amarok /Player GetMetadata | grep location:`
        echo ${type:(-3)}                  # Here we're using bash string manipulation to pick off the last three characters.
        ;;
    time)
        pos=$((`qdbus org.kde.amarok /Player PositionGet`/1000)) # Here we divide by 1000 without using an intermediate variable.
    time=$((`qdbus org.kde.amarok /Player GetMetadata | grep mtime: | cut -c 8-`/1000))
    currm=$((pos/60))
    currs=$((pos%60))
    totm=$((time/60))
    tots=$((time%60))
    if [ $((currm/60)) -lt 10 ]; then
        currm=`~/.conky/conversion.sh $currm`
    fi
    if [ $((currs%60)) -lt 10 ]; then
        currs=`~/.conky/conversion.sh $currs`
    fi
    if [ $((totm/60)) -lt 10 ]; then
        totm=`~/.conky/conversion.sh $totm`
    fi
    if [ $((tots%60)) -lt 10 ]; then
        tots=`~/.conky/conversion.sh $tots`
    fi
    echo $currm:$currs / $totm:$tots
    ;;
    timeperc)
        pos=$((`qdbus org.kde.amarok /Player PositionGet`/10))
        time=$(`qdbus org.kde.amarok /Player GetMetadata | grep mtime: | cut -c 8-`/1000)
        echo $((pos/time))
        ;;
    progress)
    pos=$((`qdbus org.kde.amarok /Player PositionGet`/1000)) # Here we divide by 1000 without using an intermediate variable.
    time=$((`qdbus org.kde.amarok /Player GetMetadata | grep mtime: | cut -c 8-`/1000))
    currm=$((pos/60))
    currs=$((pos%60))
    totm=$((time/60))
    tots=$((time%60))
    if [ $((currm/60)) -lt 10 ]; then
        currm=`~/.conky/conversion.sh $currm`
    fi
    if [ $((currs%60)) -lt 10 ]; then
        currs=`~/.conky/conversion.sh $currs`
    fi
    if [ $((totm/60)) -lt 10 ]; then
        totm=`~/.conky/conversion.sh $totm`
    fi
    if [ $((tots%60)) -lt 10 ]; then
        tots=`~/.conky/conversion.sh $tots`
    fi
    curr=$currm:$currs
    tot=$totm:$tots
    a=`date +'%S' | sed 's/^0\+//'`
    if [ "$a" = "" ]; then
        a=0
    fi
        b=$(( ($a*100) / 30 ))
     c=$(( 200-$b ))
    #si pas de durée totale, augmente pendant les 30 premieres secondes puis diminu pendant les 30 suivantes...
       if [ "$tot" = "" ]; then 
        if [ $a -le 30 ]; then
            expr $b
            else
            expr
        fi
    else
    #Si durée totale déterminée, il faut traiter le retour de la commande donnant $curr (pour courant et $tot pour total, logique) qui renvoit une donné sous la forme hh:mm:ss
        d="1"
        nbcurr=`echo $curr | wc -m`       #nbr de caractères permet de déterminer si il y a seulement m:ss ou si il y a h:mm:ss (au minimum, m:ss)
        posm=$(( $nbcurr-5 ))             #pour faire une commande cut générique, il faut définir l'endroit ou on coupe d'ou posx (position des minutes ici)
    if [ $posm -lt $d ]; then
    posm=``                               #Si position inférieur à 1, renvoit variable vide pour ne pas bloque cut
    fi
      posm2=$(( $nbcurr-4 ))            #Forcément 1 indication minute (minimum)= pas besoin de vérifier si >1
      posh=$(( $nbcurr-8 ))             #Idem pour les heures
    if [ $posh -lt $d ]; then
    posh=``
    fi
    posh2=$(( $nbcurr-7 ))
        currs=`echo $curr | tail -c3 | sed 's/^0\+//'` # Récupération des secondes forcément à la fin et supression du premier 0 pour ne pas avoir de problème de base (08 en hexa ou base 10)
    if [ "$currs" = "" ]; then
        currs=0                          #si uniquement des zeros, ils sont tous supprimé donc redonner la valeur
    fi
        currma=`echo $curr | cut -c$posm-$posm2 | sed 's/^0\+//'`
    if [ "$currma" = "" ]; then
        currma=0                         #idem pour minutes
    fi
    currm=$(( $currma*60 ))          #conversion en secondes
    if [ $posh2 -lt $d ]; then
        currh=0
    else
            currha=`echo $curr | cut -c$posh-$posh2 | sed 's/^0\+//'`
        if [ "$currha" = "" ]; then         #idem heures
            currha=0
        fi
        currh=$(( $currha*3600 ))          # conversion en secondes
    fi

    currt=$(( ($currh+$currm) + $currs )) #calcule du nombre de secondes total
    nbtot=`echo $tot | wc -m`      #Même schema pour la suite mais avec la durée totale
    tposm=$(( $nbtot-5 ))
    if [ $tposm -lt $d ]; then
        tposm=``
    fi
      tposm2=$(( $nbtot-4 ))
      tposh=$(( $nbtot-8 ))
    if [ $tposh -lt $d ]; then
        tposh=``
    fi
         tposh2=$(( $nbtot-7 ))
          tots=`echo $tot | tail -c3 | sed 's/^0\+//'` ## OK
    if [ "$tots" = "" ]; then
        tots=0
    fi
        totma=`echo $tot | cut -c$tposm-$tposm2 | sed 's/^0\+//'` ## OK
    if [ "$totma" = "" ]; then
        totma=0
    fi
        totm=$(( $totma*60 )) ## OK
    if [ $tposh2 -lt $d ]; then
        toth=0
    else
        totha=`echo $tot | cut -c$tposh-$tposh2 | sed 's/^0\+//'` ## OK
        if [ "$totha" = "" ]; then
                totha=0
        fi
        toth=$(( $totha*3600 )) ## OK
    fi

        tott=$(( ($toth+$totm) + $tots )) ## OK
        expr $currt \* 100  / $tott    #Et finalement expression du pourcentage accompli
    fi
    ;;
esac
conversion.sh est utilisé dans le script amarok pour caster les durées toujours au même format (mm:ss)
~/.conky/conversion.sh
#!/bin/bash

case "$1" in

0) printf "%02.f\n" "0";;
1) printf "%02.f\n" "1";;
2) printf "%02.f\n" "2";;
3) printf "%02.f\n" "3";;
4) printf "%02.f\n" "4";;
5) printf "%02.f\n" "5";;
6) printf "%02.f\n" "6";;
7) printf "%02.f\n" "7";;
8) printf "%02.f\n" "8";;
9) printf "%02.f\n" "9";;

esac
.conkyrc2
${if_running rhythmbox}
${color3}${font DIST Yolks Emoticons:size=25} L  ${font SVBasicManual:style=Bold:size=16}Rhythmbox
${font Sans:style=Bold:pixelsize=10}${color2}Artiste : ${color1}${execi 1 ~/.conky/rhythmbox artist}
${color2}Titre : ${color1}${execi 1 ~/.conky/rhythmbox title}
${color2}Album : ${color1}${execi 1 ~/.conky/rhythmbox album}
${color2}Durée : ${color1}${execibar 1 $HOME/.conky/rhythmbox progress}
${alignr}${color1}${execi 1 ~/.conky/rhythmbox courant}$endif
${if_running amarok}${color #F0C300}${font DIST Yolks Emoticons:size=25} L  ${font SVBasicManual:style=Bold:size=16}Amarok
${font Sans:style=Bold:pixelsize=10}${color2}Artiste : ${color1}${execi 1 ~/.conky/amarok artist}
${color2}Titre : ${color1}${execi 1 ~/.conky/amarok title}
${color2}Album : ${color1}${execi 1 ~/.conky/amarok album}
${color2}Bitrate : ${color1}${execi 1 ~/.conky/amarok bitrate}
${color2}Durée : ${color1}${execibar 1 $HOME/.conky/amarok progress}
${color2}${alignr}${color1}${execi 1 ~/.conky/amarok time}
$endif
Ainsi suivant que je lance amarok2 ou rhythmbox les scripts respectifs se lancent :pint:
une petite image est toujours plus explicite...


P.S : désolé pour la tartine ( je poste pas souvent mais quand j'y vais je me fais plaisir :-D)
7 jours plus tard
Salut à tous!!
je sais pas si y aura l'image, c'est la premiere fois que je fais ça...je vous montre pas mon script, c'est un vrai torchon...mais je dois l'arranger encore
winix wrote:Salut à tous!!
je sais pas si y aura l'image, c'est la premiere fois que je fais ça...je vous montre pas mon script, c'est un vrai torchon...mais je dois l'arranger encore
http://forums.fedora/url-Capture.png
Quelqu'un pourrai me dire comment on fait pour mettre une pitite image :-D
winix wrote:Quelqu'un pourrai me dire comment on fait pour mettre une pitite image :-D
Oui, c'est assez simple. Il faut que tu héberge l'image quelque part sur Internet.
Ensuite, tu utilises la balise [ img ] dans le texte du message pour l'afficher.
Voila, je fais un essai


Aaaaah aprés trois aissé j'y suis arrivé,:-D
2 mois plus tard
bon voila le mien, je debute ^^
mon bureau
J'ai mis un fond d'ecran dynamique qui evolue selon l'heure de la journée,
Vous en pensez quoi?
c'est u bon début, il y a longtemps que je ne me suis pas repenché sur les évolutions des script..
merci, je suis sous gnome
un mois plus tard
Popov wrote:bon voila le mien, je debute ^^
mon bureau
J'ai mis un fond d'ecran dynamique qui evolue selon l'heure de la journée,
Vous en pensez quoi?
J'avais pas remarqué, tu as le même Uptime Max que moi :hammer:
Je l'avais ajouté à la mano par fierté de mon score :lol:
Malheureusement je n'ai pas trouvé de commande qui puisse indiquer l'uptime maximum d'une machine :roll:

Je pense qu'il faudrait un processus daemon qui inscrive constamment dans un fichier texte l'uptime en cours. (après à savoir si ça pomperait des ressources d'inscrire constamment...ou alors toutes les minutes via crontab.)
Puis on ferait un appel de ce fichier dans conky.

À chaque démarrage on ferait une comparaison de l'uptime inscrit avec l'uptime en cours. (et cette comparaison serait elle aussi effectué à intervalle régulier). Lorsque l'uptime en cours devient supérieur à l'uptime qui était inscrit, l'écriture dans le fichier recommence.

Ça demande quand même un peu de boulot de faire ça ^^
Kenshin: il doit suffire d'enregistrer ton uptime dans un fichier à chaque arrêt de la machine, s'il est supérieur à l'uptime max précédent.
Le truc, c'est que c'est pas à chaque démarrage, mais a chaque extinction :

Pour avoir l'uptime :
uptime | cut -f 4 -d " "
Comparaison ensuite avec un uptime maximum (tu peux garder une variable UPTIME_MAX que tu exports à chaque démarrage avec la valeur max, que tu gardes à chaque extinction)
Ou alors tu laisse tourner le script et tu exportes cet UPTIME_MAX à ce moment, mais bon je vois pas trop l'interet de la chose.

Moi je ferai ça (meme si c'est vraiment du snobisme ^^) un fichier uptime_max (plutot qu'une variable shell)
echo '0' > ~/uptime_max

...
a = `uptime | cut -f 4 -d " "`
b = `cat ~/uptime_max`
if [[ $a > $b ]]
then echo $a > ~/uptime_max
fi
Et tu récupére ainsi cette valeur pour ton uptime max

Et si par exemple tu utilises fluxbox, tu change un petit truc dans ton menu pour le "exit" :
[exec] (Exit) {/home/user/Documents/logout.sh} </usr/share/pixmaps/glade-2.png>
Avec pour logout.sh
#!/bin/sh
/home/user/Documents/uptime_seek.sh

if  zenity --question --title "Alert" --text "T'es sur mec, tu veux quitter?!"; then
        kill -TERM $(xprop -root _BLACKBOX_PID | awk '{print $3}')
fi
Et voila voila, maintenant c'est fait (pour fluxbox)

EDIT : Grilled
C'est surtout aux problèmes des coupures de courant que je réfléchissais...:lol:
a = `uptime | cut -f 4 -d " "`
if orage_sur_la_tronche == 1
then echo $a > ~/uptime_max
fi
Ah non, marche pas :hammer:
Bah justement c'est ce que je dis pour le laisser tourner le script.
tu fais genre un
while true;do
sleep [i]un certain temps[/i] <- faut pas non plus tout le temps le faire tourner

[i]le code[/i]
Et comme c'est que les jours qui compte, tu peux faire un gros sleep, ca va pas tout le temps changer.
Merci pour tout ce beau code Randy 🙂

Le seul hic, c'est que je cherche à avoir un uptime max le plus proche du "vrai".
Qu'en cas de coupure inattendue, l'uptime max inscrit soit valable à la minute près de l'uptime réellement réalisé 😉
(Parce qu'à la seconde près, c'est vraiment...trop près :-P)

Si j'ai le temps je ferai un test, pour savoir déjà comment ça fonctionnera, et les ressources que ça prendra.
(Se servir de cron pourra sans doute être utile pour avoir un résultat proche du vrai)
Bah si tu veux un uptime à la minute, tu fais un sleep à la minute 😉
Enfin je ne pense pas que de toute manière tu dépasse un uptime de 53 jours pour un ordinateur desktop (qui aura donc Conky)
2 mois plus tard


Petites améliorations de mes conkys:

conkyrc1
-Utilisation de la fonction nvidia de conky pour avoir les températures et les fréquences.
-utilisation de l'option "-t " pour les graphes, ce qui fait que les couleurs correspondent à la valeur affichée.
background no
font 6x10
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
#minimum_size 290 5
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
gap_x 12
gap_y 230
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right
text_buffer_size 1024

TEXT
${font Waltograph UI:size=12:bold} $alignc ${color #cd5555}${execi 1800 lsb_release -d | awk '{print $2$4}'} ${execi 1800 lsb_release -c | awk '{print $2}'}

${font} $alignc ${color #cd5555}$sysname $kernel on $machine
${color #000080}$stippled_hr
${color #cd5555}Système de fichiers ouvert depuis: ${color #11B3F8}$uptime
${color #cd5555}Fréquence CPU: ${color #11B3F8}$freq
${color #0000ff}${cpugraph cpu1 32,181 00ff00 ff0000 -t} ${color #0000ff}${cpugraph cpu2 32,181 00ff00 ff0000 -t}
${color #cd5555}Utilisation Core 1:          ${color #11B3F8}${cpu cpu1}%                  ${color #cd5555}Utilisation Core 2:          ${color #11B3F8}${cpu cpu2}% 
${color #cd5555}Température Core 1:  ${color #11B3F8}${exec sensors | grep 0: | awk '{print $3}'}               ${color #cd5555}Température Core 2:  ${color #11B3F8}${exec sensors | grep 1: | awk '{print $3}'}
${color #000080}$stippled_hr
$alignc${color #cd5555}Carte Graphique:  ${color #11B3F8}${execi 1800 nvidia-settings -q gpus |grep '0] (' | cut -d '(' -f 2,2 | sed -e 's/.\{1\}$//'}
$alignc${color #cd5555}Pilote NVidia: ${color #11B3F8}185.18.36
${color #cd5555}Température GPU:     ${color #11B3F8}${nvidia temp}°C ${color #cd5555}            Fréquence GPU:     ${color #11B3F8}${nvidia gpufreq} Mhz
${color #cd5555}Temp Max GPU     :    ${color #11B3F8}${nvidia threshold}°C             ${color #cd5555}Mémoire GPU:         ${color #11B3F8}${nvidia memfreq} Mhz
${color #000080}$stippled_hr
$alignc${color #cd5555} Disque dur
$alignc${color #11B3F8}${execi 3600 hddtemp -b | grep HTS722012K9SA00 | cut -c34-}
${color #cd5555}Température disque dur: ${color #11B3F8}${execi 90 hddtemp /dev/sda | awk '{print $4}'}
${color #000080}$stippled_hr
${color #cd5555}Utilisation RAM ${color #0000ff}$alignc           Totale           Utilisée          Pourcentage
$alignc ${color #11B3F8}$memmax           $mem            $memperc%
${color #0000ff}${memgraph 00ff00 ff0000 -t}
${color #cd5555}Utilisation Swap :   ${color #11B3F8} $swap/$swapmax - $swapperc% ${color #00f5ff} ${swapbar}
${color #000080}$stippled_hr
${color #cd5555}Internet:
${color #0000ff}Reception:${color #ff4500} ${downspeedf eth0} k/s                      ${color #11B3F8}       Envoi: ${color #ff4500}${upspeedf eth0} k/s
${color #0000ff}Total:       ${color #ff4500} ${totaldown eth0}                               ${color #11B3F8}Total:${color #ff4500} ${totalup eth0}
${color #0000ff}${downspeedgraph eth0 32,181 00ff00 ff0000 -t} ${color #22ccff}${upspeedgraph eth0 32,181 00ff00 ff0000 -t}
${color #000080}$stippled_hr
${color #cd5555}$alignc Systèmes de fichiers
${color #cd5555}Système ${color #11B3F8} ${fs_used /} / ${fs_size /}: ${color #00f5ff}${fs_bar /}
${color #cd5555}Home      ${color #11B3F8} ${fs_used /home} / ${fs_size /home} : ${color #00f5ff}${fs_bar /home}
${color #000080}$stippled_hr
${color #cd5555}Processus : ${color #11B3F8}$processes       ${color #11B3F8}En cours: ${color #ff4500}$running_processes
${color #0000ff}En cours:       $alignc       PID      CPU%      MEM%
${color #ff4500} ${top name 1}  $alignc  ${top pid 1}      ${top cpu 1}      ${top mem 1}
${color #11B3F8} ${top name 2}  $alignc  ${top pid 2}      ${top cpu 2}      ${top mem 2}
${color #11B3F8} ${top name 3}  $alignc  ${top pid 3}      ${top cpu 3}      ${top mem 3}
${color #0000ff}En mémoire:
${color #ff4500} ${top_mem name 1} $alignc   ${top_mem pid 1}      ${top_mem cpu 1}      ${top_mem mem 1}
${color #11B3F8} ${top_mem name 2} $alignc   ${top_mem pid 2}      ${top_mem cpu 2}      ${top_mem mem 2}
${color #11B3F8} ${top_mem name 3} $alignc   ${top_mem pid 3}      ${top_mem cpu 3}      ${top_mem mem 3}
-conkyrc2
Petit conky pour afficher la fête du jour: utilisation de la fonction curl de conky:
background no
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 1
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
gap_x 30
gap_y 200
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer none
text_buffer_size 2048
maximum_width 500
minimum_size 500

TEXT
${alignc}${font Monaco:size=9}${color #11B3F8}${curl http://www.fetedujour.fr/api/text 240}
conkyrc3
-conky calendrier
background no
font 6x10
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
gap_x 99
gap_y 60
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right

TEXT                               
${alignc}${font Monaco:size=18}${color #0000ff}${execi 1800 date +%^B | cut -c1}${font Monaco:size=10}${color #11B3F8}${execi 1800 date +%B | cut -c2-}
${color #11B3F8}${font Monaco:size=9}${execpi 60 DJS=`date +%_d`; cal | sed '/./!d' | sed '1d'  | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color tan2}'"$DJS"'${color #0000ff}'" "/}
Les option "nvidia" et "curl" ne sont pas activées d'origine dans la dernière version de conky (la 1.7.2)
Il faut re-compiler à partir des sources en mettant une option dans le ./configure:
./configure --enable-nvidia --enable-curl
Il y a d'autre option qui ne sont pas activé par défaut, celles qui dans la liste ci dessous sont marquées [default=no]
Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency extractors
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --disable-config-output disable if you do not want conky to output a default
                          config (with -C) [default=yes]
  --disable-own-window    disable if you do not want support for creating own
                          window [default=yes]
  --enable-audacious=yes|no|legacy
                          enable audacious player support [default=no]
  --enable-bmpx           enable if you want BMPx support [default=no]
  --enable-ibm            enable if you want support for IBM/Lenovo notebooks
                          @<:default=no]
  --disable-hddtemp       disable if you do not want hddtemp support
                          [default=yes]
  --disable-apcupsd       disable if you do not want apcupsd support
                          [default=yes]
  --enable-iostats        enable if you want support for per-task I/O
                          statistics [default=yes]
  --disable-math          disable if you do not want math support
                          [default=yes]
  --disable-mpd           disable if you do not want MPD support [default=yes]
  --disable-moc           disable if you do not want MOC support [default=yes]
  --enable-xmms2          enable if you want XMMS2 support [default=no]
  --enable-curl           enable if you want curl support [default=no]
  --enable-eve            Eve-Online skill monitor [default=no]
  --enable-rss            enable if you want rss support [default=no]
  --enable-weather-metar  enable if you want METAR weather support
                          [default=no]
  --enable-weather-xoap   enable if you want XOAP weather support (also
                          enables METAR) [default=no]
  --disable-x11           disable if you do not want X11 support [default=yes]
  --enable-imlib2         enable if you want Imlib2 support [default=no]
  --enable-lua-imlib2     enable if you want Lua Imlib2 bindings for Conky
                          [default=no]
  --enable-lua            enable if you want Lua scripting support
                          [default=yes]
  --enable-lua-cairo      enable if you want Lua Cairo bindings for Conky
                          [default=no]
  --enable-wlan           enable if you want wireless support [default=no]
  --disable-portmon       disable if you do not want tcp (ip4) port monitoring
                          [default=yes]
  --disable-rpath         do not hardcode runtime library paths
  --disable-double-buffer disable for no Xdbe double-buffering support
                          [default=yes]
  --disable-xdamage       disable if you do not want Xdamage support
                          [default=yes]
  --disable-xft           disable if you do not want to use Xft [default=yes]
  --enable-nvidia         enable if you want nvidia support [default=no]
  --disable-alsa          disable if you do not want ALSA support
                          [default=yes]
  --enable-debug          compile with debug symbols [default=no]
  --enable-testing        use strict compiler flags for testing [default=no]
Vous trouverez les utilisations de ces options dans "CONKY VARIABLE"

J'espère que tout ceci vous aidera à faire des conky comme vous le souhaitez...
4 jours plus tard
Maintenant, avec la version 1.7.2 de conky il est possible d'afficher des images dans un conky.
Mais cette possibilité n'est pas non plus implémenté dans la version de fedora.
Il faut donc recompiler avec cette option:
./configure --enable-imlib2
Il faut avoir auparavant installé imlib2-devel
Un exemple de ce que l'on peu faire: afficher les phases de la lune dans un conky:
-pré-requit: avoir installé wget et ImageMagick

Ce conky récupère les images de la lune sur static.die.net et les met à jour toute les heures:

Il faut un script qui récupere les images et qui les transforme: moon-phase:
#!/bin/bash
mkdir ~/Images/moon-phase
cd ~/Images/moon-phase
rm *.*
wget http://static.die.net/moon/576.jpg -O ~/Images/moon-phase/576.jpg
convert 576.jpg \( +clone -fx 'p{0,0}' \)           -compose Difference  -composite            -modulate 100,0  +matte  difference.png
convert difference.png  -threshold 1%  threshold_mask.png
convert 576.jpg  threshold_mask.png           +matte -compose CopyOpacity -composite           576.png
Ensuite le conky qui va avec:
background no
font 6x10
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3600
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 1
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
minimum_size 150 150
gap_x 99
gap_y 60
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right

TEXT
${exec moon-phase}${image ~/Images/moon-phase/576.png -p 25,25 -s 100x100}
Et le résultat:


Amusez vous bien avec cette fonction image...
chepioq wrote:Amusez vous bien avec cette fonction image...
Merci pour l'info. Ça offre bien des possibilités...
14 jours plus tard
Bon, qui dit nouvelle machine, dit nouveau conky en arrivage !
Ton conky me plait beaucoup chepioq et ayant une nvidia, j'ai voulu essayer de recompiler conky ...
Sauf qu'il me fait une erreur :
[root@localhost conky-1.7.2]# ./configure --enable-nvidia --enable-curl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.19... yes
checking for fopencookie... yes
checking for funopen... no
checking for X... no
configure: error: Can't locate your X11 installation
Ceci sous f12 ...
Je vois pas en quoi il me trouve pas X11 ...
Arkezis wrote:Bon, qui dit nouvelle machine, dit nouveau conky en arrivage !
Ton conky me plait beaucoup chepioq et ayant une nvidia, j'ai voulu essayer de recompiler conky ...
Sauf qu'il me fait une erreur :
[root@localhost conky-1.7.2]# ./configure --enable-nvidia --enable-curl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.19... yes
checking for fopencookie... yes
checking for funopen... no
checking for X... no
configure: error: Can't locate your X11 installation
Ceci sous f12 ...
Je vois pas en quoi il me trouve pas X11 ...
http://ubuntuforums.org/showthread.php?t=930934

Ici ils parlent d'installer libx11-dev. Si ça peut t'aider... 😉
Merci, cette fois ça fonctionne !
J'ai pu installer conky, quelques petites erreurs, mais ça tourne 🙂
checking for LUA51... configure: error: Package requirements (lua5.1 >= 5.1) were not met:

No package 'lua5.1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA51_CFLAGS
and LUA51_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
chepioq, pour la partie nvidia, tu as installé quelque chose ? (il ne trouve pas de variable nvidia et de commande nvidia-settings ...)
Bonjour
Il doit te manquer des paquets, je pense à lua et lua-devel, de même que le paquet libXNVCtrl.
yum install libXNVCtrl lua lua-devel

Quelques petits changements dans mes conkys...
J'ai d'abord enlevé le plasmoid luna pour mettre le conky moon dont je vous ai parlé quelques posts plus haut, en ajoutant une ligne dans la commande pour l'éclaircir un peu.
script moon-phase:
#!/bin/bash
mkdir ~/Images/moon-phase
cd ~/Images/moon-phase
rm *.*
wget http://static.die.net/moon/576.jpg -O ~/Images/moon-phase/576.jpg
convert 576.jpg \( +clone -fx 'p{0,0}' \)           -compose Difference  -composite            -modulate 100,0  +matte  difference.png
convert difference.png  -threshold 1%  threshold_mask.png
convert 576.jpg  threshold_mask.png           +matte -compose CopyOpacity -composite           576-1.png
convert 576-1.png  -sigmoidal-contrast 2,0%  576.png
Et le conky qui va avec:
background no
font 6x10
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3600
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 1
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
minimum_size 150 150
gap_x 300
gap_y 50
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right

TEXT
${exec moon-phase}${image ~/Images/moon-phase/576.png -p 25,25 -s 100x100}
Ensuite j'ai changé la façon de récupérer la liste des saints du jours (il faut au préalable avoir installé calendar)
Script calendar-fetes (pompé et adapté d'un script sur ubuntu.fr)
#!/bin/bash
# Version 1.3
# Ce script permet d'obtenir les fêtes de chaque jour, sans internet.
# Possibilité de varier les couleurs en jouant avec le offset de conky.

# Récupère les prénoms de la commande console "calendar"
N=`calendar -f /usr/share/calendar/fr_FR.ISO8859-1/calendar.fetes -A0 -B-1 | grep "N'" | cut -d " " -f6`
A=`calendar -f /usr/share/calendar/fr_FR.ISO8859-1/calendar.fetes -A0 -B-1 | grep "Aujourd'hui" | cut -d " " -f7 | tr -d "."`
B=`calendar -f /usr/share/calendar/fr_FR.ISO8859-1/calendar.fetes -A0 -B-1 | grep "Bonne" | cut -d " " -f6`

# Affiche les résultats
echo "" $N $A $B | fold -s -w 44

exit 0
Et le conky qui va avec:
background no
font 6x10
use_xft yes
xftfont MgOpen Modata L:size=7:bold
#xftalpha 0.8
update_interval 3600
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_colour SteelBlue4
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 350 40
#maximum_width 600
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment top_right
gap_x 40
gap_y 200
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right
text_buffer_size 1024


# Couleurs
default_color FFFFFF #blanc
default_shade_color 333333
default_outline_color black

color3 cf1c00 #rouge
color2 66FF00 #vert
color1 176e88 #bleu


TEXT
${font Visitor TT1 BRK : pixelsize=12}${color1}Saints${font}
${color3}${voffset -5}${hr}
${color1}Aujourd'hui, bonne fête aux ${color #11B3F8}${exec /home/dominique/Documents/calendar-fetes}
Y'a une commande que j'aimerais éxécuter dans conky mais celle ci doit être éxécutée en root (smartctl -a /dev/sda | grep 'Load_Cycle_Count' | awk '{print $10}' ) (cette commande permet de récupérer le nombre de têtes parcés ...)
Je sais qu'il faut utiliser ${exec ...} mais je ne vois pas comment faire pour lui dire de passer en root (sans qu'il me demande le pwd oeuf course !
Tu peux te servir de sudo en paramétrant ton fichier /etc/sudoers par exemple. Ainsi tu auras ${exec sudo smartctl -a /dev/sda ...