Empecemos por el resultado:
Como se puede ver uso cinco instancias diferentes, cada una con un archivo de configuración diferente, por lo que para arrancarlas uso un script que es el que se ejecuta al inicio:
conky.sh
#!/bin/bash
sleep 5 && /home/jjgomera/configuracion/conkysistema &
sleep 5 && /home/jjgomera/configuracion/conkygmail &
sleep 5 && /home/jjgomera/configuracion/conkycalendar &
sleep 5 && /home/jjgomera/configuracion/conkybarra &
sleep 5 && /home/jjgomera/configuracion/conkyrtorrent &
Los sleep para que le den tiempo a que cargue el escritorio.
Conkysistema
#!/usr/bin/conky -c
# maintain spacing between certain elements
use_spacer right
# set to yes if you want tormo to be forked in the background
background no
use_xft yes
# Xft font when Xft is enabled
#xftfont Vera-8
#xftfont Andale Mono-8
#xftfont Clean-8
#xftfont cubicfive10:pixelsize=8
xftfont Sans-Serif:size=9:pixelsize=11
#xftfont swf!t_v02:pixelsize=11
# Text alpha when using Xft
xftalpha 1
#mail_spool $MAIL
# Update interval in seconds
update_interval 2.0
# Create own window instead of using desktop (required in nautilus) normal desktop or override
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_title conkysistema
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 1280 240
maximum_width 240
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no # amplifies text
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 3
# border margins
border_margin 5
# border widt5
border_width 6
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color DarkGrey
color1 888888 # Texto indicativo
color2 ff0000 # Rojo CPU
color3 ffd700 # Amarillo indicativos
# 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
gap_x 0
gap_y 10
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
#${if_running mpd}${voffset 10}${font Musicelements:regular:size=21}${color #5da5d3}s${voffset -7}${font Anklepants:regular:size=11}${color #5da5d3} MPD$font$color $alignc$mpd_status ${alignr}R:$mpd_repeat A:$mpd_random
#${voffset -7}${color3}${hr 1}$color
#$alignc${color #CC6600}${mpd_artist}
#$alignc${mpd_title}
#${mpd_elapsed}/${mpd_length} ${mpd_bar 5}
#${mpd_album} $alignr Vol: ${mpd_vol}%
#${voffset -5}${color3}${hr 1}$color$else${voffset -10}$endif
TEXT
${alignc}${font OpenLogos:size=17}t U ${color #D70651}J${font}${color}
$color1${font Bitstream Charter:bold:size=9}${execi 99999 lsb_release -d -s -c | tr -s "n" " "} $alignr$kernel $machine
${execi 9999 whoami}@$nodename${color3}${alignr}Sesion: ${color}$uptime
${voffset 17}${image /home/jjgomera/configuracion/tower.png -p 0,60}${offset 30}${font Anklepants:regular:size=11}${color #5da5d3}CPU ${alignr}${font Sans:bold:size=7}${color3}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'}$font$color
${voffset -10}${color3}${hr 1}$font$color
${color1}${cpugraph cpu0 70,230 000000 ff0000}
${color #ffffff}${voffset -70}${cpu cpu}%
${color1}${font Charter:regular:size=7}${voffset -20}$font
${voffset 8}${color #dddddd}${top name 1}${alignr 100}${top cpu 1}
${color #bbbbbb}${top name 2}${alignr 100}${top cpu 2}
${color #999999}${top name 3}${alignr 100}${top cpu 3}
${voffset 10}${color}${cpu cpu1}% ${color2}${cpubar cpu1 3,80} $alignr${color}${cpu cpu2}% ${color2}${cpubar cpu2 3,80}
${voffset 3}${color1}Carga: $color $loadavg ${color1}${alignr}Procesos: $color $running_processes/$processes
${color1}Temp: ${color2}${platform it87.656 temp 1} ${platform it87.656 temp 2} ${color}${platform it87.656 temp 3} ${color1} ${alignr}HDTemp: ${color}${hddtemp /dev/sdb}ºC
${color1}Ventilador: ${color}${platform it87.656 fan 1} RPM$alignr${color1}Voltaje: ${color}${execi 20 sensors |grep "Vbat" | cut -d"+" -f2}
${color1}Intensidades: $alignr${color}${platform it87.656 in 0} ${platform it87.656 in 1} ${platform it87.656 in 2} ${platform it87.656 in 3} ${platform it87.656 in 4} A
${alignr}${platform it87.656 in 5} ${platform it87.656 in 6} ${platform it87.656 in 7} ${platform it87.656 in 8} A
${voffset 5}${image /home/jjgomera/configuracion/ram.png -p 0,263}${offset 28}${font Anklepants:regular:size=11}${color #5da5d3}Memoria RAM
${voffset -10}${color3}${hr 1}$font$color
${color1}${memgraph 65,230 000000 10DFED}
${color #ffffff}${voffset -73}$mem/${color1}$memmax
${voffset 8}${color #dddddd}${top_mem name 1}${alignr 100}${top_mem mem 1}
${color #bbbbbb}${top_mem name 2}${alignr 100}${top_mem mem 2}
${color #999999}${top_mem name 3}${alignr 100}${top_mem mem 3}
${voffset 10}${color #10DFED}SWAP: $color$swap ${alignr -15}${swapbar 11,100}${offset -55}${color}$swapperc%
${voffset 15}${image /home/jjgomera/configuracion/harddisk.png -p 0,403}${offset 30}${font Anklepants:regular:size=11}${color #5da5d3}Disco duro
${voffset -10}${color3}${hr 1}$font$color
$color1${diskiograph 8 ff00ff ff00ff}
${voffset -25}${color3} Lectura: $color$diskio_read$alignr${color3}Escritura: $color$diskio_write
${voffset 15}${color gold}Root: ${alignr}${fs_type}.fsck:$color2${execi 1000 tail /var/log/fsck/checkroot |grep "clean" | cut -d" " -f9}
${color}${fs_free /}${color1}/${fs_size /} ${color #555555}${fs_bar 9 /}${offset -60}$color${fs_used_perc /}%
${voffset 5}${color gold}Home: ${alignr}${fs_type}.fsck:$color2${execi 1000 tail /var/log/fsck/checkfs |grep "/dev/sdb3: clean" | cut -d" " -f9}
${color}${fs_free /home}${color1}/${fs_size /home} ${color #555555}${fs_bar 9 /home}${offset -60}$color${fs_used_perc /home}%
${if_mounted /media/datos}${voffset 5}${color gold}Datos: ${alignr}${fs_type}.fsck:$color2${execi 1000 tail /var/log/fsck/checkfs |grep "/dev/sdb6: clean" | cut -d" " -f9}
${color}${fs_free /media/datos}${color1}/${fs_size /media/datos} ${color #555555}${fs_bar 9 /media/datos}${offset -60}$color${fs_used_perc /media/datos}%$endif
${if_mounted /media/probando}${voffset 5}${color gold}Probando: ${alignr}${fs_type}.fsck:$color2${execi 1000 tail /var/log/fsck/checkfs |grep "/dev/sda2: clean" | cut -d" " -f9}
${color}${fs_free /media/probando}${color1}/${fs_size /media/probando} ${color #555555}${fs_bar 9 /media/probando}${offset -60}$color${fs_used_perc /media/probando}%$endif
${voffset 15}${image /home/jjgomera/configuracion/net.gif -p 0,609}${offset 20}${font Anklepants:regular:size=11}${color #5da5d3} Red${font}$alignr${color #0077ff}IP: $color${execi 10000 curl -s 'http://www.whatismyip.com/automation/n09230945.asp'}
${voffset -10}${color3}${hr 1}$font$color
${color 0000ff}Descarga: ${color white}${downspeed eth0}${color1}${alignr}${color white}${totaldown eth0}
${color 00ff00}Subida: ${color white}${upspeed eth0}${color1}${alignr}${color white}${totalup eth0}
${color1}${upspeedgraph eth0 25,230 000000 00ff00 60}
${voffset -39}${color1}${downspeedgraph eth0 25,230 000000 0000ff 700}
${color 0000ff}fb: ${execi 150 tail -n1 facebook.log | cut -d":" -f4}
${if_running amule}${image /home/jjgomera/configuracion/amule.png -p 0,720}
${offset 35}${font Anklepants:regular:size=11}${color #5da5d3} aMule$font ${color gold}${font Arrows:size=10}N$font${execi 60 cat /home/jjgomera/.aMule/logfile |grep -c "Descarga terminada:"}$alignr${color1}Sesion: ${color}${execi 5 ~/configuracion/amule.sh horas}h ${execi 5 ~/configuracion/amule.sh minutos}m ${execi 5 ~/configuracion/amule.sh segundos}s
${voffset -7}${color3}${hr 1}$color
${color1}Conectado a ${color}${execi 50 head -n2 ~/.aMule/amulesig.dat |tail -n1}
${color1}ED2K ${color}${execi 5 ~/configuracion/amule.sh ed2k}${alignr}${color1}KAD ${color}${execi 5 ~/configuracion/amule.sh kad}
${color1}Compartidos: ${color}${execi 50 head -n10 ~/.aMule/amulesig.dat |tail -n1}$alignr${color1}En cola: ${color}${execi 50 head -n9 ~/.aMule/amulesig.dat |tail -n1}
${color1}Subida: ${color}${execi 5 head -n8 ~/.aMule/amulesig.dat |tail -n1}${alignr}${color1}${color}${execi 5 ~/configuracion/amule.sh subidosesion} ${execi 5 ~/configuracion/amule.sh unidadsubidosesion} ${color1}(${execi 5 ~/configuracion/amule.sh subidototal} ${execi 5 ~/configuracion/amule.sh unidadsubidototal})
${color1}Descarga: ${color}${execi 5 head -n7 ~/.aMule/amulesig.dat |tail -n1}${alignr}${color1}${color}${execi 5 ~/configuracion/amule.sh descargadosesion} ${execi 5 ~/configuracion/amule.sh unidaddescargadosesion} ${color1}(${execi 5 ~/configuracion/amule.sh descargadototal} ${execi 5 ~/configuracion/amule.sh unidaddescargadototal})
${execbar ~/configuracion/amule.sh porcentaje}
${color #3A9191}${execi 60 cat ~/.aMule/logfile | grep "Descarga terminada:"| cut -d":" -f5- | tail -n1}
${voffset -5}${color3}${hr 1}$endif
${if_existing /home/jjgomera/.config/gmusicbrowser/gmusicbrowser.fifo}${image /home/jjgomera/configuracion/gmusicbrowser.png -p 0,860}
${voffset -3}${offset 35}${font Anklepants:regular:size=11}${color #5da5d3} gmusicbrowser$font$color$alignr${color1}Last: ${color}${execi 3600 sh ~/configuracion/last.fm uno}${execi 3600 sh ~/configuracion/last.fm dos}${execi 600 sh ~/configuracion/last.fm tres}${execi 600 sh ~/configuracion/last.fm cuatro}${execi 600 sh ~/configuracion/last.fm cinco}
${voffset -7}${color3}${hr 1}$color${image /tmp/gmusiccover -p 10,895 -s 80x80 -f 10}
${offset 100}${voffset 5}$alignc${color #CC6600}${execi 10 dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.CurrentSong |grep -A1 '"artist"'|tail -n1|cut -d'"' -f2}
${offset 100}${execi 10 dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.CurrentSong |grep -A1 'title'|tail -n1|cut -d'"' -f2}
${offset 100}${execi 2 ~/configuracion/gmusicbrowser.sh minutosestado}:${execi 2 ~/configuracion/gmusicbrowser.sh segundosestado}/${execi 10 ~/configuracion/gmusicbrowser.sh minutostotales}:${execi 10 ~/configuracion/gmusicbrowser.sh segundostotales}
${offset 100}${execibar 2 ~/configuracion/gmusicbrowser.sh progreso}
${offset 100}${color #CC6600}${execi 10 dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.CurrentSong |grep -A1 '"album"'|tail -n1|cut -d'"' -f2}
${color3}${hr 1}$color$else${voffset -10}$endif${voffset -90}
conkycalendar
#!/usr/bin/conky -c
# set to yes if you want Conky to be forked in the background
background no
# 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
# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=10
#xftfont Terminus:size=8
#xftfont Sans-Serif:size=9:pixelsize=11
# Text alpha when using Xft
xftalpha 0.5
# Print everything to console?
# out_to_console no
# 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 (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_title conkycalendar
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 10 5
maximum_width 1000
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
draw_graph_borders yes
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color ffd700
default_shade_color black
default_outline_color 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 5
gap_y 0
# 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 2
# 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
#Note: doesn't work in conky 1.2 =(
text_buffer_size 256
TEXT
${color white}${font LCDMono:size=30}${time %H:%M}$font${voffset -10}${font LCDMono:size=16}${time :%S}$font
${voffset 7}${color gold}${execi 60 ~/configuracion/calendario.sh mes}
${color dddddd}${execi 60 ~/configuracion/calendario.sh semana}
${color 888888}${execi 60 ~/configuracion/calendario.sh pasado}${color red}${execi 60 ~/configuracion/calendario.sh hoy}${color 888888}${execi 60 ~/configuracion/calendario.sh futuro}
conkyrtorrent
#!/usr/bin/conky -c
# set to yes if you want Conky to be forked in the background
background no
# 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
# Xft font when Xft is enabled
#xftfont Bitstream Vera Sans Mono:size=8
#xftfont Terminus:size=8
xftfont Sans-Serif:size=9:pixelsize=11
# Text alpha when using Xft
xftalpha 0.8
# Print everything to console?
# out_to_console no
# mail spool
mail_spool $MAIL
# Update interval in seconds
update_interval 10.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 (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_title conkyrtorrent
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 250 5
maximum_width 250
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
draw_graph_borders yes
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color ffd700
default_shade_color black
default_outline_color 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 5
gap_y 220
# 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 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no
text_buffer_size 2550
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
#Note: doesn't work in conky 1.2 =(
TEXT
${image /home/jjgomera/configuracion/rtorrent.gif}${offset 25}${voffset 5}${font Anklepants:regular:size=11}${color #5da5d3} rTorrent$font
${voffset -3}${color #ffd700}${hr 1}
${if_running rtorrent}${voffset 5}${color #888888}What${goto 50}${font Arrows:size=10}N$font${execi 600 sh ~/configuracion/what.cd descargado } ${goto 120}${font Arrows:size=10}S$font${execi 600 sh ~/configuracion/what.cd subido }$alignr${color} ${execi 600 sh ~/configuracion/what.cd ratio }
${color #888888}Tik${goto 50}${font Arrows:size=10}N$font${execi 600 sh ~/configuracion/tik.net descargado } ${goto 120}${font Arrows:size=10}S$font${execi 600 sh ~/configuracion/tik.net subido }$alignr${color} ${execi 600 sh ~/configuracion/tik.net ratio }
${voffset -5}${color #888888}${stippled_hr 2}$color
${voffset 3}${color #888888}${execpi 10 ~/configuracion/rtorrent.sh ~/.rtorrent/rtorrent_rpc/xmlrpc2scgi.py ~/.rtorrent/rtorrent_rpc/rpc.socket}
${voffset -15}${color #ffd700}${hr 1}$else${color red}${font bold}Rtorrent no iniciado
${color #888888}${font}Borra ~/.rtorrent/rtorrent_rpc/rpc.socket$endif
conkygmail
#!/usr/bin/conky -c
# Update interval in seconds
update_interval 5.0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_title conkygmail
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 250 5
maximum_width 500
draw_shades no
draw_outline no # amplifies text if yes
draw_borders no
draw_graph_borders no
use_xft yes
xftalpha 0.9
#xftfont Terminus:size=8
#xftfont Dejavu-Sans:size=8
xftfont Sans-Serif:size=9:pixelsize=11
uppercase no
override_utf8_locale yes
use_spacer none
# text_buffer_size 512
stippled_borders 3
border_margin 9
border_width 10
# Gap between borders of screen and text
gap_x 0
gap_y 30
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
color1 blue
# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right
text_buffer_size 512
# stuff after 'TEXT' will be formatted on screen
TEXT
${image /home/jjgomera/configuracion/mail.gif}${voffset 8}${offset 30}${font Anklepants:regular:size=11}${color 4444ff}G${color ff2222}m${color yellow}a${color 4444ff}i${color 22ff22}l$font
${voffset -7}${color #ffd700}${hr 1}$color
${color gold}xxxxxxxx: ${color}${execi 600 perl ~/configuracion/gmail_xxxxxxx.pl n} ${color aaaaaa}mensaje(s) sin leer.
${color aaaaaa}${execi 600 perl ~/configuracion/gmail_jjgomera.pl e}
${voffset 5}${color gold}yyyyyyy: ${color}${execi 600 perl ~/configuracion/gmail_yyyyyyy.pl n} ${color aaaaaa}mensaje(s) sin leer.
${color aaaaaa}${execi 600 perl ~/configuracion/gmail_volante52.pl e}
${voffset -7}${color #ffd700}${hr 1}$color
conkybarra
#!/usr/bin/conky -c
# Use Xft?
use_xft yes
#xftfont AvantGarde LT Medium-7
xftfont Dejavu Sans Mono:size=7
#xftfont Sans-Serif:size=9:pixelsize=11
# Update interval in seconds
update_interval 2
# 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 desktop
own_window_hints undecorate,above,sticky,skip_taskbar,skip_pager
own_window_title conkybarra
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 500 10
maximum_width 1000
# 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 5
# border width
border_width 1
# Default colors and also border colors
default_color 606060
#default_shade_color white
#default_outline_color black
own_window_colour 181818
color1 aaaaaa #etiquetas
color2 eeeeee #datos
# 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 0
gap_y 0
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
short_units yes
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 1
# 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
#${voffset 1}${font Dejavu Sans:size=8}${color2}${acpitemp}ºC$font${color}${voffset -1}${tab}${tab}
#${color green}${execi 120 ~/configuracion/quieroserfallera badoo}
TEXT
${font Dejavu Sans:size=10}${font Dejavu Sans:size=8} ${color2}${acpitemp}ºC$font${color}${voffset -1}${tab}${tab}cpu: ${cpugraph 11,50 404040 404040} ${goto 110}$color2${cpu}${goto 150}${color}ram: ${memgraph 11,50 404040 404040} ${goto 200}$color2${memperc}${color}${tab}${tab}${tab}${tab}io: ${diskiograph 11,50 404040 404040}${tab}${tab}${tab}${tab}${color}${font Arrows:size=8}N$font $color2${downspeed eth0}${color} ${downspeedgraph eth0 11,60 404040 404040 700}${tab}${tab}${color}${font Arrows:size=8}S$font $color2${upspeed eth0}${color} ${upspeedgraph eth0 11,60 404040 404040 70} $color2${font Dejavu Sans:size=8}${time %H:%M}
Scripts externos utilizados en estas configuraciones:
IP:
${execi 10000 curl -s 'http://www.whatismyip.com/automation/n09230945.asp'}
Contactos de facebook:
${execi 150 tail -n1 facebook.log | cut -d":" -f4}
Haciendo uso de fbcmd
Amule
Cuando amule se está ejecutando, se mostrara esta parte del conky en pantalla, para ello es necesario activar en las opciones del amule la firma online, para poder a continuación parsear la info disponible, yo uso este script
amule.sh
#!/bin/bash
# amule info display script by jjgomera <[email protected]>
#
# requirements: amule with "Online Signature" on (!)
case "$1" in
ed2k)
stat=`head -n5 ~/.aMule/amulesig.dat |tail -n1`
if (( $stat == H )); then
expr "HighID"
else
if (( $stat == L )); then
expr "LowID"
else expr "No Conectado"
fi
fi
;;
prueba)
stat=H
if (( $stat == H )); then
expr "HighID"
else
if (($stat == L )); then
expr "LowID"
else
expr "off"
fi
fi
;;
kad)
stat=`head -n6 ~/.aMule/amulesig.dat |tail -n1`
if (( $stat == 2 )); then
expr "OK"
else
if (($stat == 1 )); then
expr "Firewalled"
else
expr "off"
fi
fi
;;
horas)
tiempo=`head -n17 ~/.aMule/amulesig.dat |tail -n1`
expr $tiempo / 3600
;;
minutos)
tiempo=`head -n17 ~/.aMule/amulesig.dat |tail -n1`
horas=`~/configuracion/amule.sh horas`
expr $tiempo / 60 - $horas * 60
;;
segundos)
tiempo=`head -n17 ~/.aMule/amulesig.dat |tail -n1`
horas=`~/configuracion/amule.sh horas`
minutos=`~/configuracion/amule.sh minutos`
expr $tiempo - $minutos * 60 - $horas * 3600
;;
descargadosesion)
dato=`head -n15 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr $dato
else
if (( $dato <= 1048576 )); then
dc -e "1k $dato 1024 /p"
else
if (( $dato <= 1073741824 )); then
dc -e "1k $dato 1048576 /p"
else dc -e "2k $dato 1073741824 /p"
fi
fi
fi
;;
unidaddescargadosesion)
dato=`head -n15 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr "bytes"
else
if (( $dato <= 1048576 )); then
expr "KB"
else
if (( $dato <= 1073741824 )); then
expr "MB"
else expr "GB"
fi
fi
fi
;;
subidosesion)
dato=`head -n16 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr $dato
else
if (( $dato <= 1048576 )); then
dc -e "1k $dato 1024 /p"
else
if (( $dato <= 1073741824 )); then
dc -e "1k $dato 1048576 /p"
else dc -e "1k $dato 1073741824 /p"
fi
fi
fi
;;
unidadsubidosesion)
dato=`head -n16 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr "bytes"
else
if (( $dato <= 1048576 )); then
expr "KB"
else
if (( $dato <= 1073741824 )); then
expr "MB"
else expr "GB"
fi
fi
fi
;;
descargadototal)
dato=`head -n12 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr $dato
else
if (( $dato <= 1048576 )); then
dc -e "1k $dato 1024 /p"
else
if (( $dato <= 1073741824 )); then
dc -e "1k $dato 1048576 /p"
else
if (( $dato <= 1099511627776 )); then
dc -e "2k $dato 1073741824 /p"
else dc -e "3k $dato 1099511627776 /p"
fi
fi
fi
fi
;;
unidaddescargadototal)
dato=`head -n12 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr "bytes"
else
if (( $dato <= 1048576 )); then
expr "KB"
else
if (( $dato <= 1073741824 )); then
expr "MB"
else
if (( $dato <= 1099511627776 )); then
expr "GB"
else expr "TB"
fi
fi
fi
fi
;;
subidototal)
dato=`head -n13 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr $dato
else
if (( $dato <= 1048576 )); then
dc -e "2k $dato 1024 /p"
else
if (( $dato <= 1073741824 )); then
dc -e "2k $dato 1048576 /p"
else
if (( $dato <= 1099511627776 )); then
dc -e "2k $dato 1073741824 /p"
else dc -e "2k $dato 1099511627776 /p"
fi
fi
fi
fi
;;
unidadsubidototal)
dato=`head -n13 ~/.aMule/amulesig.dat |tail -n1`
if (( $dato <= 1024 )); then
expr "bytes"
else
if (( $dato <= 1048576 )); then
expr "KB"
else
if (( $dato <= 1073741824 )); then
expr "MB"
else
if (( $dato <= 1099511627776 )); then
expr "GB"
else expr "TB"
fi
fi
fi
fi
;;
porcentaje)
descargado=`head -n7 ~/.aMule/amulesig.dat |tail -n1 | cut -d"," -f1`
echo $descargado / 5 | bc -l
;;
esac
gmusicbrowser
Gmusicbrowser es el reproductor de música que suelo usar, por tanto cuando se esté ejecutando aparecerá también info sobre la canción actual. Para ello uso este script:
gmusicbrowser.sh
#!/bin/bash
# gmusicbrowser info display script by jjgomera <[email protected]>
#
# requirements: gmusicbrowser with NowPlaying plugin on (!)
tiempo=`dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.CurrentSong | grep -A1 "length" |tail -n1 | cut -d'"' -f2`
tiemposegundos=`dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.CurrentSong | grep "length" -A 1 | tail -n1 | cut -d'"' -f2`
estado=`dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.GetPosition | grep "double" | cut -d" " -f5 | cut -d"." -f1`
case "$1" in
minutostotales)
expr $tiempo / 60
;;
segundostotales)
expr $tiempo % 60
;;
minutosestado)
expr $estado / 60
;;
segundosestado)
minutos=`~/configuracion/gmusicbrowser.sh minutosestado`
expr $estado % 60
;;
progreso)
expr $estado * 100 / $tiemposegundos
;;
esac
Y el resto de info la parseo directamente en el conkyrc, para que la carátula esté siempre actualizada activo en gmusicbrowser el complemento Reproduciendo para que ejecute el siguiente script cada vez que se cambia de canción.
caratula_gmusicbrowser.sh
#!/bin/bash
#
album=`dbus-send --print-reply --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.CurrentSong |grep -A1 "album_picture" |tail -n1 |cut -d'"' -f2`
rm /tmp/gmusiccover
cp "$album" /tmp/gmusiccover
Calendario
Para mostrar el calendario y poder tener formato diferente para cada parte de él uso este script
Calendario.sh
#! /bin/sh
DATE=`date | awk -F" " '{print $3}'`
case "$1" in
mes)
cal | head -n1
;;
semana)
gcal -i -s 1 | head -n3 | tail -n1 | tr 'visá' 'vi sa'
;;
pasado)
gcal -i -s 1 | grep -v '[a-zA-Z]' | grep '[0-9]' | tr "<" " " | tr ">" " "| awk -F$DATE ' BEGIN {i=0}
($1 == $0 && i==0) {print $1}($1 != $0 && i==0){i=i+1;print $1}';
;;
hoy)
echo $DATE;
;;
futuro)
gcal -i -s 1 | grep -v '[a-zA-Z]' | grep '[0-9]' | tr "<" " " | tr ">" " "| awk -F$DATE ' BEGIN {i=1}
(i==0) {print $0}($1 != $0 && i==1){i=i-1;print $2}';
;;
esac
Gracias suku por la recomendación de gcal
rtorrent
En una tty siempre suele estar ejecutándose rtorrent, para ver rápidamente el estado del programa (que sigue ejecutándose, y si baja o sube algo) sin tener que ir a la tty uso conky también para tener esa info en la terminal.
Lo primero que debemos comprobar es que rtorrent tiene soporte para xmlrpc, eso se puede comprobar si al iniciarse el programa aparece una línea tal que:
XMLRPC initializated with xxx functions
Necesitamos a su vez tener instalado el paquete xmlstarlet
aptitude install xmlstarlet
Necesitamos también este script, xmlrpc2scgi.py que debemos tener guardado en nuestro disco duro y con permisos de ejecución.
En el archivo de configuración de rtorrent (/home/usuario/.rtorrent.rc) debemos tener una linea con algo así:
scgi_local =~/.rtorrent/rtorrent_rpc/rpc.socket
La ruta del socket por supuesto es a gusto, cada uno puede poner donde quiera que se cree el socket.
Finalmente necesitamos un archivo que nos parsee la información que deseamos que se muestre así como su disposición, formato, color...
rtorrent.sh
#!/bin/sh
test -S "$2" &&
"$@" d.multicall default
d.get_name=
d.get_up_rate=
d.get_down_rate=
d.get_bytes_done=
d.get_size_bytes=
d.get_peers_connected=
d.get_peers_not_connected=
d.get_peers_accounted=
d.get_ratio=
|
xmlstarlet sel -t -v / |
awk '/./ {
if (++i%9 == 1) name=$0
else if (i%9 == 2) up[name]=$0
else if (i%9 == 3) down[name]=$0
else if (i%9 == 4) done[name]=$0
else if (i%9 == 5) size[name]=$0
else if (i%9 == 6) active[name]=$0
else if (i%9 == 7) peers[name]=$0
else if (i%9 == 8) leech[name]=$0
else if (i%9 == 0) ratio[name]=$0
} END {
for(name in active) {
if(active[name]) {
up_sum += up[name]
down_sum += down[name]
#if(++j<=4)
{
printf("${color white}${font Liberation Sans:size=9:style=Bold}%s${font}${color}n", name)
printf("${color #888888} Progreso:${color} %d%%", 100 * done[name] / size[name])
printf("${alignr}${color #888888}Ratio:${color} %.3fn", ratio[name] / 1000)
printf("${color #888888} Subida:${color} %.1f kB/s", up[name] / 1024)
printf("${alignr}${color #888888}Descarga:${color} %.1f kB/sn", down[name] / 1024)
printf("${color #888888} Subiendo a %i ", leech[name])
printf("de %i pares", peers[name] + leech[name])
printf("${alignr}${color} %.3f MBn", size[name]/1024/1024)
printf("nb"
}
}
}
printf(" ${color gold}${font Arrows:size=10}S$font${color white} %.1f kB/s", up_sum / 1024)
printf("${alignr 30}${color gold}${font Arrows:size=10}N$font${color white} %.1f kB/sn", down_sum / 1024)
printf("${color #888888}${stippled_hr 2}${voffset 5}n"
}' |
xargs -d'b' -n1 printf '%s' |
sort -z |
xargs -0 -n1 printf '%s'
Este es el archivo que deberemos modificar para adecuarlo a nuestro gusto (Esta es la lista de información disponible: http://libtorrent.rakshasa.no/wiki/RTorrentCommands
Con todos estos pasos hechos ya podemos llamar desde conky para que se muestre información sobre el estado del rtorrent:
${execpi 10 ~/configuracion/rtorrent.sh ~/.rtorrent/rtorrent_rpc/xmlrpc2scgi.py ~/.rtorrent/rtorrent_rpc/rpc.socket}
Correo Gmail
Para tener también información sobre el número de correos sin leer así como su título (y así saber si es urgente o no responder.
Aunque hay métodos más avanzados, yo hago uso de este script en perl:
Advertencia: El contenido de este post no me pertenece yo no hice nada, pero me parecio interesante asi que lo posteo tal y cual........
Fuente: http://jjgomera.esdebian.org/43588/configuracion-conky