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.

#551 Le 01/05/2009, à 11:03

chepioq

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

Essayes de lancer ton conky en console et rapportes nous les éventuelles messages d'erreurs.


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

Hors ligne

#552 Le 01/05/2009, à 21:09

Ziv

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

Effectivement j'avais oublié la commande :s

vince@vince-laptop:~$ conky
Conky: /home/vince/.conkyrc: 22: no such configuration: 'maximum_size'
Conky: /home/vince/.conkyrc: 39: no such configuration: '${hr}'       
Conky: statfs '/media/FreeAgent Drive': No such file or directory
Conky: statfs '/media/PNY-8 VINCE': No such file or directory
Conky: statfs '/media/60G': No such file or directory
Conky: desktop window (180031b) is subwindow of root window (82)
Conky: window type - override
Conky: drawing to created window (0x3400001)
Conky: drawing to double buffer


X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Serial number of failed request:  409
  Current serial number in output stream:  410

Et ça déconne bien tongue


[EDIT] Après quelques recherches , Il y a une variable qui ne passe pas et qui empêche le démarrage
                     Faut que je trouve laquelle  big_smile

Dernière modification par Ziv (Le 02/05/2009, à 11:57)


_____________________ ___  __ _
Laptop DELL Studio 1555 sur Ubuntu 9.10_64bits : Dual-Core 2Ghz / Ram: 4G / ATI: Radeon 4570 Pilotes Xorg-edgers/ Wifi : Dell wireless 1510
Etudiant à Lyon 2

Hors ligne

#553 Le 03/05/2009, à 00:42

Valentin2105

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

@Askelon

Tu as trouvé le Png de ta bordure ?

Hors ligne

#554 Le 03/05/2009, à 00:48

Jackass059

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

Ziv, j'ai pratiquement les mêmes variables d'affichage quoi toi.

Tu pourrais nous montrer le reste de ton conkyrc ?


Il y a 10 types de personnes sur terre, celles qui comprennent le binaire, et les autres ...

Hors ligne

#555 Le 05/05/2009, à 00:49

blublutor

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

mes deux conky
http://zepload.com/images/1241474860_Capture.png

plutot classique

conkyrc 1

# Use Xft?
use_xft yes
xftfont Zekton:size=10
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
#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 180 0
#maximum_width 200

# 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 1

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

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 550
gap_y 10

# Subtract file system buffers from used memory?
no_buffers yes

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

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

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

TEXT
${font Zekton:size=10}${color}${time %A %d %B %Y} ${hr 2}
${alignc 70}${font Zekton:size=36}${time %H:%M:%S}${font}

ANGOULÊME ${hr 2}
${execi 120 /home/klatox/.conky/meteo.sh FRXX0314} ${execi 120 /home/klatox/.conky/meteo2.sh "Angoulême"}
 ${font weather:size=21}z ${font}Aujourd'hui : ${execi 120 ~/.conky/meteo2.sh "Température aujourd'hui"}  ${font weather:size=37}${voffset -18}${execi 120 ~/.conky/meteo2.sh "Conditions aujourd'hui"}${font}${voffset -11}
 ${font weather:size=21}w${font}   Vent : ${execi 120 ~/.conky/meteo2.sh "Vent aujourd'hui"}
${font weather:size=21}B${font}  Lever du soleil : ${execi 120 ~/.conky/meteo2.sh "Lever du soleil"}
 ${font weather:size=21}5 ${font}Coucher du soleil : ${execi 120 ~/.conky/meteo2.sh "Coucher du soleil"}
  ${font weather:size=21}z ${font}Demain : ${execi 120 ~/.conky/meteo2.sh "Température demain"}  ${font weather:size=37}${voffset -10}${execi 120 ~/.conky/meteo2.sh "Conditions demain"}${font}

${endif}

conky rc 2

# Use Xft?
use_xft yes
xftfont Zekton:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
#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 180 0
#maximum_width 200

# 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 1

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

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 270

# Subtract file system buffers from used memory?
no_buffers yes

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

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

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


TEXT

SYSTEM ${hr 2}
${voffset 2}${font OpenLogos:size=16}u${font}   Kernel:  ${alignr}${kernel}
${font StyleBats:size=16}A${font}   CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}A${font}   CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
${font StyleBats:size=16}g${font}   RAM: $memperc% ${alignr}${membar 8,60}

HD ${hr 2}
${voffset 4}${font Pie charts for maps:size=14}6${font}  Temperature: ${alignr}${exec nc localhost 7634 | perl -ne 'print $1 if /\/sda\|.*?\|(\d+)\|C/;'}°C
${voffset 6}${font Pie charts for maps:size=14}7${font}   ${voffset -5}Root:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${font Pie charts for maps:size=14}7${font}   ${voffset -5}Home:
${voffset 4}${fs_free /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}

GRAPHICS ${hr 2}
${voffset 8}${font PizzaDude Bullets:size=12}Y${font} Videocard model: ${alignr}${execi 300 ~/.scripts/nvidia.sh}
${voffset 6}${font PizzaDude Bullets:size=12}Z${font} Software version: ${alignr}${execi 300 ~/.scripts/nvidia-version.sh}
${voffset 6}${font PizzaDude Bullets:size=12}9${font} GPU temp: ${alignr}${execi 300 ~/.scripts/nvidia-gpu.sh}

NETWORK ${hr 2}
${if_existing /proc/net/route wlan0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph wlan0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}Z${font}   Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public Ip: ${alignr}${execi 1 ~/.scripts/ip.sh}
${else}${if_existing /proc/net/route eth0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr eth0}
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public Ip: ${alignr}${execi 1 ~/.scripts/ip.sh}
${endif}${else}${if_existing /proc/net/route eth1}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth1} kb/s ${alignr}${upspeedgraph eth1 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth1} kb/s ${alignr}${downspeedgraph eth1 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr eth1}
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public Ip: ${alignr}${execi 1 ~/.scripts/ip.sh}
${endif}${else}
${font PizzaDude Bullets:size=14}4${font}   Network Unavailable
${endif}

Dernière modification par blublutor (Le 05/05/2009, à 10:37)

Hors ligne

#556 Le 05/05/2009, à 10:29

Valentin2105

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

Met ca dans les balises code STP

Hors ligne

#557 Le 08/05/2009, à 15:53

Elvith Gent

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

Mon conky mis à jour pour Jaunty : 80c51d4236a7f93afb283a0f09659t.jpg

background yes
use_xft yes
xftfont Morpheus:size=10
uppercase no

own_window yes
update_interval 3.0
total_run_times 0
double_buffer yes
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2

own_window_type override     
own_window_transparent yes
alignment top_left
gap_x 10
gap_y 30 
minimum_size 400 10
maximum_width 400
draw_shades no
draw_outline no
draw_borders no
stippled_borders 3

default_color black
default_shade_color black
default_outline_color black

TEXT
${font Morpheus:size=18}Créé par Elvith Gent${hr}
${font}${alignc}Il est ${color #cb4b2e}${time %k:%M:%S}${color} et on est le ${color #cb4b2e}${time %A %d %B %Y}${color} - ${alignc}Uptime : ${color #cb4b2e}$uptime
${color}${alignc}$nodename : ${color #cb4b2e}Ubuntu 9.04 $sysname $kernel

${color}${font Morpheus:size=12}Disques$hr${font}
${color}Partition / : ${alignr}${color #cb4b2e}${fs_used /}${color}${color}/${color #cb4b2e}${color #cb4b2e}${fs_size /}${color} - ${color #cb4b2e}${fs_free_perc /}%
${color}${fs_bar 13 /}
${color}Partition /home : ${alignr}${color #cb4b2e}${fs_used /home} ${color}/${color #cb4b2e}${fs_size /home}${color} - ${color #cb4b2e}${fs_free_perc /home}%
${color}${fs_bar 13 /home}
${color}Lecteur MP3/Clé USB : ${alignr}${color #cb4b2e}${if_mounted /media/disk} monté $color- ${color #cb4b2e}${fs_used /media/disk}$color/${color #cb4b2e}${fs_size /media/disk}$color - ${color #cb4b2e}${fs_free_perc /media/disk}%$else non monté $endif
${color}${fs_bar 13 /media/disk}

${color}${font Morpheus:size=12}Processeur$hr${font}
$color${cpugraph cpu0 20 000000 000000}
${voffset -30}${alignc}${color #cb4b2e}$machine $freq_dyn_g GHz - $cpu% - ${acpitemp}°C
${voffset 2}${color}Nombre de processus :${color #cb4b2e}$processes$color - En cours :${color #cb4b2e} $running_processes
${color}Processus : ${alignr}PID    %CPU
${color #cb4b2e}${top name 1}$alignr${top pid 1}     ${top cpu 1}
${top name 2}$alignr${top pid 2}     ${top cpu 2}
${top name 3}$alignr${top pid 3}     ${top cpu 3}
${top name 4}$alignr${top pid 4}     ${top cpu 4}
${top name 5}$alignr${top pid 5}     ${top cpu 5}

${color}${font Morpheus:size=12}Mémoire$hr${font}
${color}RAM : ${color #cb4b2e}$mem${color}/${color #cb4b2e}$memmax${color} - ${color #cb4b2e}$memperc%$alignr${color}SWAP : ${color #cb4b2e}$swap${color}/${color #cb4b2e}$swapmax${color} - ${color #cb4b2e}$swapperc%
${color}${membar 13, 190}$alignr${swapbar 13, 190}
Processus : ${alignr}PID   %MEM
${color #cb4b2e}${top_mem name 1}$alignr${top_mem pid 1}     ${top_mem mem 1}
${top_mem name 2}$alignr${top_mem pid 2}     ${top_mem mem 2}
${top_mem name 3}$alignr${top_mem pid 3}     ${top_mem mem 3}
${top_mem name 4}$alignr${top_mem pid 4}     ${top_mem mem 4}
${top_mem name 5}$alignr${top_mem pid 5}     ${top_mem mem 5}

${color}${font Morpheus:size=12}Réseau$hr${font}
${color}eth0 : IP interne : ${color #cb4b2e}${addr eth0}${color} - IP externe : ${color #cb4b2e}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}
${color}Ports ouverts : ${color #cb4b2e}${tcp_portmon 1 65535 count}
${color #cb4b2e}${tcp_portmon 1 65535 lservice 0}    ${tcp_portmon 1 65535 rhost 0}
${tcp_portmon 1 65535 lservice 1}    ${tcp_portmon 1 65535 rhost 1}
${tcp_portmon 1 65535 lservice 2}    ${tcp_portmon 1 65535 rhost 2}
${tcp_portmon 1 65535 lservice 3}    ${tcp_portmon 1 65535 rhost 3}
${tcp_portmon 1 65535 lservice 4}    ${tcp_portmon 1 65535 rhost 4}
${color}${upspeedgraph eth0 25, 190 000000 000000}${alignr}${downspeedgraph eth0 25, 190 000000 000000}
${voffset -30} ${color}Up :${color #cb4b2e} ${upspeed eth0} k/s${color} - Total :${color #cb4b2e} ${totalup eth0}${alignr}${color}Down :${color #cb4b2e} ${downspeed eth0} k/s${color} - Total :${color #cb4b2e} ${totaldown eth0} 

${color}${font Morpheus:size=12}Rhythmbox$hr${font}
${if_running rhythmbox}Titre : ${alignr}${color #cb4b2e}${exec rhythmbox-client --no-start --print-playing-format "%tt"}
${color}Artiste :${alignr}${color #cb4b2e}${exec rhythmbox-client --no-start --print-playing-format "%ta"}
${color}Album :${alignr}${color #cb4b2e}${exec rhythmbox-client --no-start --print-playing-format "%at"}
${color}Durée :${alignr}${color #cb4b2e}${exec rhythmbox-client --no-start --print-playing-format "%te / %td"}
$else${color #cb4b2e}non lancé$endif

Linux Counter user #458259
Mon site de jeu de rôles : http://www.niil.fr

Hors ligne

#558 Le 08/05/2009, à 19:26

thuban

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

je déterre un peu, au sujet de l'affichage des mises à jours dispos, de mon côté, je met cette ligne, et pas besoin d'avoir le mot de passe en clair :

${offset 240}${color slate grey}Maj: ${color }${execi 3600 (sudo aptitude update | sudo aptitude search "~U" | wc -l | awk '{print $1}')} Upgrades

Bien sûr, il faut ajouter ceci dans le fichier /etc/sudoers :

votrelogin ALL=NOPASSWD:/usr/bin/sudo

Ce fichier s'édite avec la commande

sudo visudo

Hors ligne

#559 Le 09/05/2009, à 11:30

Julientroploin

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

personnellement, je trouve moins risqué d'avoir le mot clé en clair dans un fichier (qu'il faut déjà savoir trouver...) plutôt que de laisser executer sudo sans mdp... j'ai peu être tort.


Fixe : Core i5, 8GoRAM, NVidia 9800GT Silent => Ubuntu 22.04
Portable Compaq Presario2158 : AthlonXP-M2400+, 1GoRAM, ATI Radeon mobility320M => Primtux
https://launchpad.net/~julienmbpe

Hors ligne

#560 Le 09/05/2009, à 12:27

Jackass059

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

+1

À condition d'avoir bien réglé le chmod du fichier.

Mais ça reste quand même limite tongue

Sur une machine perso à la rigueur, pourquoi pas. C'est pas moins secure que windows tongue
Mais sur une machine pro, c'est absolument pas recommandé.


Il y a 10 types de personnes sur terre, celles qui comprennent le binaire, et les autres ...

Hors ligne

#561 Le 09/05/2009, à 12:41

Nicky_rr

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

C'est marrant je viens de trouver cette solution aussi. Par contre au lieu de permettre le sudo à tout le monde qui est effectivement plus que dangereux, on peut limiter ça à la commande update et à la simulation d'upgrade seulement :

%users  ALL = (root) NOPASSWD: /usr/bin/apt-get --simulate upgrade
%users  ALL = (root) NOPASSWD: /usr/bin/apt-get update

Si j'ai bien compris comment ça marche.

Dernière modification par Nicky_rr (Le 09/05/2009, à 12:51)

Hors ligne

#562 Le 09/05/2009, à 13:26

Julientroploin

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

Nicky_rr a écrit :

C'est marrant je viens de trouver cette solution aussi. Par contre au lieu de permettre le sudo à tout le monde qui est effectivement plus que dangereux, on peut limiter ça à la commande update et à la simulation d'upgrade seulement :

%users  ALL = (root) NOPASSWD: /usr/bin/apt-get --simulate upgrade
%users  ALL = (root) NOPASSWD: /usr/bin/apt-get update

Si j'ai bien compris comment ça marche.

si ça marche, c'est vrai que c'est la solution la plus propre...


Fixe : Core i5, 8GoRAM, NVidia 9800GT Silent => Ubuntu 22.04
Portable Compaq Presario2158 : AthlonXP-M2400+, 1GoRAM, ATI Radeon mobility320M => Primtux
https://launchpad.net/~julienmbpe

Hors ligne

#563 Le 09/05/2009, à 23:01

Nicky_rr

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

Ben d'après un autre forum c'est sensé marcher, je ne sais pas si je me suis vautré quelque part mais ça ne semble pas marcher pour le moment... je vais explorer cette voix car il y a des chance que ça soit une petite erreur de rien.

Je vous tiens au courant quand c'est réglé big_smile

Hors ligne

#564 Le 10/05/2009, à 18:36

Nicky_rr

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

Bon ça a l'air de marcher en éditant sudoers de la sorte:

cette ligne existe déjà : "# Cmnd alias specification", écrire au dessous:
Cmnd_Alias UPDATE=/usr/bin/apt-get update, /usr/bin/apt-get -s upgrade

A la fin j'ai rajouté ces lignes:

# For conky reason, authorization to update and simulate upgrade
# without password
%admin ALL =(ALL) NOPASSWD: UPDATE

Pour rappel, mon script que j'ai appelé upgrade et que j'appelle dans conky avec la commande : ${execpi 3600 ~/scripts/upgrade}

#! /bin/sh

sudo apt-get update >/dev/null 2>&1
NB=$(sudo apt-get -s upgrade | grep jour, | awk '{print $1}')

if [ "$NB" = "0" ]; then
	{
	echo "système à jour"
	}
else
	{
	echo '${color red}Mise à jour (w+u)${color}'
	}
fi
exit 0

Dernière modification par Nicky_rr (Le 10/05/2009, à 18:37)

Hors ligne

#565 Le 11/05/2009, à 07:42

cedric84

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

bonjour,

@ blublutor : pourrais tu me donner tes scripts météo, je galère un peu...malgré le tuto dans le wiki ! Merci big_smile

edit (ajout) : en fait, je ne sais pas mettre quoi et ou et toutes les parties à modifier...j'ai réussi à adapter un script conky pour les infos générales (system, cpu, ram, wifi....) et je voudrais mettre ce script météo....

apparement mon weather.sh n'est pas bon, je vous donne le début :

# Usage:
${execi 1800 /home/cedric/.scripts/weather.sh FRXX0167}
# Usage Example:
# ${execi 1800 /home/user/weather/weather.sh 03833}

# your Location ID: use http://xoap.weather.com/search/search?where=[yourcity] to find it
# U.S. users can just use their zip code; doubt that works for anyone else though (YMMV)
LOCID=$FRXX0167

je ne sais pas ou ça coince ! j'ai bien :
le dossier .scripts,
le fichier weather.sh
Quand je lance conky dans le terminal il me renvoie l'erreur :

/home/cedric/.scripts/weather.sh: 10: Bad substitution

Comprends pas ce que je fais mal....

Dernière modification par cedric84 (Le 12/05/2009, à 20:42)


A Abandonné Win$ en Aout 2007 ! Sous ubuntu depuis Feisty.
Actuellement sous Natty ! Acer extensa 7620.

Hors ligne

#566 Le 14/05/2009, à 17:07

cedric84

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

personne ?


A Abandonné Win$ en Aout 2007 ! Sous ubuntu depuis Feisty.
Actuellement sous Natty ! Acer extensa 7620.

Hors ligne

#567 Le 15/05/2009, à 11:36

Nicky_rr

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

Tu as bien mis ton identifiant et le mot de passe dans le fichier de config de weather. Enfin je dis le fichier de config je ne sais plus comment il s'appelle mais c'est dit dans le tuto a priori.

Hors ligne

#568 Le 15/05/2009, à 14:57

cedric84

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

finalement, je suis passé par conkyforecast......que j'ai trouvé plus simple à configurer....je cherche maintenant à le personnaliser....


A Abandonné Win$ en Aout 2007 ! Sous ubuntu depuis Feisty.
Actuellement sous Natty ! Acer extensa 7620.

Hors ligne

#569 Le 15/05/2009, à 15:41

josian

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

J'utilise conkyforecast, j'ai ajouté les phases de lune :
{color2}${font Moon Phases:size=20} [--datatype=MF]${font}
et retiré les lignes output du conkyrc pour simplifier


W XP et UBUNTU 10.04
  AMD 64 3000+ ATI HD 4650
FREEBOX V5  NIKON D70 Sony Ericsson W595s

Hors ligne

#570 Le 16/05/2009, à 07:02

cedric84

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

josian a écrit :

retiré les lignes output du conkyrc pour simplifier

Bonjour,
j'ai pas compris ce passage.
Par ailleurs, j'ai un soucis :
j'ai crée un lanceur car j'ai fait deux conky : un avec des infos diverses et un avec la météo.
mais un seul se lance c'est à dire le fichier .conkyrc, le fichier conkyrc2 ne se lance pas. alors qu'il existe bien
voici mon lanceur :

#!/bin/bash

sleep 1
conky -c /home/cedric/.conkyrc  &
conky -c /home/cedric/.conkyrc2 &

exit

mon fichier .conkyrc :

# conky configuration
# edited by Mark Buck (Kaivalagi) <m_buck@hotmail.com> et moi !!! :)

# set to yes if you want Conky to be forked in the background
background yes

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=9

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 1.0

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window no

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

# Minimum size of text area
minimum_size 300 0
maximum_width 305

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
draw_graph_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_margin 4

# border width
border_width 1

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

# own window options
own_window        yes
own_window_transparent    yes
own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager

# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 30
gap_y 50

# Subtract file system buffers from used memory?
no_buffers yes

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

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

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

# colours
color1 white
# light blue
color2 6892C6
# orange
#FC8820
color3 FC8820
# green
color4 78BF39
# red
color5 CC0000

text_buffer_size 2048

# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument

# stuff after 'TEXT' will be formatted on screen
color1 e49c16 


TEXT
${font OpenLogos:size=50} $alignc u${font}
SYSTEM ${hr 2}
${voffset 2}${font OpenLogos:size=16}u${font}    ${execi 86400 cat /etc/lsb-release|grep REL|cut -d= -f2} ${execi 86400 cat /etc/lsb-release|grep NAME|cut -d= -f2}
${voffset 2}${font OpenLogos:size=16}B${font}   ${kernel}
${font StyleBats:size=16}A${font}   CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}A${font}   CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
${font StyleBats:size=16}g${font}   RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}j${font}   SWAP: $swapperc% ${alignr}${swapbar 8,60}
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${uptime}


Utilisation du CPU ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}w${font}    ${top name 1} ${alignr}${top cpu 1}%
${voffset 4}${font PizzaDude Bullets:size=14}u${font}    ${top name 2} ${alignr}${top cpu 2}%
${voffset 4}${font PizzaDude Bullets:size=14}s${font}    ${top name 3} ${alignr}${top cpu 3}%

Utilisation de la RAM ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}v${font}    ${top_mem name 1} ${alignr}${top_mem mem 1}%
${voffset 4}${font PizzaDude Bullets:size=14}t${font}    ${top_mem name 2} ${alignr}${top_mem mem 2}%
${voffset 4}${font PizzaDude Bullets:size=14}r${font}    ${top_mem name 3} ${alignr}${top_mem mem 3}%

Stockage ${hr 2}
${voffset 4}${font Pie charts for maps:size=14}7${font}   ${voffset -5}Mon home :
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${font Pie charts for maps:size=14}7${font}   ${voffset -5}Mes données :
${voffset 4}${fs_free /media/disk}/${fs_size /media/disk} ${alignr}${fs_bar 8,60 /media/disk}

Réseau ${hr 2}
${voffset 4}${font StyleBats}r${font}    Open Port: ${alignr} ${tcp_portmon 1 65535 count}
${voffset 4}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph wlan0 8,60}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,60}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}Z${font}   Signal : ${wireless_link_qual wlan0}% $alignr${wireless_link_bar 8,60 wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public Ip: ${alignr}${execi 300 ~/.scripts/ip.sh}

mon fichier .conkyrc2

# conky configuration
# edited by Mark Buck (Kaivalagi) <m_buck@hotmail.com> et moi !!! :)

# set to yes if you want Conky to be forked in the background
background yes

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=9

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 1.0

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window no

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

# Minimum size of text area
minimum_size 300 0
maximum_width 305

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
draw_graph_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_margin 4

# border width
border_width 1

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

# own window options
own_window        yes
own_window_transparent    yes
own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 30
gap_y 50

# Subtract file system buffers from used memory?
no_buffers yes

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

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

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

# colours
color1 white
# light blue
color2 6892C6
# orange
#FC8820
color3 FC8820
# green
color4 78BF39
# red
color5 CC0000

text_buffer_size 2048

# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument

# stuff after 'TEXT' will be formatted on screen


TEXT
${if_running rythmbox}
${color lightgrey}RhythmBox Now Playing :
${alignc}${exec rhythmbox-client --no-start --print-playing-format "%ta - %at"}
${alignc}${exec rhythmbox-client --no-start --print-playing-format "%tn - %tt"}


${offset -5}${color3}${font StyleBats:style=CleanCut:size=12}q ${voffset -2}${font Bitstream Vera Sans Mono:style=Bold:size=11}Weather${font}  ${hr}${color1}
${color3}Template Output:${color1}
${execpi 1800 conkyForecast --location=FRXX0167 --template=/usr/share/conkyforecast/example/conkyForecast.template}
$color$stippled_hr

merci de votre aide...

Dernière modification par cedric84 (Le 16/05/2009, à 07:03)


A Abandonné Win$ en Aout 2007 ! Sous ubuntu depuis Feisty.
Actuellement sous Natty ! Acer extensa 7620.

Hors ligne

#571 Le 16/05/2009, à 08:10

Entrygoon

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

bin pour le soucis du lancement de conkyrc2, a ta place, je tenterai de lancer conky en ayant changé le contenu du conkyrc par celui du conkyrc2...comme ca, s'il se lance bien et qu'il fonctionne tu peux deja eliminer l'hypothese d'une erreure dans ce fichier conkyrc2.

Hors ligne

#572 Le 16/05/2009, à 08:31

cedric84

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

je l'ai fait, j'ai renommé conkyrc2 en conkyrc et il se lance ! c'est ce que je trouve bizarre....
et j'ai renommé mon conkyrc en conkyrc2, et lui se lance plus.
Bref, pris indivuellement mes conky se lance ! mais pas les deux simultanément ! seul celui que je vais nommé conkyrc sera lancé !

edit : j'ai tout recommencé, les deux conky se lance ! ça devait venir de la partie configuration qui foirait, j'avais un peu trop bidouillé... wink

Dernière modification par cedric84 (Le 16/05/2009, à 08:45)


A Abandonné Win$ en Aout 2007 ! Sous ubuntu depuis Feisty.
Actuellement sous Natty ! Acer extensa 7620.

Hors ligne

#573 Le 16/05/2009, à 08:47

Levi59

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

#!/bin/bash

sleep 1
conky -c /home/cedric/.conkyrc  &  <---------------------
conky -c /home/cedric/.conkyrc2 &

exit

Il n'y a pas un espace de trop dans la ligne que j'indique(avant &)? essaye de l'enlever

edit: trop tard

Dernière modification par Levi59 (Le 16/05/2009, à 08:47)

Hors ligne

#574 Le 16/05/2009, à 12:37

cedric84

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

lol
Mais merci quand même Levi59 et entrygoon de vos aides et pistes de recherche !


A Abandonné Win$ en Aout 2007 ! Sous ubuntu depuis Feisty.
Actuellement sous Natty ! Acer extensa 7620.

Hors ligne

#575 Le 18/05/2009, à 01:08

TheElitex

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

Bonjour,

Apres mettre inspirer de nombreux conky(merci ;-)) et d'avoir changer je ne c'est combien de fois de bureau je vous montre mon bureau definitif(jusqu'au prochain ;-) )

Conky and Tilda pour le terminal

Capture :

http://zepload.com/images/1242597584_Capture.png

voici mon lanceur :

.Load.sh

#!/bin/bash

sleep 13
killall conky
killall tilda
tilda &
tilda &
conky -c $HOME/.conky/.conkyrc4 &
conky -c $HOME/.conky/.conkyrc6 &

Conky de droite: .conkyrc4

double_buffer yes

own_window  yes
own_window_transparent yes
own_window_type override
own_window_hints undecorate,sticky,skip_taskbar,skip_pager 

draw_shades no
draw_outline no
draw_borders no
default_shade_color 333333
default_outline_color black

gap_x 27
gap_y 27
alignment top_right

update_interval 1

default_color  999999
color1 333333
color2 c0c0c0
color3 888888
color4 333333

use_xft yes
xftfont bauhaus:pixelsize=10

maximum_width 325
minimum_size 350 20



TEXT
${color}Kernel: ${color2}$sysname-$kernel ${alignr}${color} Uptime: ${color2}$uptime
${color}Version: ${color2}${execi 360 lsb_release -d | cut -c14-25} '${execi 360 lsb_release -c | cut -c11-20}' 

${color1}${font StyleBats:style=Bold:pixelsize=16}I ${font Bauhaus:style=Bold:pixelsize=14}${execi 360 cat /proc/cpuinfo | grep model\ name | cut -c14-50} ${font}${color1}${hr}

${color}Température CPU: ${color1}${acpitemp}°C 

${color}Fréquence CPU: ${color1}$freq_dyn_g ${alignr}${color}Maximum: ${color1}$freq_g
${color}CPU: ${color1}${execi 10 sensors | grep 'Core0' | cut -c14-21} ${color1}${alignr} ${color}${cpu cpu}% ${color1}${cpugraph cpu 10,150 333333 ffffff}

${color1}${font StyleBats:style=Bold:pixelsize=16}A ${font Bauhaus:style=Bold:pixelsize=14}Mémoire ${font}${color1}${hr}

${color1} $mem ${color}/${color1} $memmax ${color}${alignr}$memperc% ${color1}${memgraph 10,150 333333 ffffff}

${color1}${font StyleBats:style=Bold:pixelsize=16}M ${font Bauhaus:style=Bold:pixelsize=14}Processus ${font}${color1}${hr}

${color}Total: ${color1} $processes ${alignr}${color}En cours: ${color1} $running_processes
${color}Processus ${alignr} PID      %CPU    %MEM
${color1}${top name 1} ${alignr}${top pid 1}    ${top cpu 1}      ${top mem 1}
${color2}${top name 2} ${alignr}${top pid 2}    ${top cpu 2}      ${top mem 2}
${color3}${top name 3} ${alignr}${top pid 3}    ${top cpu 3}      ${top mem 3}
${color4}${top name 4} ${alignr}${top pid 4}    ${top cpu 4}      ${top mem 4}

${color1}${font StyleBats:style=Bold:pixelsize=16}X ${font Bauhaus:style=Bold:pixelsize=14}Disques ${font}${color1}${hr}

${color}Température HDD: ${color1}${exec hddtemp /dev/sda | grep ° | cut -d':' -f3}

${color}Disque ${alignc}Usage ${alignr} libre    ${color1}/${color}   utilisé   ${color1}/${color}   taille   
${color1} Swap ${alignc}   ${swapperc}% ${alignr} ${swap} / ${swapmax}
${color1}${swapbar}
${color1} / ${alignc}   ${fs_used_perc /}% ${alignr} ${fs_free /} / ${fs_used /} / ${fs_size /}
${color1}${fs_bar /}
${color1} ~/ ${alignc}   ${fs_used_perc /home}% ${alignr} ${fs_free /home} / ${fs_used /home} / ${fs_size /home}
${color1}${fs_bar /home}
${color1} Fichiers ${alignc}   ${fs_used_perc /media/Fichiers}% ${alignr} ${fs_free /media/Fichiers} / ${fs_used /media/Fichiers} / ${fs_size /media/Fichiers}
${color1}${fs_bar /media/Fichiers}

${color1}${font StyleBats:style=Bold:pixelsize=16}L ${font Bauhaus:style=Bold:pixelsize=14}Rhythmbox ${font}${color1}${hr}
${if_running rhythmbox}

${alignc}${execi 10 rhythmbox-client --print-playing-format "%tt" --no-start | grep -v Inconnu | grep -v Pas\ de\ lecture\ en\ cours} 
${alignc} ${execi 10 rhythmbox-client --print-playing-format "%at" --no-start | grep -v Inconnu | grep -v Pas\ de\ lecture\ en\ cours}
${color white}${alignr} ${execi 10 rhythmbox-client --print-playing-format "%ag" --no-start | grep -v Inconnu | grep -v Pas\ de\ lecture\ en\ cours}
${color1}${execibar 1 $HOME/.conky/rhythmbox.sh progress}${else}
${alignc}Rhythmbox n'est pas lancé.${endif}

Conky de gauche: .conkryc6

double_buffer yes

own_window  yes
own_window_transparent yes
own_window_type override
own_window_hints undecorate,sticky,skip_taskbar,skip_pager 

draw_shades no
draw_outline no
draw_borders no
default_shade_color 333333
default_outline_color black

gap_x 27
gap_y 27
alignment bottom_left

update_interval 1

default_color  999999
color1 333333
color2 c0c0c0
color3 888888
color4 333333

use_xft yes
xftfont bauhaus:pixelsize=10

maximum_width 325
minimum_size 350 20



TEXT
${color1}${font StyleBats:style=Bold:pixelsize=16}W ${font Bauhaus:style=Bold:pixelsize=14}Réseau LAN${font}${color1}${hr}

${color}IP locale: ${color1}${addr eth0} ${alignr}${color}IP publique:${color1}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}
${color}Down:${color1} ${downspeed eth0} k/s ${alignr}${color}Up:${color1} ${upspeed eth0} k/s
${color1}${downspeedgraph eth0 20,150 333333 ffffff} ${alignr}${color1}${upspeedgraph eth0 20,150 333333 ffffff}

${color1}${font StyleBats:style=Bold:pixelsize=16}W ${font Bauhaus:style=Bold:pixelsize=14}Réseau WLAN${font}${color1}${hr}

${color}IP locale: ${color1}${addr wlan0} ${alignr}${color}IP publique:${color1}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}
${color}SSID: ${alignr}${color1}${wireless_essid wlan0} ${color}@ ${color1}${wireless_bitrate wlan0}
${color}Qualité signal: ${alignr}${color1}${wireless_link_qual_perc wlan0}%
${color}Down:${color1} ${downspeed wlan0} k/s ${alignr}${color}Up:${color1} ${upspeed wlan0} k/s
${color1}${downspeedgraph wlan0 20,150 333333 ffffff} ${alignr}${color1}${upspeedgraph wlan0 20,150 333333 ffffff}

${color1}${font StyleBats:style=Bold:pixelsize=16}W ${font Bauhaus:style=Bold:pixelsize=14}Port(s) ouvert(s): ${tcp_portmon 1 65535 count}${font}${color1}${hr}
${color}${tcp_portmon 1 65535 rhost 0} $alignr${color1}${tcp_portmon 1 65535 lservice 0}
${color}${tcp_portmon 1 65535 rhost 1} $alignr${color1}${tcp_portmon 1 65535 lservice 1}
${color}${tcp_portmon 1 65535 rhost 2} $alignr${color1}${tcp_portmon 1 65535 lservice 2}
${color}${tcp_portmon 1 65535 rhost 3} $alignr${color1}${tcp_portmon 1 65535 lservice 3}
${color}${tcp_portmon 1 65535 rhost 4} $alignr${color1}${tcp_portmon 1 65535 lservice 4}
${color}${tcp_portmon 1 65535 rhost 5} $alignr${color1}${tcp_portmon 1 65535 lservice 5}
${color}${tcp_portmon 1 65535 rhost 6} $alignr${color1}${tcp_portmon 1 65535 lservice 6}
${color}${tcp_portmon 1 65535 rhost 7} $alignr${color1}${tcp_portmon 1 65535 lservice 7}
${color}${tcp_portmon 1 65535 rhost 8} $alignr${color1}${tcp_portmon 1 65535 lservice 8}
${color}${tcp_portmon 1 65535 rhost 9} $alignr${color1}${tcp_portmon 1 65535 lservice 9}
${color}${tcp_portmon 1 65535 rhost 10} $alignr${color1}${tcp_portmon 1 65535 lservice 10}

Script rhythmbox :

#!/bin/bash


case "$1" in

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

merci de votre aide...


LINUX FOR HUMAN BEINGS
SITE PERSO AVEC FORUM - PAS MAL DE TRUC INTERESSANT ==> http://blackbox.olympe-network.com/

Hors ligne