Mi gestor de ventanas favorito desde hace muchos años es Ratpoison, esto es, «veneno para ratas». El nombre lo dice todo. Por si quedara duda, su lema es Dile adiós al roedor. Y es que para trabajar el teclado es más eficaz que el ratón.

He probado otros muchos gestores de ventanas, antes y después de conocer Ratpoison, pero tras probarlo siempre regresé a él. Los otros dos gestores de ventanas que he utilizado durante algún tiempo son Fluxbox y Openbox; especialmente este último es muy recomendable por su ligereza, su configurabilidad y su manejo del teclado. Sin embargo el heterodoxo Ratpoison gana la comparativa en todos los aspectos.

Esto es lo que me gusta de Ratpoison:

Una ventaja muy especial de Ratpoison es que ayuda a concentrarse en la tarea que tenemos entre manos, porque en pantalla vemos sólo la aplicación con la que estamos trabajando. Es posible dividir la pantalla en cuadros y ver en cada uno de ellos una aplicación diferente, pero normalmente no es necesario.

Por supuesto con Ratpoison pueden funcionar otras aplicaciones que añadan paneles de control con sombras translúcidas en tres o cuatro dimensiones, menús flotantes que hagan soniditos cuadrafónicos, gestores de escritorio sembrados de iconitos de carpetas que se abran y cierren solas, pantallitas que informen de si está lloviendo o hace sol sobre tal o cual pueblo... y demás cosas muy útiles para derrochar tanto los recursos de nuestra máquina como nuestro tiempo. Pero probablemente quien sabe apreciar la austeridad y eficacia de Ratpoison no necesita ese tipo de complementos.

En otros artículos abundaré en Ratpoison; y escribiré también sobre screen, el compañero ideal (y padre espiritual) de Ratpoison, otro de mis programas de uso cotidiano.

Más información sobre Ratpoison

~/.ratpoisonrc

Y, por fin, he aquí el motivo de esta página: mi fichero de configuración .ratpoisonrc:


# ~/.ratpoisonrc

# Ratpoison's config file
# by Marcos Cruz (http://programandala.net)

# 2009-05-03 Modified.
# 2009-06-19 Added alias zx app for fuse and ace for xace 0.5; added app key z for fuse.
# 2009-12-09 Modified some alias.
# 2010-03-03 Apart keymap for emulators.
# 2010-06-19 Added key for Google Chrome; added alias for SimCoupe (SAM Coupé's emulator).
# 2010-07-31 Added some alias for emulators.

###############################################################
# preferences

startup_message off

# "r" is under the right forefinger in the Spanish Dvorak keyboard layout:
escape C-r

banish
select -
defborder 0
defpadding 0 0 0 0

set border 0

set winfmt %2n.%1f %3s %20a: %20t

# change the default cursor and background
exec xsetroot -cursor_name left_ptr
#exec xsetroot -solid black 
#exec xsetroot -solid black -cursor_name left_ptr
#exec xsetroot -solid blue -cursor_name left_ptr
#exec xloadimage -onroot -quiet -center /home/mythtv/.mythtv/mythtvstart.jpg

# Use the name of the program rather than the title in the window list
defwinname name

###############################################################
# top level keys

unbind a
unbind A
unbind C-a
unbind C-A
unbind C-b
unbind c
unbind C-i
bind h time
bind i info
bind k delete
bind K kill
unbind C-k
unbind C-K
bind l windows
bind C-l redisplay
unbind n
unbind C-n
unbind o 
bind O tmpwm openbox
unbind p
bind P tmpwm ratpoison
unbind C-p
unbind Q
bind C-q quit
# "other" upper and lower case (because of possible caps lock):
bind r other
bind R other
# somehow "meta" works in gvim but not in vim (in a terminal under X Windows):
bind C-r meta 
bind C-R meta
# no "restart" hotkey any more
#bind C-R restart
unbind s
unbind S
unbind C-s
bind C-S restart
unbind t 
unbind T 
bind C-t title
unbind C-V
#bind w exec ~/bin/ratpoison_windows.sh
bind w windows
unbind W
unbind C-w

# bind C-apostrophe # buggy?
bind underscore vsplit
bind bar hsplit
#bind ISO_left_tab other
bind Tab other
bind Return other
unbind C-Return
bind space only
unbind C-space
bind Right next
bind Left prev

bind F1 help
bind F2 title
bind F5 redisplay
bind F10 quit

# Make prtscreen work, as long as in ratpoison mode. "import" is an Imagemagick command.
# Found in http://en.wikibooks.org/wiki/Using_Ratpoison/Example_Config
bind Print exec import -window root png:$HOME/snapshot_$(date %Y%m%d%H%M%S)$$.png

# Here's a hack from John Meacham
# Found in http://threebit.net/mail-archive/mythtv-users/msg35742.html
# Doesn't work for me.
bind c exec ratpoison -d :0.0 -c "echo `date +'%r - %A %n    %D - %B'` `cal | tail +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\ $(date +%e)\ /\<$(date +%e)\>/\"`"
# it produces output like the following in the message window, very handy:
#         +-----------------------+
#         |05:05:24 PM - Tuesday  |
#         |   09/09/03 - September|
#         |                       |
#         |Su Mo Tu We Th Fr Sa   |
#         |    1  2  3  4  5  6   |
#         | 7  8< 9>10 11 12 13   |
#         |14 15 16 17 18 19 20   |
#         |21 22 23 24 25 26 27   |
#         |28 29 30               |
#         +-----------------------+

###############################################################
# keymap for windows

newkmap W
bind W readkey W

# change the current window's number:
definekey W 0 number 0
definekey W 1 number 1
definekey W 2 number 2
definekey W 3 number 3
definekey W 4 number 4
definekey W 5 number 5
definekey W 6 number 6
definekey W 7 number 7
definekey W 8 number 8
definekey W 9 number 9

###############################################################
# keymap for frames

newkmap f
bind f readkey f
#definekey f Tab focuslast
#definekey f Return focuslast
definekey f Space only
definekey f Left focusleft
definekey f Right focusright
definekey f Up focusup
definekey f Down focusdown
definekey f C-Left exchangeleft
definekey f C-Right exchangeright
definekey f C-Up exchangeup
definekey f C-Down exchangedown
definekey f f focuslast
definekey f ' fselect
definekey f 0 fselect 0
definekey f 1 fselect 1
definekey f 2 fselect 2
definekey f 3 fselect 3
definekey f 4 fselect 4
definekey f 5 fselect 5
definekey f 6 fselect 6
definekey f 7 fselect 7
definekey f 8 fselect 8
definekey f 9 fselect 9
definekey f c remove
definekey f d dedicated
definekey f m shrink
definekey f o only
definekey f r resize
#definekey f r frestore
#definekey f C-r frestore
#definekey f s fdump
definekey f t resize
definekey f u undo

# Frame layouts
# Found in:
#http://threebit.net/mail-archive/mythtv-users/msg35742.html

# bind M-! to store the current frame layout in slot #1
#bind M-exclam exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`"

#bind M-1 to restore the frame layout in slot #1
#bind M-1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`"

# Do the same for slot #2 and bind it to M- (at)  and M-2, respectively.
###bind M-at exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`"
###bind M-2 exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`"

# Give ourselves another slot on M-# and M-3, respectively.
###bind M-numbersign exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`"
###bind M-3 exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`"


###############################################################
# keymap for applications

newkmap a
#definekey top a readkey a
bind a readkey a
definekey a a exec amsn
#definekey a b exec x-terminal-emulator -T BASin -e wine "~/.wine/drive_c/Archivos de programa/BASin/BASin.exe &"
definekey a b exec wine "~/.wine/drive_c/Archivos de programa/BASin/BASin.exe"
#definekey a c exec x-terminal-emulator -T mc -e /usr/bin/mc
definekey a c exec google-chrome
#definekey a e exec x-terminal-emulator -T Elinks -e /usr/bin/elinks
definekey a f exec firefox
definekey a g exec gimp 
#definekey a m exec amsn
definekey a m exec amule
definekey a o exec opera
definekey a p exec pidgin 
definekey a q exec gqview
definekey a s exec x-terminal-emulator -T screen -e /usr/bin/screen -D -R
definekey a t exec x-terminal-emulator -T terminal
definekey a v exec gvim
definekey a w exec wicd-client -n

###############################################################
# keymap for emulators

newkmap e
bind e readkey e
# Jupiter Ace:
definekey e j exec x-terminal-emulator -T xace -e ~/bin/xace.sh
# SAM Coupé:
definekey e s exec /opt/SimCoupe-1.0/simcoupe &
# ZX Spectrum:
definekey e b exec /usr/bin/wine ~/.wine/drive_c/Archivos_de_programa/BASin/BASin.exe &
definekey e f exec /usr/bin/fbzx &
definekey e z exec /usr/bin/fuse &
# QL:
definekey e q exec /opt/uqlx/bin/qmin -g 800x480 -b '10 lrun win1_boot_uqlx'
definekey e 2 exec ~/bin/ql2k.sh

###############################################################
# alias for emulators

alias ace exec x-terminal-emulator -T xace -e ~/bin/xace.sh
alias basin exec /usr/bin/wine ~/.wine/drive_c/Archivos_de_programa/BASin/BASin.exe
alias ql exec /opt/uqlx/bin/qmin -g 800x480 -b '10 lrun win1_boot_uqlx'
alias sam exec /opt/SimCoupe-1.0/simcoupe &
alias zx exec x-terminal-emulator -T fuse -e /usr/bin/fuse

###############################################################
# alias for applications

alias amu exec amule
alias amule exec amule
alias ams exec amsn
alias amsn exec amsn
alias aw exec abiword
alias el exec x-terminal-emulator -T Elinks -e /usr/bin/elinks
alias elinks exec x-terminal-emulator -T Elinks -e /usr/bin/elinks
alias ff exec firefox
alias ftp exec x-terminal-emulator -T lftp -e /usr/bin/lftp
#alias fz exec filezilla
alias gi exec gimp
alias gimp exec gimp
alias gn exec gnumeric
alias gnumeric exec gnumeric
alias gt exec gtimer
alias gtimer exec gtimer
alias gv exec gv
alias gvi exec gvim
alias gvim exec gvim
alias iw exec firefox
alias lf exec x-terminal-emulator -T lftp -e /usr/bin/lftp
alias lftp exec x-terminal-emulator -T lftp -e /usr/bin/lftp
alias lp exec leafpad
alias mc exec x-terminal-emulator -T mc -e /usr/bin/mc
#alias oow exec oowriter
#alias ooc exec oocalc
#alias ooi exec ooimpress
#alias oob exec oobase
#alias ood exec oodraw
alias op exec opera -nomail
alias opera exec opera -nomail
alias qv  exec gqview
#alias vi exec x-terminal-emulator -T Vim -e /usr/bin/vim
#alias vim exec x-terminal-emulator -T Vim -e /usr/bin/vim
alias vi exec gvim
alias vim exec gvim
alias xp exec xpdf
alias xpdf exec xpdf
#alias wicd exec /opt/wicd/gui.py
alias wicd exec wicd-client -n
#alias win exec x-terminal-emulator -T Windows -e ~/bin/titan.sh
#alias titan exec x-terminal-emulator -T Windows -e ~/bin/titan.sh
#alias ya exec x-terminal-emulator -T yafc -e /usr/bin/yafc
#alias yafc exec x-terminal-emulator -T yafc -e /usr/bin/yafc

###############################################################
# trayer

# Reference:
# http://noone.org/blog/English/Computer/X/How%20to%20get%20Network%20Manager%20working%20with%20ratpoison.html 

#unmanage panel
#set padding 0 0 0 26

URL: http://programandala.net/es.artículo.2009.04.21.configuración_ratpoison

Página publicada en 2009-04-20 19:33 CEST
Última modificación realizada en 2009-12-09T15:31:21+01:00