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.

#3051 Le 03/10/2010, à 16:19

Federom

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

Une question, je découvre Conky et je m'amuse bien wink mais j'ai un soucis avec l'affichage d'une barre pour la qualité du signal wi-fi. J'ai mis le code suivant :

${GOTO 36}Qualité wi-fi :${GOTO 120}${wireless_link_bar 10,75} ${wireless_link_qual wlan0} %

Mais le rendu me donne une barre vide qui ne bouge pas, contrairement au pourcentage... Merci à qui saura m'aider !

Hors ligne

#3052 Le 03/10/2010, à 16:30

Levi59

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

${wireless_link_bar 10,75 wlan0}

Tu as oublié l'interface...

Hors ligne

#3053 Le 03/10/2010, à 16:37

Federom

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

Levi59 a écrit :

${wireless_link_bar 10,75 wlan0}

Tu as oublié l'interface...

Oula, merci, je débute c'est bien ce que je disais !!! wink
J'ai donc modifié, et ça marche, sauf que la barre ne correspond visiblement pas au pourcentage :
sanstitrejr.jpg
Une idée ???

Hors ligne

#3054 Le 03/10/2010, à 16:46

Levi59

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

essaye de remplacer:

${wireless_link_qual wlan0}

par

${wireless_link_qual_perc wlan0}

Hors ligne

#3055 Le 03/10/2010, à 16:51

Federom

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

Nickel, c'est ça, la barre et le pourcentage correspondent maintenant. Merci pour l'aide et la rapidité de la réponse !

Hors ligne

#3056 Le 03/10/2010, à 20:57

chepioq

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

Fenouille84 a écrit :

Bonjour à tous smile

Je viens de faire un petit script listant les fenêtres ouvertes sur les différents bureaux.
Il me donne le PID et le titre de la fenêtre (que j'ai réduit pour n'avoir que le nom du dossier ou du fichier ouvert).

Je le trouve assez pratique. Et en l'affichant dans conky, sa permet d'avoir un œil sur ses fenêtres.
Donc voilà, je viens le partager ici wink (n'hésitez pas à reporter les bugs !!)

Ma config : Ubuntu 10.04 | OpenBox 3.4.10 | Cony 1.8.0

Fen.sh

#!/bin/bash

############################### Vers. 1.0 #
#                            #
#    Conky Script - Window Viewer        #
#    ----------------------------        #
#         ---By Fen84---            #
#          -28/09/2010-            #
#                            #
#    -Liste les fenetres ouvertes        #
#    -Dependances : wmctrl            #
#                            #
###########################################

#Variable pour le nombre de bureau
  num=0

#Nombre total de bureau => SEULE VARIABLE A MODIFIER
  tot=4

while [ $num != $tot ]
do
  #Numéro du bureau traité
  dek=$(($num+1))

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

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

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


exit 0

Et dans conky :

${exec Chemin/vers/Fen.sh}

Voilà voilà !
Vous verrez l'application bientôt dans mon nouveau conky wink

P.S. : n'oubliez pas de modifier le script si vous avez plus ou moins de 4 bureaux.

Chez moi cela ne donne pas le titre de la fenêtre, juste le pid et d'autre chiffre...
1286132234.png


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

Hors ligne

#3057 Le 03/10/2010, à 21:42

wlourf

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

@Fenouille, bonne idée, ça marche bien avec #! et openbox

J'ai un peu modifié ton script pour qu'il trouve le nombre de bureaux tout seul (xprop) et le nom du pc (uname) (laptop chez toi) :

#!/bin/bash

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

#Variable pour le nombre de bureau
  num=0

#Nombre total de bureau => SEULE VARIABLE A MODIFIER
  tot="$(xprop -root | grep -m 1 _NET_NUMBER_OF_DESKTOPS |awk '{print $3}')"

#nom de la machine
  nompc="$(uname -n)"
  
while [ $num != $tot ]
do
  #Nom du bureau traité
  desktop_name="$(wmctrl -d | grep -E ^$num | awk '{print $10}')"
  actif="$(wmctrl -d | grep -E ^$num | awk '{print $2}')"  
  if [ "$actif" == "*" ]; then 
    desktop_name="["$desktop_name"]" 
  fi
  #Fenêtres ouvertes
  desktop=$(wmctrl -l -p | grep "  $num " | sed 's/^.*  '"$num"'/ /g ; s/'"$nompc"'//g' | cut -d "-" -f1)

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

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

exit 0

Par contre je ne sais pas comment faire pour afficher le nom du bureau à la place de Bureau 1,2,3 ...
Et as-tu prévu une version pour pipe-menu ?

Edit : modifié pour le nom des bureaux
Edit 2 : le bureau actif est entre crochets []

Dernière modification par wlourf (Le 03/10/2010, à 21:58)

Hors ligne

#3058 Le 03/10/2010, à 22:02

Fenouille84

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

@chepioq
Mince... hmm Tu utilises quel gestionnaire de fenêtre ?
Que te renvoie cette commande en console :

wmctrl -l -p

Je pense que les infos sont là, il ne s'agit que d'un problème de mise en page.

@wlourf
Pas mal l'astuce pour le nombre de bureau automatique !! wink
En revanche, pour le nom des bureaux je ne sais pas... hmm

Si c'est pour conky uniquement, il y a cette option : ${desktop_name}
Sinon, en console, je vais chercher un moyen !!


Edit : Sa y est j'ai trouvé ^^

wmctrl -d | awk '{print $10}'

Je tente d'améliorer le script.

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


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

Hors ligne

#3059 Le 03/10/2010, à 22:03

wlourf

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

fenouille, c'est bon, j'ai édité mon post cool

Hors ligne

#3060 Le 03/10/2010, à 22:17

Fenouille84

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

wlourf a écrit :

fenouille, c'est bon, j'ai édité mon post cool

Nickel, tout fonctionne bien et automatiquement maintenant big_smile
Merci à toi wink

Perso, je n'utilise pas l'option mettant entre crochets le bureau actif.
Mais je la laisse dans le script si quelqu'un la veut, elle peut être utile.

Voici le script final :

#!/bin/bash

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


#Variable pour le nombre de bureau
  num=0

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

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

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

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

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

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

  #Type de la fenêtre :
  desktop=$(wmctrl -l -p | grep "  $num " | sed 's/^.*  '"$num"'/ /g ; s/'"$nompc"'.*-.//g ; s/'"$nompc"'.//g')

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

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

exit 0

Son intégration dans conky :

${exec /chemin/vers/Fen.sh}

Et voilà !

PS1 : ce script fonctionne tout aussi bien en console.
PS2 : aucune prétention => "Fen" comme nom de script car "Fenetre" et non pas "Fenouille" !! Il me fallait bien quelque chose, je n'allais tout même pas nommer mon script "windows"... roll

lol lol lol

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


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

Hors ligne

#3061 Le 04/10/2010, à 06:23

chepioq

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

@Fenouille
J'utilise Kde et mon WM est kwin

J'ai utilisé ton script amélioré et cela me donne ceci:
1286166080.png

Mais à la place de Bureau 1, Bureau 2, etc j'ai Bureau Bureau...

Dernière modification par chepioq (Le 04/10/2010, à 06:25)


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

Hors ligne

#3062 Le 04/10/2010, à 07:06

chepioq

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

Bon j'ai trouvé :
Il faut remplacer

  #Nom du bureau traité
  desktop_name=$(wmctrl -d | grep -E ^$num | awk '{print $10}')

par

  #Nom du bureau traité
  desktop_name=$(wmctrl -d | grep -E ^$num | awk '{print $10$11}')

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

Hors ligne

#3063 Le 04/10/2010, à 07:26

chepioq

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

Bon une dernière modification:
A l'affichage on a Bureau Bureau1
                            Bureau Bureau2
                             ...etc
Je pense que 2 fois bureau c'est trop... lol

J'ai modifié

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

par

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

Ce qui me donne maintenant
1286169911.png

Qu'en pensez vous?


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

Hors ligne

#3064 Le 04/10/2010, à 08:40

Fenouille84

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

chepioq a écrit :

Qu'en pensez vous?

Très bien wink


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

Hors ligne

#3065 Le 04/10/2010, à 17:06

compte supprimé

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

voila ma croute je galère grave roll
1286203307.png
je n'arrive pas a placer par ex cpu mem etc sur la même ligne que auth log ou autre j'ai essaie avec alignc(r)
ou goto et la le drame plus rien n'ait aligner ou alors des espaces .
je laisse le conkyrc pour ceux qui veulent ou ceux qui veulent m'aider tongue (source de l'avant texte dans l'idée d'avoir le même résultat en mieux)

# conky configuration

# set to yes if you want tormo 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

# Print everything to stdout?
# out_to_console no

# MPD host/port
# mpd_host localhost
# mpd_port 6600

# Print everything to console?
# out_to_console no

# Xft font when Xft is enabled
xftfont purisa:size=10

# Text alpha when using Xft
xftalpha 0.8

# mail spool
mail_spool $MAIL

# 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 (requipurple in nautilus)
own_window no

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

# Minimum size of text area
minimum_size 620 5

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_margin 0

# border width
border_width 1

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

# 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 320
gap_y 20

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

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

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


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

#   mldonkey_hostname     Hostname for mldonkey stuff, defaults to localhost
#   mldonkey_port         Mldonkey port, 4001 default
#   mldonkey_login        Mldonkey login, default none
#   mldonkey_password     Mldonkey password, default none

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description                

#  addr              (interface)     IP address for an interface
#  acpiacadapter                     ACPI ac adapter state.                   
#  acpifan                           ACPI fan state                           
#  acpitemp                          ACPI temperature.                        
#  adt746xcpu                        CPU temperature from therm_adt746x       
#  adt746xfan                        Fan speed from therm_adt746x             
#  alignr            (num)           Right-justify text, with space of N
#  alignc                            Align text to centre
#  battery           (num)           Remaining capasity in ACPI or APM        
#                                    battery. ACPI battery number can be      
#                                    given as argument (default is BAT0).     
#  buffers                           Amount of memory buffepurple                
#  cached                            Amount of memory cached                  
#  color             (color)         Change drawing color to color            
#  cpu                               CPU usage in percents                    
#  cpubar            (height)        Bar that shows CPU usage, height is      
#                                    bar's height in pixels                   
#  cpugraph          (height),(width) (gradient colour 1) (gradient colour 2)
#                                    CPU usage graph
#  downspeed         net             Download speed in kilobytes              
#  downspeedf        net             Download speed in kilobytes with one     
#                                    decimal                                  
#  downspeedgraph    net (height),(width) (gradient colour 1) (gradient colour 2)
#                                    Download speed graph
#  exec              shell command   Executes a shell command and displays    
#                                    the output in conky. warning: this      
#                                    takes a lot more resources than other    
#                                    variables. I'd recommend coding wanted   
#                                    behaviour in C and posting a patch :-).  
#  execbar           shell command   Same as exec, except if the first value
#                                    return is a value between 0-100, it
#                                    will use that number for a bar.
#                                    The size for the bar is currently fixed,
#                                    but that may change in the future.
#  execgraph         shell command   Same as execbar, but graphs values
#  execi             interval, shell Same as exec but with specific interval. 
#                    command         Interval can't be less than              
#                                    update_interval in configuration.        
#  fs_bar            (height), (fs)  Bar that shows how much space is used on 
#                                    a file system. height is the height in   
#                                    pixels. fs is any file on that file      
#                                    system.                                  
#  fs_free           (fs)            Free space on a file system available    
#                                    for users.                               
#  fs_free_perc      (fs)            Free percentage of space on a file       
#                                    system available for users.              
#  fs_size           (fs)            File system size                         
#  fs_used           (fs)            File system used space                   
#  hr                (height)        Horizontal line, height is the height in 
#                                    pixels                                   
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
#                                    may be omitted if you have only one I2C  
#                                    device. type is either in (or vol)       
#                                    meaning voltage, fan meaning fan or
#                                    temp/tempf (first in C, second in F)
#                                    meaning temperature. n is number of the  
#                                    sensor. See /sys/bus/i2c/devices/ on     
#                                    your local computer.                     
#  if_running        (process)       if PROCESS is running, display
#                                    everything if_running and the matching $endif
#  if_existing       (file)          if FILE exists, display everything between
#                                    if_existing and the matching $endif
#  if_mounted        (mountpoint)    if MOUNTPOINT is mounted, display everything between
#                                    if_mounted and the matching $endif
#  else                              Text to show if any of the above are not true
#  kernel                            Kernel version                          
#  linkstatus        (interface)     Get the link status for wireless connections
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1     
#                                    minute, 2 for past 5 minutes and 3 for   
#                                    past 15 minutes.                         
#  machine                           Machine, i686 for example                
#  mails                             Mail count in mail spool. You can use    
#                                    program like fetchmail to get mails from 
#                                    some server using your favourite         
#                                    protocol. See also new_mails.            
#  mem                               Amount of memory in use                  
#  membar            (height)        Bar that shows amount of memory in use   
#  memmax                            Total amount of memory                   
#  memperc                           Percentage of memory in use
#  
#  metar_ob_time
#  metar_temp
#  metar_tempf                      Temp in F
#  metar_windchill
#  metar_dew_point                   There are a bunch of these
#  metar_rh                          and they are self-explanatory
#  metar_windspeed
#  metar_winddir
#  metar_swinddir
#  metar_cloud
#  metar_u2d_time

#  ml_upload_counter                 total session upload in mb
#  ml_download_counter               total session download in mb
#  ml_nshapurple_files                  number of shapurple files
#  ml_shapurple_counter                 total session shapurple in mb, buggy
#                                    in some mldonkey versions
#  ml_tcp_upload_rate                tcp upload rate in kb/s
#  ml_tcp_download_rate              tcp download rate in kb/s
#  ml_udp_upload_rate                udp upload rate in kb/s
#  ml_udp_download_rate              udp download rate in kb/s
#  ml_ndownloaded_files              number of completed files
#  ml_ndownloading_files             number of downloading files
#  
#  mpd_artist                Artist in current MPD song
#                                    (must be enabled at compile)
#  mpd_album                Album in current MPD song
#  mpd_bar           (height)        Bar of mpd's progress
#  mpd_bitrate                       Bitrate of current song
#  mpd_status                        Playing, stopped, et cetera.
#  mpd_title                Title of current MPD song
#  mpd_vol                MPD's volume
#  mpd_elapsed                       Song's elapsed time
#  mpd_length                        Song's length
#  mpd_percent                       Percent of song's progress
#  new_mails                         Unread mail count in mail spool.         
#  nodename                          Hostname                                 
#  outlinecolor      (color)         Change outline color                     
#  pre_exec          shell command   Executes a shell command one time before 
#                                    conky displays anything and puts output 
#                                    as text.                                 
#  processes                         Total processes (sleeping and running)   
#  running_processes                 Running processes (not sleeping),        
#                                    requires Linux 2.6                       
#  shadecolor        (color)         Change shading color                     
#  stippled_hr       (space),        Stippled (dashed) horizontal line        
#                    (height)        
#  swapbar           (height)        Bar that shows amount of swap in use     
#  swap                              Amount of swap in use                    
#  swapmax                           Total amount of swap                     
#  swapperc                          Percentage of swap in use                
#  sysname                           System name, Linux for example           
#  offset            pixels          Move text over by N pixels
#  tail              logfile, lines (interval)
#                                    Displays last N lines of supplied text
#                                    text file.  If interval is not supplied,
#                                    Conky assumes 2x Conky's interval.
#                                    Max of 30 lines.
#                                    Max of 30 lines can be displayed.
#  time              (format)        Local time, see man strftime to get more 
#                                    information about format                 
#  totaldown         net             Total download, overflows at 4 GB on     
#                                    Linux with 32-bit arch and there doesn't 
#                                    seem to be a way to know how many times  
#                                    it has already done that before conky   
#                                    has started.                            
#  top               type, num      This takes arguments in the form:
#                                    top <name> <number>
#                                    Basically, processes are ranked from 
#                                    highest to lowest in terms of cpu
#                                    usage, which is what <num> represents.
#                                    The types are: "name", "pid", "cpu", and
#                                    "mem".
#                                    There can be a max of 10 processes listed.
#  top_mem           type, num       Same as top, except sorted by mem usage
#                                    instead of cpu
#  totalup           net             Total upload, this one too, may overflow 
#  updates                           Number of updates (for debugging)        
#  upspeed           net             Upload speed in kilobytes                
#  upspeedf          net             Upload speed in kilobytes with one       
#                                    decimal                                  
#  upspeedgraph      net (height),(width) (gradient colour 1) (gradient colour 2)
#                                    Upload speed graph
#  uptime                            Uptime                                   
#  uptime_short                      Uptime in a shorter format               
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_cpurpleit                       Seti@hoome total user cpurpleit


# 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
short_units yes
pad_percents 2

TEXT
${color yellow} ${goto 20}${voffset 100}${font Conduit BRK:size=12}   Tor   ${color purple}${font Conduit BRK:size=12}${execi 1800 torify wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1} ${alignr} ${goto 300}${font Conduit BRK:size=12}${color purple}${execi 1000 aptitude search "~U" | wc -l | tail}${color yellow}${font Conduit BRK:size=12} Updates${alignc} ${goto 400}${offset 70}${color yellow}Port ouvert ${color purple}${tcp_portmon 1 65535 count}
${color yellow} ${goto 30}${font Conduit BRK:size=12}  IP    ${color purple} ${goto 110}${font Conduit BRK:size=12}${execi 1800 wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1}${alignr} ${goto 300}${font Conduit BRK:size=12}${color purple}${execi 1800 ~/.conky/nmap.pl eth0}${color yellow}${font Conduit BRK:size=12} Nmap
  ${goto 10}    ${font Conduit BRK:size=12}${color yellow}Dmesg                               
${goto 10}${color purple}${font purisa:size=8}${execi 120 dmesg | tail -n3 | fold -w100}
  ${goto 10}     ${color yellow}${font Conduit BRK:size=12}auth log $color        
${goto 10}${color purple}${font purisa:size=8}${execi 20 tail -n3 /var/log/auth.log | fold -w200}
  ${goto 10}     ${color yellow}${font Conduit BRK:size=12}Messages $color
${goto 10}${color purple}${font purisa:size=8}${execi 20 tail -n3 /var/log/messages | fold -w200}

Edit en plus on dirait qu'il y a 2 police superposer

Dernière modification par karamelo (Le 04/10/2010, à 17:13)

#3066 Le 04/10/2010, à 17:50

Levi59

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

Deja tu mélange goto et offset donc l'affichage déconne forcement... Essaye de supprimer tous les offset puis de calibrer chaque goto. Ça devrait retirer pas mal de trucs bizarre. (J'ai aussi vu des voffset mais je ne sais pas pourquoi ils sont là.)

Hors ligne

#3067 Le 04/10/2010, à 18:00

compte supprimé

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

On ne melange pas goto et offset sad bon je suis pas au point c'est en lisant ça que j'ai teste (au pif il faut le dire)
MERCI j essaye
EDIT: j'ai tester et offset n'apparrait 1 fois et voffset 1
ça n'a rien changer en les supprimants

Dernière modification par karamelo (Le 04/10/2010, à 18:13)

#3068 Le 04/10/2010, à 19:16

Levi59

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

goto X permet de se rendre directement a l'emplacement X (au pixel je crois) et est indépendant du reste de la ligne alors que offset et voffset permettent de décaler se qui suit horizontalement  et verticalement le tout en fonction de la ligne.

Si ce qui précède un offset a une dimension qui change comme une indication de download, alors la partie après offset se déplacera aussi au même rythme.

il y a aussi 2 truc à changer avant TEXT:
border_margin en border_inner_margin
use_spacer doit avoir pour argument: left, right, or none

Pour ce qui est de l'alignement... Tu veux mettre tous les relevés de log en vis à vis avec les infos système? Si Oui ce n'est pas vraiment possible directement dans conky mais je peux te donner une solution pour le faire sur le modèle du script pour les fortunes.

Hors ligne

#3069 Le 04/10/2010, à 20:01

compte supprimé

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

A voila une explication claire que je n'ai su trouver tongue oui j'ai repris l'avant texte que j'avais pas pris le temps d'etudier je l'ai remplacer et maintenant plus de bugs

# temps pour fermer conky en seconde. 0 = toujours actif 
total_run_times 0

# affiche le texte sur la sortie standard
out_to_console no

# réglage de la mémoire, pour éviter le clignotement
double_buffer yes
# Soustraire les mémoires tampons de la mémoire utilisée
no_buffers yes
text_buffer_size 2048

# taux de rafraichissement de la fenêtre (en secondes)
update_interval 1

# nombre d'échantillons à utiliser pour calculer la moyenne d'utilisation
cpu_avg_samples 4
net_avg_samples 2

# taille et positon
alignment bottom_left
minimum_size 1024
maximum_width 1000

# écart avec le bord x=gauche ou droit y= haut ou bas
gap_x 5
gap_y 10

#  afficher les ombres
draw_shades no
# afficher des contours
draw_outline no
# contours autour des blocs de texte
draw_borders no
# largeur du contour
border_width 1
# largeur des marges
border_margin 4

#pour que conky tourne en arrière plan background no pour les tests
background yes

# utiliser sa propre fenêtre
own_window yes
#type de fenêtre : normal(avec le cadre) / override / desktop
own_window_type override # normal / override / desktop
#pseudo transparence si vous avez des icones sous le conky elle ne seront plus accessible une fois conky activé
own_window_transparent yes

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

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

# Ajoute des espaces après certains objets pour éviter de les faire bouger.
# Fonctionne uniquement avec les polices Fixes
use_spacer right

# Couleurs
default_color FFFFFF #blanc
default_shade_color 333333
default_outline_color black


TEXT
${color yellow} ${goto 20}${font Conduit BRK:size=12}   Tor   ${color purple}${font Conduit BRK:size=12}${execi 1800 torify wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1} ${alignr} ${goto 300}${font Conduit BRK:size=12}${color purple}${execi 1000 aptitude search "~U" | wc -l | tail}${color yellow}${font Conduit BRK:size=12} Updates${alignc} ${goto 500}${color yellow}Port ouvert ${color purple}${tcp_portmon 1 65535 count}
${color yellow} ${goto 30}${font Conduit BRK:size=12}  IP    ${color purple} ${goto 110}${font Conduit BRK:size=12}${execi 1800 wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1}${alignr} ${goto 300}${font Conduit BRK:size=12}${color purple}${execi 1800 ~/.conky/nmap.pl eth0}${color yellow}${font Conduit BRK:size=12} Nmap
  ${goto 10}    ${font Conduit BRK:size=12}${color yellow}Dmesg                               
${goto 10}${color black}${font purisa:size=8}${execi 120 dmesg | tail -n3 | fold -w100}
  ${goto 10}     ${color yellow}${font Conduit BRK:size=12}auth log $color        
${goto 10}${color black}${font purisa:size=8}${execi 20 tail -n3 /var/log/auth.log | fold -w200}
  ${goto 10}     ${color yellow}${font Conduit BRK:size=12}Messages $color
${goto 10}${color black}${font purisa:size=8}${execi 20 tail -n3 /var/log/messages | fold -w200}

et du noir on voit mieux cool  MERCI

#3070 Le 05/10/2010, à 06:12

maestroom

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

salut a tous.... j'ai améliorer mon nouveau conkyrc smile
mynewroundconky2.th.png

il est beau a souhait pour moi.. mais depuis quelques temps.. en faite depuis qu'il a ces barre ainsi mon gnome session crash et je me retrouve automatiquement a la fenêtre de connexion ???? étrange je ne comprend pas d'ou vient le lien entre conky et le gnome-session. donc voici mes script

mon fichier start.sh

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


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

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

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

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

v1.0 (08 Aug. 2010) original release

]]


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

    {
    --ring 1-1 :cpu
    name="cpu",
    arg="cpu1",
    max=100,
    xc=520,
    yc=80,
    radius=30,
    thickness=10,
    start_angle=-210,
    end_angle=40,
    sectors=30,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XFF6E00,0},{0.5,0xFF6E00,1}, {1,0xFF6E00,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0XFF6E00,1},{0.5,0xFF6E00,1}, {1,0xFF6E00,1}},
    },

    {
    --ring 1-2 :cpu
    name="cpu",
    arg="cpu2",
    max=100,
    xc=520,
    yc=80,
    radius=40,
    thickness=10,
    start_angle=-40,
    end_angle=210,
    sectors=30,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XCB0C29,0},{0.5,0xCB0C29,1}, {1,0xCB0C29,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0XCB0C29,1},{0.5,0xCB0C29,1}, {1,0xCB0C29,1}},
    },

    {
    --ring 1-3 :cpu
    name="cpu",
    arg="cpu3",
    max=100,
    xc=520,
    yc=80,
    radius=50,
    thickness=10,
    start_angle=-210,
    end_angle=40,
    sectors=30,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0X49A835,0},{0.5,0x49A835,1}, {1,0x49A835,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X49A835,1},{0.5,0x49A835,1}, {1,0x49A835,1}},
    },

    {
    --ring 1-4 :cpu
    name="cpu",
    arg="cpu4",
    max=100,
    xc=520,
    yc=80,
    radius=60,
    thickness=10,
    start_angle=-40,
    end_angle=210,
    sectors=30,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0X2D7DB3,0},{0.5,0x2D7DB3,1}, {1,0x2D7DB3,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X2D7DB3,1},{0.5,0x2D7DB3,1}, {1,0x2D7DB3,1}},
    },
    
    {
    --ring 2 : memory
    name="memperc",
    arg="",
    max=100,
    xc=180,
    yc=670,
    radius=100,
    thickness=20,
    start_angle=-140,
    end_angle=140,
    sectors=40,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XAB1852,0},{0.5,0xAB1852,1}, {1,0xAB1852,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0XAB1852,1},{0.5,0xAB1852,1}, {1,0xAB1852,1}},
    },

    {
    --ring 4-1 : download speed
    name="downspeedf",
    arg="eth0",
    max=700,
    xc=180,
    yc=670,
    radius=80,
    thickness=20,
    start_angle=-140,
    end_angle=140,
    sectors=40,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0Xdc1818,0},{0.5,0xdc1818,1}, {1,0xdc1818,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0Xdc1818,1},{0.5,0xdc1818,1}, {1,0xdc1818,1}},
    },    
    
    {
    --ring 4-2 : upload speed
    name="upspeedf",
    arg="eth0",
    max=200,
    xc=180,
    yc=670,
    radius=60,
    thickness=20,
    start_angle=-140,
    end_angle=140,
    sectors=40,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0X2D7DB3,0},{0.5,0x2D7DB3,1}, {1,0x2D7DB3,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X2D7DB3,1},{0.5,0x2D7DB3,1}, {1,0x2D7DB3,1}},
    },        

    {
    --ring 5-1 : file system usage for /home
    name="fs_used_perc",
    arg="/home",
    max=100,
    xc=40,
    yc=330,
    radius=40,
    thickness=20,
    start_angle=-180,
    end_angle=180,
    sectors=20,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XFFFF00,0},{0.5,0xFFFF00,1}, {1,0xFFFF00,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
    },        

    {
    --ring 5-2 : file system usage for /home
    name="fs_used_perc",
    arg="/media/games_/",
    max=100,
    xc=180,
    yc=330,
    radius=40,
    thickness=20,
    start_angle=-180,
    end_angle=180,
    sectors=20,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XFFFF00,0},{0.5,0xFFFF00,1}, {1,0xFFFF00,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
    },        

    {
    --ring 5-3 : file system usage for /home
    name="fs_used_perc",
    arg="/media/Backup/",
    max=100,
    xc=300,
    yc=370,
    radius=40,
    thickness=20,
    start_angle=-180,
    end_angle=180,
    sectors=20,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XFFFF00,0},{0.5,0xFFFF00,1}, {1,0xFFFF00,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
    },        

    {
    --ring 5-4 : file system usage for /home
    name="fs_used_perc",
    arg="/media/Multimedia_/",
    max=100,
    xc=400,
    yc=440,
    radius=40,
    thickness=20,
    start_angle=-180,
    end_angle=180,
    sectors=20,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XFFFF00,0},{0.5,0xFFFF00,1}, {1,0xFFFF00,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
    },    
    
    {
    --ring 4-5 : file system usage for /data partition
    name="fs_used_perc",
    arg="/media/Lexar/",
    max=100,
    xc=515,
    yc=520,
    radius=40,
    thickness=20,
    start_angle=-180,
    end_angle=180,
    sectors=20,
    bg_colour1={{0,0x999999,0},{0.5,0x999999,1}, {1,0x999999,0}},
    fg_colour1={{0,0XFFFF00,0},{0.5,0xFFFF00,1}, {1,0xFFFF00,0}},
    fg_colour2={{0,0Xae0119,0},{0.5,0xae0119,1}, {1,0xae0119,0}},
    bd_colour1={{0,0X00FF00,1},{0.5,0x00FF00,1}, {1,0x00FF00,1}},
    },    
    
}
--END OF PARAMETERS HERE

--main function

    if conky_window==nil then return end

    local cs=cairo_xlib_surface_create(conky_window.display,
        conky_window.drawable, 
        conky_window.visual, conky_window.width, conky_window.height)
    cr=cairo_create(cs)

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

    cairo_destroy(cr)

end




function draw_ring(t)

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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


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

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

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

         cairo_restore(cr)

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

    cairo_restore(cr)
end


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


function axis(ctx,alpha)
    cairo_set_line_width(ctx,1)
    cairo_set_source_rgba(ctx,1,0,0,alpha)
    cairo_move_to(ctx,0,0)
    cairo_line_to(ctx,150,0)
    cairo_stroke(ctx)
    cairo_set_source_rgba(ctx,0,1,0,alpha)
    cairo_move_to(ctx,0,0)
    cairo_line_to(ctx,0,150)
    cairo_stroke(ctx)
end
# Use Xft?
use_xft yes
xftfont DejaVu Sans: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
background yes

# Create own window instead of using desktop (requiblack 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 (blackuces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 400
maximum_width 700

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

# 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 20
gap_y 80

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

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

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

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

border_inner_margin 5
border_outer_margin 5

# -- Lua load -- #
lua_load ~/Conky/ring.lua
lua_draw_hook_pre main_rings
lua_draw_hook_post draw_text

TEXT
${voffset 0}${goto 80}${color green}${font poky:size=40}N${color grey}${font Alice in Wonderland:size=20} Carte Graphique Nvidia ${cpugraph cpu6 0,100}
${voffset 0}${font Alice in Wonderland:size=15}${goto 200}${color grey}AMD PHENOM 9550E :${nvidia gpufreq} GHz
${voffset 0}${color #CB0C29}${font Alice in Wonderland:size=15}${goto 260}${color grey}Température ACtuel : ${color grey}${nvidia temp}${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C
${voffset 0}${color #CB0C29}${font Alice in Wonderland:size=15}${goto 300}${color grey}Seuil Température : ${color grey}${nvidia threshold}${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C
${voffset 0}${color #CB0C29}${font Alice in Wonderland:size=15}${goto 300}${color grey}nvidia memory : ${color grey}${nvidia memfreq}${font Beautiful Dreams:size=10}MHZ  
${voffset 0}${color #FF6E00}${font Alice in Wonderland:size=15}${color #2D7DB3}${font Alice in Wonderland:size=15}${goto 460}Cpu Temp: ${color #CB0C29}${hwmon 1 temp 1}${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C
${voffset 0}${color #FF6E00}${font Alice in Wonderland:size=15}${goto 460}Core 1: ${cpu cpu1}%
${voffset 0}${color #CB0C29}${font Alice in Wonderland:size=15}${goto 460}Core 2: ${cpu cpu2}%
${voffset 0}${color #49A835}${font Alice in Wonderland:size=15}${goto 460}Core 3: ${cpu cpu3}% 
${voffset 0}${color #2D7DB3}${font Alice in Wonderland:size=15}${goto 460}Core 4: ${cpu cpu4}% 
${voffset 100}${color grey}${font Alice in Wonderland:size=15}${goto 0}Home: ${goto 140}Games:
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 0}Used: ${fs_used /home}${goto 140}Used: ${fs_used /media/games_}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 0}Free: ${fs_free /home}${goto 140}Free: ${fs_free /media/games_}${goto 260}Backup:
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 0}Size: ${fs_size /home}${goto 140}Size: ${fs_size /media/games_}${goto 260}Used: ${fs_used /media/Backup}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 0}Temp: ${execi 10 hddtemp -n /dev/sda}${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C ${goto 140}Temp: ${execi 10 hddtemp -n /dev/sdc}${font Alice in Wonderland:size=15}${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C  ${goto 260}Free: ${fs_free /media/Backup}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 260}Size: ${fs_size /media/Backup}${goto 365}Multimedia:
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 260}Temp: ${execi 10 hddtemp -n /dev/sdb}${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C ${goto 365}Used: ${fs_used /media/Multimedia_}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 365}Free: ${fs_free /media/Multimedia_}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 365}Size: ${fs_size /media/Multimedia_}${goto 480}Lexar:
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 365}Temp: ${execi 10 hddtemp -n /dev/sdd} ${font Beautiful Dreams:size=10}°${font Alice in Wonderland:size=15}C ${goto 480}Free: ${fs_free /media/Lexar}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 480}Used: ${fs_used /media/Lexar}
${voffset 0}${color grey}${font Alice in Wonderland:size=15}${goto 480}Size: ${fs_size /media/Lexar}
${voffset 60}${color #dc1818}${font Alice in Wonderland:size=15}${goto 145}Download:
${voffset 0}${color #dc1818}${font Alice in Wonderland:size=15}${goto 145}${downspeed eth0}
${voffset 0}${color #2D7DB3}${font Alice in Wonderland:size=15}${goto 130}Upload: ${upspeed eth0}
${voffset 0}${color #AB1852}${font Alice in Wonderland:size=15}${goto 140}Mémoire: $memperc%

ha hé aussi je remerci wlourf pour le script

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


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

Hors ligne

#3071 Le 05/10/2010, à 06:44

chepioq

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

@maestroom

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

background yes

tu mets:

background no

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

Hors ligne

#3072 Le 05/10/2010, à 12:24

bilweb

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

A chaque démarrage mon Conky ce lance au dessus de mes fenêtres ! Une Solution ?

# Use Xft?
use_xft yes
xftfont OFL Sorts Mill Goudy: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 undecorate,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 1200
#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_inner_margin 5

# border width
border_width 1

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

# 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 15
gap_y 35

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

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

# 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
${color 888888}Mise à Jour ${hr 2}
${color}Il y a ${execi 3600 aptitude search "~U" | wc -l} mise à jours.

${color 888888}Uptime ${hr 2}
${color}${uptime %H:%M:%S}

${color 888888}Consommation CPU et RAM ${hr 2}
${color }${cpu}% ${freq_g} GHz
${cpubar}
$mem - $memmax
${membar}

${color 888888}Température GPU ${hr 2}
${color }GPU Temp: ${alignr}${execi 20 nvidia-settings -q gpucoretemp |grep Attribute |awk '{print $4}' |cut -c1-2} °C

${color 888888}Système ${hr 2}
${color}Release ${pre_exec lsb_release -r -s} (${pre_exec lsb_release -c -s})
${color}Kernel ${sysname} ${kernel}

${color 888888}Ressources ${hr 2}
${color}${font}CPU1 ${cpu cpu1}%${alignr}${color ff6e00}${cpubar cpu1 10,60}
${color}${font}CPU2 ${cpu cpu2}%${alignr}${color ff6e00}${cpubar cpu2 10,60}
${color}${font}CPU3 ${cpu cpu3}%${alignr}${color ff6e00}${cpubar cpu3 10,60}
${color}${font}CPU4 ${cpu cpu4}%${alignr}${color ff6e00}${cpubar cpu4 10,60}
${color}Mem  ${mem}/${memmax}${alignr}${color ab1852}${membar 10,60}
#${color}Swap ${swap}/${swapmax}${alignr}${color 49a835}${swapbar 10,60}

${color 888888}Réseaux ${hr 2}
${color}Reception ${downspeedf eth0} KB/s ${alignr}${color 2d7db3}${downspeedgraph eth0 10,60}
${color}Reçu${alignr}${totaldown eth0}
${color}Envoi   ${upspeedf eth0} KB/s ${alignr}${color 844798}${upspeedgraph eth0 10,60}
${color}Total Envoi${alignr}${totalup eth0}

${color 888888}Espace Disque ${hr 2}
${color}Système: ${fs_used /}/${fs_size /}${alignr}${color 6796C8}${fs_bar 10,60 /}
${color}Home: ${fs_used /home}/${fs_size /home} ${alignr}${color 6796C8}${fs_bar 10,60 /home}
${color}WorkFlow : ${fs_used /WorkFlow}/${fs_size /WorkFlow}${color 6796C8} ${alignr}${fs_bar 10,60 /WorkFlow}

${color 888888}Processus ${hr 2}
${color}Appli : $alignr PID    CPU
${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}
${top name 6} $alignr ${top pid 6} ${top cpu 6}

${color 888888}Utilisation RAM ${hr 2}
${color}Appli : $alignr
${color}${top_mem name 1} $alignr ${top_mem pid 1}${top_mem cpu 1}${top_mem mem 1}
${color}${top_mem name 2}$alignr${top_mem pid 2}${top_mem cpu 2}${top_mem mem 2}
${color}${top_mem name 3}$alignr${top_mem pid 3}${top_mem cpu 3}${top_mem mem 3}

#${font Radio Space:size=10}${time %d %B %Y}${font}
#${font Radio Space:pixelsize=66}${time %H:%M}

${color 888888}Météo${font} ${hr 2}
${color}
Localisation: ${execi 3600 conkyForecast --location=FRXX1094 --datatype=CN}

Conditions: ${execi 3600 conkyForecast --location=FRXX1094 --datatype=CC}

${font ConkyWeather:size=36}${execi 3600 conkyForecast --location=FRXX1094 --datatype=WF}${font}
Température: ${execi 3600 conkyForecast --location=FRXX1094 --datatype=HT}

Dans les jours à venir :

${font ConkyWeather:size=36}${execi 3600 conkyForecast --startday=1 --endday=3 --location=FRXX1094 --datatype=WF}${font}
${execi 3600 conkyForecast --location=FRXX1094 --startday=1 --endday=3 --spaces=15 --datatype=HT}
${execi 3600 conkyForecast --location=FRXX1094 --startday=1 --endday=3 --spaces=5 --datatype=DW}


i5 3.2Ghz 1To 8Go GeForce315 512MB

Hors ligne

#3073 Le 05/10/2010, à 13:43

kurapika29

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

@bilweb t'as essayé de le retardé au démarrage avec un script ça peut solutionné ton problème

#!/bin/bash
sleep 30
conky
exit

enregistre ça dans ton ~/home sous le nom conkystart.sh par exemple rend le exécutable en cliquant droit dessus propriétés/permissions et cocher la case à coté d'executer.
Puis remplacer dans applications au démarrage au lieux de lancer juste conky fait pointer sur le script wink
Dans l'exemple ça donnerais "~/conkystart.sh" sans les guillemets dans la partie commande bien sûr.


Disponible sur IRC, sur le serveur irc.freenode.net salon ##ubuntu-voyager (et aussi sur plein d'autre serveur/salon)
Venez si vous avec besoin d'aide ou pour causer ;) suffit d'avoir Xchat ou un autre client IRC
Où sinon en cliquant sur se lien http://kiwiirc.com/client/irc.freenode. … tu-voyager

Hors ligne

#3074 Le 05/10/2010, à 13:55

bilweb

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

kurapika29 a écrit :

@bilweb t'as essayé de le retardé au démarrage avec un script ça peut solutionné ton problème

#!/bin/bash
sleep 30
conky
exit

enregistre ça dans ton ~/home sous le nom conkystart.sh par exemple rend le exécutable en cliquant droit dessus propriétés/permissions et cocher la case à coté d'executer.
Puis remplacer dans applications au démarrage au lieux de lancer juste conky fait pointer sur le script wink
Dans l'exemple ça donnerais "~/conkystart.sh" sans les guillemets dans la partie commande bien sûr.

Merci cela à solutionner le problème


i5 3.2Ghz 1To 8Go GeForce315 512MB

Hors ligne

#3075 Le 05/10/2010, à 17:00

wlourf

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

maestroom a écrit :

ha hé aussi je remerci wlourf pour le script

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

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

un truc du genre :

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

Je n'ai pas essayé personnellement !

Hors ligne