Contenu | Rechercher | Menus

Annonce

Si vous rencontrez des soucis à rester connecté sur le forum (ou si vous avez perdu votre mot de passe) déconnectez-vous et reconnectez-vous depuis cette page, en cochant la case "Me connecter automatiquement lors de mes prochaines visites".
Test de l'ISO d'Ubuntu francophone : nous avons besoin de testeurs pour la version francophone d'Ubuntu 14.04. Liens et informations ici.
nombre réponses : 2

#0 Re : -1 »  (4) Conky : Postez vos conkyrc ou certaines parties intéressantes » Le 26/08/2012, à 20:50

wansprl
Réponses : 2375

Bonjour,
Juste pour ceux qui ont envie de changer les couleurs par exemple des températures suivant vert orange rouge.
Je me suis amusé.
Mon conky

alignment bottom_right
background yes
border_width 1
cpu_avg_samples 2
default_color yellow
default_outline_color yellow
default_shade_color yellow
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
gap_x 40
gap_y 75
max_port_monitor_connections 64
max_specials 512
max_user_text 16384
minimum_size 275 275
maximum_width 275
net_avg_samples 2
no_buffers yes
out_to_console no
wm_class_name Conky
own_window_colour yellow
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type normal
own_window yes
own_window_argb_visual yes
stippled_borders 2
update_interval 2
uppercase no
use_spacer yes
use_xft yes
text_buffer_size 1024
xftalpha 0.8
xftfont Bitstream Vera Sans Mono:size=10

TEXT
${color #0077ff}${time %A %d %B %Y}
${color #0077ff}${font style=Bold:pixelsize=30}${time %H:%M:%S}${font}${color}
${color #0077ff}$sysname $kernel
${color #0077ff}Uptime:${color} $uptime
${color #0077ff}CPU:$color ${cpu}% ${color}${cpubar 5,120} ${color Yellow}${cpugraph 13,93 00FF00 FF0000}
#${color #0077ff}${cpugraph cpu 25,135 00FF00 FF0000}
#$alignr${cpugraph cpu2 25,135  00FF00 FF0000}${color #0077ff}${cpugraph cpu3 25,135 00FF00 FF0000}$alignr${cpugraph cpu4 25,135  00FF00 FF0000}
${color #0077ff}RAM Usage:$color $mem${color #0077ff}/${color} $memmax $memperc% ${membar 6}
${color #0077ff}Swap Usage:$color $swap${color #0077ff}/${color} $swapmax $swapperc% ${swapbar 6}
$hr
${color #0077ff}Disk I/O: $color${diskio} ${diskiograph 13,150  00FF00 FF0000}
${color #0077ff}Samsung 250Gb:${if_match ${hddtemp /dev/sda}<=30}${color green}${hddtemp /dev/sda}$else${if_match ${hddtemp /dev/sda}<=33}${color orange}${hddtemp /dev/sda}$else${color red}${hddtemp /dev/sda}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sda 13,135 00FF00 FF0000}
${fs_free /}/${fs_size /}${fs_bar 3,100} ${diskio /dev/sda}
${color #0077ff}Western 500Gb:${if_match ${hddtemp /dev/sdb}<=32}${color green}${hddtemp /dev/sdb}$else${if_match ${hddtemp /dev/sdb}<=36}${color orange}${hddtemp /dev/sdb}$else${color red}${hddtemp /dev/sdb}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sdb 13,135 00FF00 FF0000}
${fs_free /home/}/${fs_size /home/}${fs_bar 3,100 /home/} ${diskio /dev/sdb}
${color #0077ff}Seagate 500Gb:${if_match ${hddtemp /dev/sdc}<=32}${color green}${hddtemp /dev/sdc}$else${if_match ${hddtemp /dev/sdc}<=36}${color orange}${hddtemp /dev/sdc}$else${color red}${hddtemp /dev/sdc}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sdc 13,135 00FF00 FF0000}
${fs_free /media/1e22e645-768e-49f4-a762-20fadcfab4ac_/}/${fs_size /media/1e22e645-768e-49f4-a762-20fadcfab4ac_/}${fs_bar 3,100 /media/1e22e645-768e-49f4-a762-20fadcfab4ac_/} ${diskio /dev/sdc}
${color #0077ff}Seagate 250Gb:${if_match ${hddtemp /dev/sdd}<=32}${color green}${hddtemp /dev/sdd}$else${if_match ${hddtemp /dev/sdd}<=36}${color orange}${hddtemp /dev/sdd}$else${color red}${hddtemp /dev/sdd}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sdd 13,135 00FF00 FF0000}
${fs_free /media/df533133-cc07-480e-b336-15573a83aaef_/}/${fs_size /media/df533133-cc07-480e-b336-15573a83aaef_/}${fs_bar 3,100 /media/df533133-cc07-480e-b336-15573a83aaef_/} ${diskio /dev/sdd}
${color #0077ff}Samsung 250Gb:${if_match ${hddtemp /dev/sde}<=30}${color green}${hddtemp /dev/sde}$else${if_match ${hddtemp /dev/sde}<=33}${color orange}${hddtemp /dev/sde}$else${color red}${hddtemp /dev/sde}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sde 13,135 00FF00 FF0000}
${fs_free /media/c3d95c81-0872-48fe-9a8b-8d59da8117db_/}/${fs_size /media/c3d95c81-0872-48fe-9a8b-8d59da8117db_/}${fs_bar 3,100 /media/c3d95c81-0872-48fe-9a8b-8d59da8117db_/} ${diskio /dev/sde}
${color #0077ff}Western 1000Gb:${if_match ${hddtemp /dev/sdf}<=32}${color green}${hddtemp /dev/sdf}$else${if_match ${hddtemp /dev/sdf}<=36}${color orange}${hddtemp /dev/sdf}$else${color red}${hddtemp /dev/sdf}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sdf 13,135 00FF00 FF0000}
${fs_free /media/Elements/}/${fs_size /media/Elements/}${fs_bar 3,100} ${diskio /dev/sdf}
#${color #0077ff}Externe Hdd  :${if_match ${hddtemp /dev/sdf}<=27}${color yellow}${hddtemp /dev/sdf}$else${color red}${hddtemp /dev/sdf}$endif°C${color Yellow}${alignr}${diskiograph /dev/sdf 13,135 00FF00 FF0000}
${color #0077ff}${exec nvidia-settings -q gpus |grep '0] (' | cut -d '(' -f 2,2 | sed -e 's/.\{1\}$//'} $color${if_match ${nvidia temp}<=40}${color green}${nvidia temp} $else${if_match ${nvidia temp}<=50}${color orange}${nvidia temp}$else${color red}${nvidia temp}$endif$endif${goto 150}°C ${color #0077ff}Ventillo ${color}${exec nvidia-smi -a | grep Fan | cut -c34-39}
#${alignr}${color white}${exec nvidia-settings -q NvidiaDriverVersion |grep ‘):’ | cut -d ‘ ‘ -f 6,6}
${color #0077ff}Mem utilisée: ${color}${exec nvidia-smi -a | grep 'Used' | cut -c35-41} ${color #0077ff}Mem total: ${color}${exec nvidia-smi -a | grep 'Free' | cut -c35-41}
${color #0077ff}Frequency (in MHz):$color $freq
${color #0077ff}Intel Core 00:${if_match ${exec sensors|grep 'Core 0'| cut -c16-19}<=35.0}${color green}${exec sensors|grep 'Core 0'| cut -c16-19}$else${if_match ${exec sensors|grep 'Core 0'| cut -c16-19}<=50.0}${color orange}${exec sensors|grep 'Core 0'| cut -c16-19}$else${color red}${exec sensors|grep 'Core 0'| cut -c16-19}$endif$endif°C ${color #0077ff}Intel Core 01:${if_match ${exec sensors|grep 'Core 1'| cut -c16-19}<=35.0}${color green}${exec sensors|grep 'Core 1'| cut -c16-19}$else${if_match ${exec sensors|grep 'Core 1'| cut -c16-19}<=50.0}${color orange}${exec sensors|grep 'Core 1'| cut -c16-19}$else${color red}${exec sensors|grep 'Core 1'| cut -c16-19}$endif$endif°C
${color #0077ff}Intel Core 02:${if_match ${exec sensors|grep 'Core 2'| cut -c16-19}<=35.0}${color green}${exec sensors|grep 'Core 2'| cut -c16-19}$else${if_match ${exec sensors|grep 'Core 2'| cut -c16-19}<=50.0}${color orange}${exec sensors|grep 'Core 2'| cut -c16-19}$else${color red}${exec sensors|grep 'Core 2'| cut -c16-19}$endif$endif°C ${color #0077ff}Intel Core 03:${if_match ${exec sensors|grep 'Core 3'| cut -c16-19}<=35.0}${color green}${exec sensors|grep 'Core 3'| cut -c16-19}$else${if_match ${exec sensors|grep 'Core 3'| cut -c16-19}<=50.0}${color orange}${exec sensors|grep 'Core 3'| cut -c16-19}$else${color red}${exec sensors|grep 'Core 3'| cut -c16-19}$endif$endif°C 
${color #0077ff}Carte Mère Tp:$color${if_match ${exec sensors|grep 'temp1'| cut -c16-19}<=29.0}${color green}${exec sensors|grep 'temp1'| cut -c16-19}$else${if_match ${exec sensors|grep 'temp1'| cut -c16-19}<=40.0}${color orange}${exec sensors|grep 'temp1'| cut -c16-19}$else${color red}${exec sensors|grep 'temp1'| cut -c16-19}$endif$endif°C${color #0077ff} Carte Mère Tp:$color${if_match ${exec sensors|grep 'temp3'| cut -c16-19}<=29.0}${color green}${exec sensors|grep 'temp3'| cut -c16-19}$else${if_match ${exec sensors|grep 'temp3'| cut -c16-19}<=40.0}${color orange}${exec sensors|grep 'temp3'| cut -c16-19}$else${color red}${exec sensors|grep 'temp3'| cut -c16-19}$endif$endif°C
${color #0077ff}Vitesse Fan 1:$color${exec sensors|grep 'fan1'| cut -c14-22}
$color$hr
${color #0077ff}IP ${color}${addr eth0}
#${color #0077ff}wan:${color}${texeci 3600 wget [url]http://checkip.dyndns.org[/url] -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1} 
#IP Publique ${execi 60 wget -O - [url]http://ip.tupeux.com[/url] | tail}
${color #0077ff}Net Down:${goto 80}$color ${downspeed eth0} ${color #0077ff}Net Up:$color ${upspeed eth0} 
${color}${downspeedgraph eth0 25,135 00FF00 FF0000} ${alignr}${color}${upspeedgraph eth0 25,135 00FF00 FF0000}
${color #0077ff}Tot Down:${goto 80}$color ${totaldown eth0} ${color #0077ff}Tot Up:$color ${totalup eth0}
${color #0077ff}Jour :${goto 80}$color${execi 300 vnstat -i eth0 | grep "today" | awk '{print $2 $3}'}${goto 140}${color #0077ff}Jour :$color${goto 205}${execi 300 vnstat -i eth0 | grep "today" | awk '{print $5 $6}'}  
${color #0077ff}Semaine :${goto 80}$color${execi 300 vnstat -w -i eth0 | grep "current week" | awk '{print $3 $4}'}${goto 140}${color #0077ff}Semaine :$color${goto 205}${execi 300 vnstat -w -i eth0 | grep "current week" | awk '{print $6 $7}'} 
${color #0077ff}Mois :${goto 80}$color${execi 300 vnstat -m -i eth0 | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}${goto 140}${color #0077ff}Mois :$color${goto 205}${execi 300 vnstat -m -i eth0 | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}
$color$hr
#${execi 30 tail -n3 /var/log/ulog/syslogemu.log | fold -w50}
${color #0077ff}Port(s)${alignr}${color #0077ff}Entrées : $color${tcp_portmon 1 32767 count}${color #0077ff} Sorties :$color ${tcp_portmon 32768 61000 count}${color #0077ff} ALL : $color${tcp_portmon 1 65535 count}
${color #0077ff}Connections Out${alignr} Service / Port$color
${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${tcp_portmon 32768 61000 rhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
${color #0077ff}Connections In${alignr} Service / Port$color
${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
$hr
${color}Top Processes:
${color #0077ff}Processes:$color $processes  ${color #0077ff}Running:$color $running_processes
${color #0077ff}Name             PID    CPU%   MEM%
$color${top name 1}${top pid 1} ${top cpu 1} ${top mem 1}
$color${top name 2}${top pid 2} ${top cpu 2} ${top mem 2}
$color${top name 3}${top pid 3} ${top cpu 3} ${top mem 3}
$color${top name 4}${top pid 4} ${top cpu 4} ${top mem 4}
$color${top name 5}${top pid 5} ${top cpu 5} ${top mem 5}
$hr
[code]merci de penser à utiliser les balises code[/code]

#1 Re : -1 »  --Conky-- Conditions -> Colorisations » Le 21/09/2012, à 01:26

wansprl
Réponses : 2

Bonjour,
Un exemple d'une des lignes sur mon conky qui change la couleur en fonction de la température du disque

${color #0077ff}Samsung 250Gb:${if_match ${hddtemp /dev/sda}<=30}${color green}${hddtemp /dev/sda}$else${if_match ${hddtemp /dev/sda}<=33}${color orange}${hddtemp /dev/sda}$else${color red}${hddtemp /dev/sda}$endif$endif°C${color Yellow}${alignr}${diskiograph /dev/sda 13,135 00FF00 FF0000}

Donc a mon avis suivant en ligne de commande ce que te donne comme réponse battery APM0

${color #0077ff}Samsung 250Gb:${if_match ${battery APM0}<=10}${color green}${battery_bar}$else${if_match ${battery APM0}<=25}${color orange}${battery_bar}$else${color red}${battery_bar}$endif$endif°