Vimos como usar Conky en Gnome, ahora veremos como usarlo en KDE 4. El problema que presenta Conky en KDE 4 es que a priori las ventana no se transparenta, dando un look poco agradable.
Suponemos que tenemos ya instalado conky, si no es el caso, lo instalamos con:
$ sudo apt-get install conky
Ahora necesitamos un ejemplo de fichero .conkyrc que funcione en KDE (a partir de un ejemplo luego ya podemos ir creando los nuestros propios). Este te puede servir. Abre un editor de textos y pega las siguientes lineas, salvando el fichero como «.conkyrc» en tu directorio HOME.
## .conkyrc configuration ##Aligned position on screen, may be top_left, top_right, bottom_left, bottom_right, or none alignment top_right ##Boolean value, if true, Conky will be forked to background when started background yes ##Border margin in pixels border_margin 5 ##Border width in pixels border_width 5 ##Color variables for use inside TEXT segments ( source: http://htmlhelp.com/cgi-bin/color.cgi ) color0 F8F8FF # Ghost white color1 483D8B # Dark slate blue color2 B8860B # Dark goldenrod color3 4682B4 # Steelblue color4 8B0000 # Dark red color5 FFFFFF # White #color6 #color7 #color8 #color9 ##The number of samples to average for CPU monitoring cpu_avg_samples 2 ##Default color and border color default_color F8F8FF # Ghost white ##Default outline color default_outline_color 483D8B # Dark slate blue ##Default shading color and border's shading color default_shade_color 000000 # Black ##Use the Xdbe extension? (eliminates flicker) ##It is highly recommended to use own window with this one so double buffer won't be so big. double_buffer yes ##Draw borders around text? draw_borders no ##Draw borders around graphs? draw_graph_borders yes ##Draw outlines? draw_outline no ##Draw shades? draw_shades no ##Font name in X, xfontsel can be used to get a nice font #font ##Gap, in pixels, between right or left border of screen, same as passing -x at command line, e.g. gap_x 10 gap_x 12 ##Gap, in pixels, between top or bottom border of screen, same as passing -y at command line, e.g. gap_y 10. gap_y 72 ##Default global IMAP server. Arguments are: "host user pass [-i interval] [-f folder] [-p port] [-e command]". ##Default port is 143, default folder is 'INBOX', default interval is 5 minutes. ##If the password is supplied as '*', you will be prompted to enter the password when Conky starts. #imap ##Mail spool for mail checking #mail_spool $MAIL ##Allow each port monitor to track at most this many connections (if 0 or not set, default is 256) #max_port_monitor_connections ##Maximum number of special things, e.g. fonts, offsets, aligns, etc. (default is 512) max_specials 512 ##Maximum size of user text buffer, i.e. layout below TEXT line in config file (default is 16384 bytes) max_user_text 20000 ##Size of the standard text buffer (default is 1280 bytes). text_buffer_size 2000 ##Maximum width of window maximum_width 360 ##Minimum size of window minimum_size 800 ##Host of MPD server #mpd_host ##Port of MPD server #mpd_port ##MPD server password #mpd_password ##Music player thread update interval (defaults to Conky's update interval) #music_player_interval ##The number of samples to average for net data net_avg_samples 2 ##Substract (file system) buffers from used memory? no_buffers yes ##Force UTF8? requires XFT override_utf8_locale yes ##Boolean, create own window to draw? own_window yes ##Manually set the WM_CLASS name. Defaults to "Conky". own_window_class ##If own_window_transparent no, set a specified background colour (defaults to black). ##Takes either a hex value (#ffffff) or a valid RGB name (see /usr/lib/X11/rgb.txt) own_window_colour 000000 ##If own_window is yes, you may use these window manager hints to affect the way Conky displays. ##Notes: Use own_window_type desktop as another way to implement many of these hints implicitly. ##If you use own_window_type override, window manager hints have no meaning and are ignored. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager ##Manually set the window name. Defaults to " - conky". #own_window_title ##Boolean, set pseudo-transparency? own_window_transparent yes ##if own_window is yes, you may specify type normal, desktop or override (default: normal). ##Desktop windows are special windows that have no window decorations; are always visible on your desktop; do not appear in your pager or taskbar; and are sticky across all workspaces. ##Override windows are not under the control of the window manager. Hints are ignored. This type of window can be useful for certain situations. own_window_type normal ##Print text to stdout. #out_to_console ##Pad percentages to this many decimals (0 = no padding) pad_percents 2 ##Default global POP3 server. Arguments are: "host user pass [-i interval] [-p port] [-e command]". ##Default port is 110, default interval is 5 minutes. If the password is supplied as '*', you will be prompted to enter the password when Conky starts. #pop3 ##Border stippling (dashing) in pixels stippled_borders 3 ##Total number of times for Conky to update before quitting. Zero makes Conky run forever total_run_times 0 ##Update interval in seconds update_interval 1.0 ##Boolean value, if true, text is rendered in upper case uppercase no ##Adds spaces after certain objects to stop them from moving other things around. ##Note that this only helps if you are using a mono font, such as Bitstream Vera Sans Mono. use_spacer right ##Use Xft (anti-aliased font and stuff) use_xft yes ##Alpha of Xft font. Must be a value at or between 1 and 0. xftalpha 0.9 ##Xft font to use. xftfont Liberation Sans:size=9 # *** RHYTHMBOX FORMAT SETTINGS *** # ${rhythmbox-client --print-playing} # Print the title and artist of the playing song # ${rhythmbox-client --print-playing-format} # Print formatted details of the song # *** PARAMETERS *** # %at Album title # %aT Album title in lowercase # %aa Album artist # %aA Album artist in lowercase # %ay Release year of album # %an Album disc number # %aN Album disc number with leading zero # %ag Album genre # %aG Album genre in lowercase # %tt Track title # %tT Track title in lowercase # %ta Track artist # %tA Track artist in lowercase # %tn Track number # %tN Track number with leading zero # %td Track duration # %te Elapsed time of track # Variables can be combined using quotes. For example "%tn %aa %tt", will # print the track number followed by the artist and the title of the # track. #After this begins text to be formatted on screen TEXT ${alignc}${font Liberation Sans:Bold:size=10}${color5}$nodename ${alignc}K${exec lsb_release -d | cut -f 2| tr "[:upper:]" "[:lower:]"} - $kernel - ${exec kde4-config --version | grep 'KDE' | head --bytes=11}${color}${font} ${execi 60 date +"%B %Y" | tr "[:lower:]" "[:upper:]"} ${color1}${hr 1}${color} ${font Liberation Mono:Bold:size=9}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color2}'"$DJS"'${color}'" "/}$font ${color1}${hr 1}${color} AMD Athlon(tm) 64 X2 Dual Core Processor 4000+${alignr}${color4}(Overclocked)${color} | Core 0 @ ${acpitemp}C ${alignr} ..:: ${freq_dyn_g cpu1}Ghz ::.. `- Usage: ${cpu cpu1}% ${cpubar cpu1} | Core 1 @ ${acpitemp}C ${alignr} ..:: ${freq_dyn_g cpu2}Ghz ::.. `- Usage: ${cpu cpu2}% ${cpubar cpu2} RAM Usage: ${alignr} $mem/$memmax - $memperc% $membar Processes Loaded: $processes${alignr} Running: $running_processes ${cpugraph 4682B4 FFFFFF} File Systems: ${color1}${hr 1}${color} / ${alignr} ${fs_free /} (${fs_free_perc /}%) free of ${fs_size /} ${fs_bar /} /home ${alignr} ${fs_free /home} (${fs_free_perc /home}%) free of ${fs_size /home} ${fs_bar /home}${if_mounted /media/PTAH} /media/PTAH ${alignr} ${fs_free /media/PTAH} (${fs_free_perc /media/PTAH}%) free of ${fs_size /media/PTAH} ${fs_bar /media/PTAH}${endif}${if_running thunderbird-bin} Weather: ${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=CN} ${color1}${hr 1}${color} Conditions: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=CT}${color} Currrent temp: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=HT -i}${color} Chance of rain: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=PC -i}${color} Winds: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WD }${color} at ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WS -i}${color} ${voffset -45}$alignr${offset -55}${font Weather:size=46}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WF}${font} ${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=DW --startday=1 }: ${color1}${hr 1}${color} Conditions will be ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=CT --startday=1 }.${color}${alignr}Rain Chance: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=PC --startday=1 }${color} Winds will come from the ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WD --startday=1 }${color} at ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WS --startday=1 -i}.${color}${alignr}Humidity: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=HM --startday=1 }${color} Sunrise: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=SR --startday=1 }${color}${alignr}Sunset: ${color2}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=SS --startday=1 }${color} Four day forecast: ${color1}${hr 1}${color} ${font Liberation Mono:size=9}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --shortweekday --datatype=DW --startday=1 }${goto 100}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --shortweekday --datatype=DW --startday=2 }${goto 200}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --shortweekday --datatype=DW --startday=3 }${goto 300}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --shortweekday --datatype=DW --startday=4 }$font ${font Weather:size=36}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WF --startday=1 }${goto 100}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WF --startday=2 }${goto 200}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WF --startday=3 }${goto 300}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=WF --startday=4 }${font} ${font Liberation Mono:size=9}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=HT --startday=1 -i -u}/${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=LT --startday=1 -i -u}${goto 100}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=HT --startday=2 -i -u}/${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=LT --startday=2 -i -u}${goto 200}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=HT --startday=3 -i -u}/${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=LT --startday=3 -i -u}${goto 300}${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=HT --startday=4 -i -u}/${texeci 36000 python ~/.conky/conkyForecast.py --location=USOK0233 --datatype=LT --startday=4 -i -u}$font${endif} Network: ${color1}${hr 1}${color} Wired ( ${color2}${addr eth0}${color} ) | down ${color2}${downspeedf eth0} k/s ${color}${alignr}up ${color3}${upspeedf eth0} k/s${color} `- total down: ${color2}${totaldown eth0}${color} ${alignr} total up: ${color3}${totalup eth0}${color}${if_running thunderbird-bin} Modem ( ${color2}${addr ppp0}${color} ) | down ${color2}${downspeedf ppp0} k/s ${color}${alignr}up ${color3}${upspeedf ppp0} k/s${color} `- total down: ${color2}${totaldown ppp0}${color} ${alignr} total up: ${color3}${totalup ppp0}${color}${endif} ${texeci 1000 feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --bytes=+11`"}(Script tomado de Ubuntu Forums)
La clave para que Conky aparezca transparente esta en esta linea:
feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --bytes=+11`"
feh es un visualizador de imagenes, si no lo tienes instalado ejecuta:
$ sudo apt-get install feh
Al ejecutar feh con el parametro –bg-scale (2 guiones) estamos fijando el fondo de pantalla, y este fondo de pantalla precisamente lo estamos recuperando de ejecutar:
grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --bytes=+11
que nos da el nombre del fichero actual que estamos usando como fondo de pantalla en KDE 4. Para lanzar conky ejecutamos:
$ conky &
Comentarios recientes