Vendredi 23 novembre 2018

Conky

Build Status

Conky is a free, light-weight system monitor for X, that displays any kind of information on your desktop.

Grab the latest release from GitHub.

Features

Conky can display more than 300 built-in objects, including support for:

  • A plethora of OS stats (uname, uptime, CPU usage, mem usage, disk usage, “top” like process stats, and network monitoring, just to name a few).
  • Built-in IMAP and POP3 support.
  • Built-in support for many popular music players (MPD, XMMS2, BMPx, Audacious).
  • Can be extended using built-in Lua support, or any of your own scripts and programs (more).
  • Built-in Imlib2 and Cairo bindings for arbitrary drawing with Lua (more).

… and much much more.

Conky can display information either as text, or using simple progress bars and graph widgets, with different fonts and colours.

Screenshots

screenshot screenshot screenshot

See the User Configs section of the wiki for more screenshots and their associated Conky config files.

Documentation

The GitHub Wiki serves as a central hub for all of Conky’s documentation. Quick links:

License

Conky is licensed under the terms of the GPLv3 and BSD licenses.

Contributing

To submit code changes, please open pull requests against the GitHub repository. Patches submitted in issues, email, or elsewhere will likely be ignored. Here’s some general guidelines when submitting PRs:

  • In your pull request, please:
    • Describe the changes, why they were necessary, etc
    • Describe how the changes affect existing behaviour
    • Describe how you tested and validated your changes
    • Include any relevant screenshots/evidence demonstrating that the changes work and have been tested
  • Any new source files should include a GPLv3 license header
  • Any contributed code must be GPLv3 licensed

conky - archlinux

Installation

sudo pacman -S conky

Version

conky --version
conky 1.10.8_pre compiled Mon Mar 12 19:26:00 UTC 2018 for Linux 4.15.8-1-ARCH x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

configuration

Exemple 1

Texte alternatif

Création configuration

nano $HOME/.conkyrc
-- vim: ts=4 sw=4 noet ai cindent syntax=lua


conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 0.5,
    cpu_avg_samples = 4,
    default_color = 'white',
    default_outline_color = 'grey',
    default_shade_color = 'black',
    draw_borders = true,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    fontb = 'DejaVu Sans Mono:bold:size=12',
    font = 'DejaVu Sans Mono:size=12',
    font10 = 'DejaVu Sans Mono:size=10',
    gap_x = 5,
    gap_y = 50,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    double_buffer = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_colour = '000000',
    own_window_class = 'Conky',
    own_window_argb_visual = true,
    own_window_argb_count = 0,
    own_window_type = 'dock',
    own_window_transparent = true,
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    stippled_borders = 0,
    update_interval = 1,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
${image ~/.face -p 230,5 -s 70x70 -f 86400}${image ~/.pacman -p 10,9 -s 60x60 -f 86400}
${font DejaVu Sans:bold:size=14}${alignc}${color 00ffae}$nodename
${font Impact:bold:size=10}${alignc}    ${exec hostnamectl | grep System | cut -c21-40}
${alignc}   ${exec hostnamectl | grep Architecture | cut -c7-30}
${alignc}   ${exec hostnamectl | grep Kernel | cut -c13-32}
${font Impact:bold:size=12}${color 33E9FF}PERFORMANCE ${hr 2}${font DejaVu Sans Mono:size=11}
${offset 15}${color FFFDE2}System Uptime ${alignr}$color $uptime
${offset 15}${color FFFDE2}RAM :$color $mem/$memmax $memperc% ${color yellow}${membar 4}
${offset 15}${color FFFDE2}Swap:$color $swap/$swapmax $swapperc% ${color yellow}${swapbar 4}
${font DejaVu Sans Mono:size=8}${color FFFDE2}
${offset 15}Core 1   ${freq 1} MHz  ${color ff8300}${cpubar cpu1 6}${color FFFDE2}
${offset 15}Core 2   ${freq 2} MHz  ${color ff8300}${cpubar cpu2 6}${color FFFDE2}
${offset 15}Core 3   ${freq 3} MHz  ${color ff8300}${cpubar cpu3 6}${color FFFDE2}
${offset 15}Core 4   ${freq 4} MHz  ${color ff8300}${cpubar cpu4 6}${color FFFDE2}
${offset 15}${font DejaVu Sans Mono:size=11}${color FFFDE2}Procs:$color $processes  ${color FFFDE2}Run:$color $running_processes Temp: ${acpitemp}°C

${font Impact:bold:size=12}${color green}NETWORK ${hr 2}${font DejaVu Sans Mono:size=11}
${offset 15}${color}Ext IP Addr ${color red}${alignr}${exec curl ipinfo.io/ip}
${offset 15}${color}IPv4 Addr ${color red}${alignr}${addr enp8s0}
${offset 15}${color green}${font DejaVu Sans Mono:size=10}Download: $color${totaldown enp8s0} ${alignr}${color green}Upload: $color${totalup enp8s0}

${offset 5}${font Impact:bold:size=12}${color orange}${wireless_essid wlp10s0f0} ${stippled_hr 1}
${offset 15}${color}${font DejaVu Sans Mono:size=11}WiFi ${alignr}${wireless_link_qual_perc 
wlp10s0f0}%(${wireless_link_qual wlp10s0f0}/${wireless_link_qual_max wlp10s0f0}) ${color red}${addr wlp10s0f0}
${offset 15}${font DejaVu Sans Mono:size=10}${color green}Download: $color${totaldown wlp10s0f0} ${alignr}${color green}Upload: $color${totalup wlp10s0f0}

${font Impact:bold:size=12}${color red}PROCESSES ${hr 2}
${offset 15}${font DejaVu Sans Mono:size=10}${color EDE0FF}Name               ${alignr}PID   CPU%   MEM%
${offset 15}${color FF7878}${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
${offset 15}${color FF7878}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
${offset 15}${color FF7878}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
${offset 15}${color FF7878}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4}
${offset 15}${color FF7878}${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5}
${offset 15}${color FF7878}${top name 6} ${alignr}${top pid 6} ${top cpu 6} ${top mem 6}
#${color a042ff}${font}CONKY PIDs ${hr 2}
#${font DejaVu Sans Mono:size=10}${color ffb7ea}${exec pgrep -f conky}
${font Impact:bold:size=12}${color 00ffae}FORTUNE ${hr 2}$color
${offset 15}${font DejaVu Sans Mono:size=10}${execi 600 fortune -s | fold -w34}
]]

Exemple 2

Texte alternatif

Création configuration

nano $HOME/.conkyrc
-- vim: ts=4 sw=4 noet ai cindent syntax=lua


conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 0.5,
    cpu_avg_samples = 4,
    default_color = 'white',
    default_outline_color = 'grey',
    default_shade_color = 'black',
    draw_borders = true,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 5,
    gap_y = 50,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    double_buffer = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_colour = '000000',
    own_window_class = 'Conky',
    own_window_argb_visual = true,
    own_window_argb_count = 0,
    own_window_type = 'dock',
    own_window_transparent = true,
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    stippled_borders = 0,
    update_interval = 1,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
${font DejaVu Sans Mono:size=14}${alignc}${time %I:%M:%S}
${font Impact:size=12}${alignc}${time %A, %B %e, %Y}
${font Impact:bold:size=12}${color orange}CALENDAR ${hr 2}$color
${font DejaVu Sans Mono:size=12}${execpi 1800 DA=`date +%_d`; cal | sed s/"\(^\|[^0-9]\)$DA"'\b'/'\1${color orange}'"$DA"'$color'/}
${font Impact:bold:size=12}${color red}FILE SYSTEM ${hr 2}${font DejaVu Sans Mono:size=10}
${offset 4}${color}dev ${alignr}FREE     USED
${offset 4}root ${color yellow}${alignr}${fs_free /} ${fs_used /}
${offset 4}${color yellow}${fs_size /} ${color}${fs_bar 6 /}
${offset 4}${color FFFDE2}home ${color yellow}${alignr}${fs_free /home/} ${fs_used /home/}
${offset 4}${color yellow}${fs_size /home/} $color${fs_bar 6 /home/}
${offset 4}${color FFFDE2}sda5 ${color yellow}${alignr}${fs_free /run/media/senpai/6EC832DEC832A3ED/} ${fs_used /run/media/senpai/6EC832DEC832A3ED/}
${offset 4}${color yellow}${fs_size /run/media/senpai/6EC832DEC832A3ED/} $color${fs_bar 6 /run/media/senpai/6EC832DEC832A3ED/}
${offset 4}${color FFFDE2}sda6 ${color yellow}${alignr}${fs_free /run/media/senpai/C208F88708F87BAB/} ${fs_used /run/media/senpai/C208F88708F87BAB/}
${offset 4}${color yellow}${fs_size /run/media/senpai/C208F88708F87BAB/} $color${fs_bar 6 /run/media/senpai/C208F88708F87BAB/}

${font Impact:bold:size=12}${color green}CPU ${hr 2}
${offset 4}${color black}${cpugraph 000000 5000a0}
${offset 4}${font DejaVu Sans Mono:size=10}${color white}CPU: $cpu% ${color red}${cpubar 6}

${font Impact:bold:size=12}${color 00FFD0}Network ${hr 2}  
${color black}${downspeedgraph enp8s0 32,100 ff0000 0000ff} ${color black}${upspeedgraph enp8s0 32,100 0000ff ff0000}
$color${font DejaVu Sans Mono:size=10}${downspeed enp8s0}${alignc}${color green} IPv6${alignr}$color${upspeed enp8s0}
${color black}${downspeedgraph wlp10s0f0 32,100 ff0000 0000ff} ${color black}${upspeedgraph wlp10s0f0 32,100 0000ff ff0000}
$color${font DejaVu Sans Mono:size=10}${downspeed wlp10s0f0}${alignc}${color orange} ${wireless_essid wlp10s0f0}${alignr}$color${upspeed wlp10s0f0}
]]

Le fichier $HOME/.conkyrc sur PC1

-- vim: ts=4 sw=4 noet ai cindent syntax=lua


conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 0.5,
    cpu_avg_samples = 4,
    default_color = 'white',
    default_outline_color = 'grey',
    default_shade_color = 'black',
    draw_borders = true,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 5,
    gap_y = 50,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    double_buffer = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_colour = '000000',
    own_window_class = 'Conky',
    own_window_argb_visual = true,
    own_window_argb_count = 0,
    own_window_type = 'dock',
    own_window_transparent = true,
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    stippled_borders = 0,
    update_interval = 1,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
${font DejaVu Sans:bold:size=14}${alignc}${color 00ffae}$nodename
${font Impact:bold:size=10}${alignc}    ${exec hostnamectl | grep System | cut -c21-40}
${alignc}   ${exec hostnamectl | grep Architecture | cut -c7-30}
${alignc}   ${exec hostnamectl | grep Kernel | cut -c13-32}

${font Impact:bold:size=12}${color 33E9FF}PERFORMANCE ${hr 2}${font DejaVu Sans Mono:size=9}
${color FFFDE2}Uptime $color $uptime
${color FFFDE2}RAM :$color $mem/$memmax 
${color FFFDE2}$memperc% RAM Utilisée ${color yellow}${membar 4}
${font DejaVu Sans Mono:size=9}${color FFFDE2}
Core 1 ${freq 1} MHz ${color ff8300}${cpubar cpu1 6}${color FFFDE2}
Core 2 ${freq 2} MHz ${color ff8300}${cpubar cpu2 6}${color FFFDE2}
Core 3 ${freq 3} MHz ${color ff8300}${cpubar cpu3 6}${color FFFDE2}
Core 4 ${freq 4} MHz ${color ff8300}${cpubar cpu4 6}${color FFFDE2}
${font DejaVu Sans Mono:size=10}${color FFFDE2}Procs:$color $processes Temp: ${acpitemp}°C

${font Impact:bold:size=10}${color red}Vol. Logiques LVM${hr 2}${font DejaVu Sans 
Mono:size=8}
${offset 4}${color 33E9FF}/dev/mapper/ ${alignr}Disponible / Total${color FFFDE2}
${offset 4}ssd--vg-root ${color yellow}${alignr}${fs_free /}  /  ${fs_size /}
${offset 4}${color white}root ${color yellow}${fs_used /} ${color}${fs_bar 6 /}

${offset 4}${color FFFDE2}ssd--512-homea ${color yellow}${alignr}${fs_free /home/}  /  ${fs_size /home/}
${offset 4}${color white}home ${color yellow}${fs_used /home/} $color${fs_bar 6 /home/}

${offset 4}${color FFFDE2}ssd--512-virtuel ${color yellow}${alignr}${fs_free /srv/virtuel/}  /  ${fs_size /srv/virtuel/}
${offset 4}${color white}/srv/virtuel ${color yellow}${fs_used /srv/virtuel/} $color${fs_bar 6 /srv/virtuel/}

${offset 4}${color FFFDE2}vgsauve-lvsauve ${color yellow}${alignr}${fs_free /srv/savlocal/}  /  ${fs_size /srv/savlocal/}
${offset 4}${color white}/srv/savlocal ${color yellow}${fs_used /srv/savlocal/} $color${fs_bar 6 /srv/savlocal/}

${offset 4}${color FFFDE2}vg--nas--one-yanplus ${color yellow}${alignr}${fs_free /mnt/}  /  ${fs_size /mnt/}
${offset 4}${color white}/mnt ${color yellow}${fs_used /mnt/} $color${fs_bar 6 /mnt/}

${offset 4}${color FFFDE2}vg--nas--one-serie ${color yellow}${alignr}${fs_free /srv/serie/}  /  ${fs_size /srv/serie/}
${offset 4}${color white}/srv/serie ${color yellow}${fs_used /srv/serie/} $color${fs_bar 6 /srv/serie/}

${offset 4}${color FFFDE2}vg--nas--one-video ${color yellow}${alignr}${fs_free /srv/video/}  /  ${fs_size /srv/video/}
${offset 4}${color white}/srv/video ${color yellow}${fs_used /srv/video/} $color${fs_bar 6 /srv/video/}

${font Impact:bold:size=12}${color 00FFD0}Réseau ${hr 2}  
${color black}${downspeedgraph enp0s31f6 32,100 ff0000 0000ff} ${color black}${upspeedgraph enp0s31f6 32,100 0000ff ff0000}
$color${font DejaVu Sans Mono:size=10}${downspeed enp0s31f6}${alignc}${color green} IPv6${alignr}$color${upspeed enp0s31f6}

]]