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.

#1 Le 29/10/2009, à 13:45

silversun

[Conky] Infos MLDonkey

Yeaow smile
Voici un petit truc pour conky, codé comme un porc, librement inspiré de la même chose pour amule.
Cela vous permet d'afficher les téléchargements en cours et leur avancement, cependant, je ne sais pas comment faire pour afficher la vitesse de téléchargement par fichier, d'ailleurs, si quelqu'un sait et peu éclairer ma lanterne...
Autre problème, si le nom de votre fichier en téléchargement possède des espaces, ça bugera donc pensez à changer le nom du fichier smile

capturen.th.png

A ajouter dans votre .conkyrc :

${goto 32}${voffset -9}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'bw_stats' 'auth mld mld'|grep 'Down:'|awk -F " " '{print $2}'}${color0}${font} KiB/s
${goto 32}${color}Up :${color0}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'bw_stats' 'auth mld mld'|grep 'Down:'|awk -F " " '{print $11}'}${color0}${font} KiB/s

${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==1{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==1{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==1{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==1{print $2}'}${endif}
${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==2{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==2{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==2{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==2{print $2}'}${endif}
${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==3{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==3{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==3{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==3{print $2}'}${endif}
${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==4{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==4{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==4{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==4{print $2}'}${endif}
${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==5{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==5{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==5{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==5{print $2}'}${endif}
${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==6{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==6{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==6{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==6{print $2}'}${endif}${else}${alignc}${font Liberation Sans:style=Bold:size=8}${color1}MLDonkey est arrêté${font}${color}${endif}

Par défaut, affiche 6 téléchargements, pour en avoir plus, il suffit d'ajouter :

${if_empty ${exec mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==LIGNESUP{print $2}'}}${else}${font Liberation Sans:style=Bold:size=8}${color1}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==LIGNESUP{print $2}'}% ${color0}${font}${texeci 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==LIGNESUP{print $1}'}
${execibar 5 mldonkey_command -p '' 'vd' 'auth mld mld'|grep 'mldonkey'|awk -F " " '{print $7,$8}'|awk 'NR==LIGNESUP{print $2}'}${endif}

Avant :

${else}${alignc}${font Liberation Sans:style=Bold:size=8}${color1}MLDonkey est arrêté${font}${color}${endif}

En remplaçant LIGNESUP par le numéro au dessus du dernier et en l'ajoutant autant de fois que nécessaire.

Hors ligne