Suite à ce fil
forums.fedora-fr.org/viewtopic.php?id=5532&p=86 post 2126 et suivants je vais vous donner les différents conky que j'utilise
Pour commencer le conky-monitor
le conky-monitor
conky.config = {
double_buffer = true,
background = false ,
use_xft = true,
font = "MgOpen Modata L:size=7:bold",
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
default_color = 'white',
alignment = 'top_right',
gap_x = 12,
gap_y = 200,
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
text_buffer_size = 4096,
color1 = '00f5ff',
color2 = 'cd5555',
color3 = '11B3F8',
color4 = '0000ff',
color5 = '176e88',
color6 = 'ff4500',
color7 = '00FF00',
color8 = 'ffff00',
color9 = 'ffff00',
}
conky.text = [[
${font Waltograph UI:size=12:bold} ${alignc} ${color1}${execi 3600 lsb_release -irs} ${execi 3600 lsb_release -sc}
${font} ${alignc} ${color2}Kernel : ${color3}${execi 3600 uname -r}
${alignc}${color2}Démarrage : ${color3}${execi 3600 systemd-analyze time | awk '{print $13}'}
${color1}${membar 0,170} ${color3}CPU ${color1}${membar 0,170}
${alignc}${color2}Processeur : ${color3}${execi 3600 grep -i -m 1 'Model name' /proc/cpuinfo |sed 's/^.*: //'| sed -e 's/([^()]*)//g' }
${alignc}${color2}Pilote : ${color3}${execi 3600 cpupower frequency-info | grep driver | awk '{print $2}'}
${color2}Fréquence CPU 1 : ${color3}${freq 1} MHz ${goto 200}${color2}Fréquence CPU 2 : ${color3}${freq 2} MHz
${color2}Fréquence CPU 3 : ${color3}${freq 3} MHz ${goto 200}${color2}Fréquence CPU 4 : ${color3}${freq 4} MHz
${color4}${cpugraph cpu1 20,181 00ff00 ff0004 -t} ${color4}${cpugraph cpu2 20,181 00ff00 ff0004 -t}
${color4}${cpugraph cpu3 20,181 00ff00 ff0004 -t} ${color4}${cpugraph cpu4 20,181 00ff00 ff0004 -t}
${color2}Utilisation Core 1 : ${color3}${cpu cpu1}%${goto 200}${color2}Utilisation Core 2 : ${color3}${cpu cpu2}%
${color2}Utilisation Core 3 : ${color3}${cpu cpu3}%${goto 200}${color2}Utilisation Core 4 : ${color3}${cpu cpu4}%
${color2}Température Core 1 : ${execpi 6 sensors | awk '/Core 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3); print $3}' | xargs /home/dominique/.conkyrc/conky-1.10/conky_monitor/colorizeCPU.sh}°C${goto 200}${color2}Température Core 2 : ${color3}${execpi 6 sensors | awk '/Core 1/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3); print $3}' | xargs /home/dominique/.conkyrc/conky-1.10/conky_monitor/colorizeCPU.sh}°C
${color1}${membar 0,170} ${color3}GPU ${color1}${membar 0,170}
${color2}Carte Graphique : ${color3}${execi 3600 nvidia-settings -q gpus | sed -n '4p' | awk -F'[()]' '{print $2}'}${color2} Pilote NVidia : ${color3}${execi 3600 nvidia-settings -q NvidiaDriverVersion | sed -n '2p' | awk '{print $4}'}
${color2}Température GPU : ${color3}${execpi 6 nvidia-settings -q all | grep GPUCoreTemp | grep gpu:0 | awk '{print $4}' | cut -c 1-2 | xargs /home/dominique/.conkyrc/conky-1.10/conky_monitor/colorizeGpu.sh}°C
${color1}${membar 0,170} ${color3}DD ${color1}${membar 0,175}
${alignc}${color2} Disque dur : ${color3} Samsung SSD 840 PRO 256 Go
${alignc}${color2}Accès disque
${color2}${goto 70}Lecture : ${color3}${diskio_read} ${color2}${goto 250}Ecriture : ${color3}${diskio_write}
${color4}${diskiograph_read 20,181 00ff00 ff0000 -t} ${color1}${diskiograph_write 20,181 00ff00 ff0000 -t}
${color1}${membar 0,170} ${color3}RAM ${color1}${membar 0,170}
${color2}Utilisation RAM ${color5}${alignc} Totale Utilisée Pourcentage
${alignc} ${color3}${goto 120}$memmax${goto 195}$mem${goto 290}$memperc%
${color4}${memgraph 20,364 00ff00 ff0004 -t}
${color1}${membar 0,170} ${color3}SWAP ${color1}${membar 0,162}
${color2}Utilisation Swap : ${color3} $swap/$swapmax - $swapperc% ${color1} ${swapbar 8,165}
${if_existing /proc/net/route enp4s0}/
${color1}${membar 0,130} ${color3}RESEAU ETHERNET ${color1}${membar 0,135}
${color5}Reception :${color6} ${downspeedf enp4s0} k/s${goto 200}${color3}Envoi : ${color6}${upspeedf enp4s0} k/s
${color5}Total : ${color6} ${totaldown enp4s0}${goto 200}${color3}Total :${color6} ${totalup enp4s0}
${color4}${downspeedgraph enp4s0 20,181 00ff00 ff0004 -t} ${color1}${upspeedgraph enp4s0 20,181 00ff00 ff0004 -t}${endif}
${if_existing /proc/net/route wlp3s0}/
${color1}${membar 0,155} ${color3}RESEAU WIFI ${color1}${membar 0,142}
${color5}Reception :${color6} ${downspeedf wlp3s0} k/s${goto 200}${color3}Envoi : ${color6}${upspeedf wlp3s0} k/s
${color5}Total : ${color6} ${totaldown wlp3s0}${goto 200}${color3}Total :${color6} ${totalup wlp3s0}
${color4}${downspeedgraph wlp3s0 20,181 00ff00 ff0004 -t} ${color1}${upspeedgraph wlp3s0 20,181 00ff00 ff0004 -t}${endif}
${color1}${membar 0,130} ${color3}SYSTEME DE FICHIERS ${color1}${membar 0,120}
${color2}Système ${color3} ${fs_used /} / ${fs_size /} : ${goto 160}${color1}${fs_bar 6,208 /}
${color2}Home ${color3} ${fs_used /home} / ${fs_size /home} : ${goto 160}${color1}${fs_bar 6,208 /home}
${color1}${membar 0,170} ${color3}TOP ${color1}${membar 0,170}
${color2}${alignc}Processus : ${color3}$processes ${color3}En cours : ${color6}$running_processes
${color5}En cours : ${alignc} PID ${goto 180}CPU% MEM%
${color6} ${top name 1} ${alignc} ${top pid 1} ${goto 180}${top cpu 1} ${top mem 1}
${color3} ${top name 2} ${alignc} ${top pid 2} ${goto 180}${top cpu 2} ${top mem 2}
${color3} ${top name 3} ${alignc} ${top pid 3} ${goto 180}${top cpu 3} ${top mem 3}
${color5}En mémoire :
${color6} ${top_mem name 1} ${alignc} ${top_mem pid 1} ${goto 180}${top_mem cpu 1} ${top_mem mem 1}
${color3} ${top_mem name 2} ${alignc} ${top_mem pid 2} ${goto 180}${top_mem cpu 2} ${top_mem mem 2}
${color3} ${top_mem name 3} ${alignc} ${top_mem pid 3} ${goto 180}${top_mem cpu 3} ${top_mem mem 3}
]]
Ce conky utilise deux scripts qui permettent de faire varier la couleur des valeurs de température du cpu et du cpu
colorizeCPU.sh
#!/bin/bash
# colorize.sh
# by Crinos512
# Usage:
# ${execpi 6 sensors | grep 'Core 0' | paste -s | cut -c15-18 | xargs ~/.conky/conkyparts/colorize.sh} ... $color
# or
# ${execpi 6 sensors | grep 'Core 0' | paste -s |sed 's/°/\n/'| head -n1 | cut -c15- | xargs ~/.conky/conkyparts/colorize.sh} ... $color
#
# Note: Assign color7, color8, and color9 to COOL, WARM, and HOT respectively
# your .conkyrc
COOL=65
WARM=80
if [[ $1 -lt $COOL ]]
then echo "\${color7}"$1 # COOL
elif [[ $1 -gt $WARM ]]
then echo "\${color9}"$1 # HOT
else echo "\${color8}"$1 # WARM
fi
exit 0
colorizeGpu.sh
#!/bin/bash
# colorize.sh
# by Crinos512
# Usage:
# ${execpi 6 sensors | grep 'Core 0' | paste -s | cut -c15-18 | xargs ~/.conky/conkyparts/colorize.sh} ... $color
# or
# ${execpi 6 sensors | grep 'Core 0' | paste -s |sed 's/°/\n/'| head -n1 | cut -c15- | xargs ~/.conky/conkyparts/colorize.sh} ... $color
#
# Note: Assign color7, color8, and color9 to COOL, WARM, and HOT respectively
# your .conkyrc
COOL=55
WARM=80
if [[ $1 -lt $COOL ]]
then echo "\${color7}"$1 # COOL
elif [[ $1 -gt $WARM ]]
then echo "\${color9}"$1 # HOT
else echo "\${color8}"$1 # WARM
fi
exit 0