dimanche 31 mai 2015

Conky

Le fond d'écran de Debian Jessie est très beau. Mais malgré celà, une petite touche de "je-ne-sais-quoi" ne serait pas de trop. C'est pour cela que j'ai installé le paquet Conky.



Pour ce faire,

$ sudo apt-get install conky lm-sensors hddtemp

Créez ensuite un fichier caché ".conkyrc", à placer dans le dossier home de l'utilisateur. Ci-dessous mon fichier ~/.conkyrc.

## Conky sample configuration
#

## Create own window instead of using desktop (required in nautilus)
## Own window type:
#own_window_type override
#own_window_type desktop
##'own_window_type normal' if you want a nice shadow to appear around conky
## 'own_window_hints below' Set conky on the bottom of all other applications
## If 'own_window_transparent no', you can set the background colour with:
#own_window_colour hotpink
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

## Text
## 'uppercase yes' all text will be in uppercase
alignment top_right
font Sans:size=8
uppercase no

## Fiddle with window
use_spacer none
use_xft 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-*-*-*-*-*-*-*

## Text alpha when using Xft
## xftfont use example:
#xftfont Bitstream Vera Sans Mono:size=8
#xftfont HandelGotD:size=8
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048

## Minimum size of text area
minimum_size 210 5
maximum_width 211

## Update interval in seconds
update_interval 5.0

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

## Buffers
## Use double buffering (reduces flicker, may not work for everyone)
## 'no_buffers yes' Subtract file system buffers from used memory
double_buffer yes
no_buffers yes

## Draw
## 'draw_outline yes' amplifies text
## 'alignment bottom_right' align the box
# 'draw_borders yes' Draw borders around text
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

## Border
## Stippled borders? Default value seems to be 0
#stippled_borders 3
## Border margins
#border_margin 5
## Border width
#border_width 1

## Default colors and also border colors, 'grey90 == #E5E5E5'
default_color A4A4A4
default_shade_color black
default_outline_color grey

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

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

## Force UTF8?
## Note that UTF8 support required XFT
override_utf8_locale no

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

## Allow for the creation of at least this number of port monitors (if 0 or not set, default is 16)
# min_port_monitors 16

## Allow each port monitor to track at least this many connections (if 0 or not set, default is 256)
# min_port_monitor_connections 256

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


## Stuff after 'TEXT' will be formatted on screen

TEXT
${font Bitstream Charter:bold:size=11}${color #AEB404}Date: ${color }${alignr}${time %B %e, %G}
${color #AEB404}Time: ${color }${alignr}${time %I:%M:%S %P}
${color #AEB404}Weekday: ${color }${alignr}${time %A}
${color #AEB404}Up Time: ${color }${alignr}$uptime
   
${color #AEB404}Processes: ${color }$processes ${alignr}${color #AEB404}Running: ${color }$running_processes

${font Sans:bold:size=8}${color #AEB404}CPU$font$color  ${hr 1}
   $alignc ${color #AEB404}Intel Core i5$color
   ${freq_g 1}GHz ${cpu cpu1}% ${cpubar cpu1}
   ${freq_g 2}GHz ${cpu cpu2}% ${cpubar cpu2}
   ${color #AEB404}Load: $color $loadavg
   ${color #AEB404}Top Processes$alignr -PID-  CPU%  MEM%$color
   ${top name 1}$alignr${top pid 1}${top cpu 1}   ${top mem 1}
   ${top name 2}$alignr${top pid 2}${top cpu 2}   ${top mem 2}
   ${top name 3}$alignr${top pid 3}${top cpu 3}   ${top mem 3}
   ${top name 4}$alignr${top pid 4}${top cpu 4}   ${top mem 4}
   ${top name 5}$alignr${top pid 5}${top cpu 5}   ${top mem 5}

${font Sans:bold:size=8}${color #AEB404}RAM$font  $color${hr 1}
   ${color #AEB404}RAM$color $alignc $mem / $memmax $alignr$memperc%
   $membar

${font Sans:bold:size=8}${color #AEB404}HDD$font  $color${hr 1}
   ${color #AEB404}ROOT $color $alignc ${fs_used /} / ${fs_size /} $alignr${fs_used_perc /}%
   ${fs_bar /}
   ${color #AEB404}HOME $color $alignc ${fs_used /home} / ${fs_size /home} $alignr${fs_used_perc /home}%
   ${fs_bar /home}
   ${color #AEB404}SWAP $color $alignc ${swap} / ${swapmax} $alignr${swapperc}%
   ${swapbar}
  ${color #AEB404}HD I/O $color  ${diskiograph 19}

${font Sans:bold:size=8}${color #AEB404}Network$font  $color${hr 1}
   ${color #AEB404}IP: $color${addr wlan0}$alignr
   ${color #AEB404}Down: ${color #A4A4A4}${downspeed wlan0}k/s ${alignr}${color #AEB404}Up: ${color #A4A4A4}${upspeed wlan0}k/s
   ${downspeedgraph wlan0 25,100} ${alignr}${upspeedgraph wlan0 25,100}
   ${color #AEB404}Total: ${color #A4A4A4}${totaldown wlan0} ${alignr}${color #AEB404}Total:  ${color #A4A4A4}${totalup wlan0}
   ${color #AEB404}Inbound: ${color #A4A4A4}${tcp_portmon 1 32767 count}$alignr${color #AEB404}Outbound: ${color #A4A4A4}${tcp_portmon 32768 61000 count}

   ${color #AEB404}IP: $color${addr eth0}$alignr
   ${color #AEB404}Down: ${color #A4A4A4}${downspeed eth0}k/s ${alignr}${color #AEB404}Up: ${color #A4A4A4}${upspeed wlan0}k/s
   ${downspeedgraph eth0 25,100} ${alignr}${upspeedgraph eth0 25,100}
   ${color #AEB404}Total: ${color #A4A4A4}${totaldown wlan0} ${alignr}${color #AEB404}Total:  ${color #A4A4A4}${totalup wlan0}
   ${color #AEB404}Inbound: ${color #A4A4A4}${tcp_portmon 1 32767 count}$alignr${color #AEB404}Outbound: ${color #A4A4A4}${tcp_portmon 32768 61000 count}

Maintenant que vous avez ce qu'il faut pour l'améliorer, n'hésitez surtout pas à partager vos oeuvres ;).

Pour le lancer automatiquement à chaque démarrage, il faut ajouter la commande ci-dessous dans "Menu > Preferences > Startup Applications" si vous utilisez Cinnamon. Avec les autres environnement de bureau, çà devrait être plus ou moins pareil.



Les liens qui m'ont donnés les inspirations:

 

HOW TO: A Beginners Guide to Setting up Conky
Setting Up Conky
15+ Beautiful Conky Configs for Linux Desktops


Aucun commentaire:

Enregistrer un commentaire