topic title: Ratpoison
Posts: 215
macondo
Joined: 14 Sep 2007
#1
I've used ratpoison (rp) for a 2-3 years, together with icewm is one of my
favorites.

INSTALLATION

Code: Select all

$ sudo aptitude update && sudo aptitude install ratpoison
It has one configuration file only, so you have to create it, it will be blank:

Code: Select all

$ touch .ratpoisonrc
Then you copy/paste the following configuration:

Code: Select all

alias term exec urxvt
escape F13
warp off
startup_message off
set winname class
defborder 0
set padding 0 0 0 0
defbarpadding 0 0
exec xsetroot -solid"#006060" -cursor_name left_ptr
bind semicolon colon
set bgcolor black
set fgcolor cyan
set font  -xos4-terminus-*-*-*-*-16-*-*-*-*-*-iso8859-15
set bargravity sw

alias showroot exec ratpoison -c fdump; ratpoison -c 'select -' -c only

alias unshowroot exec ratpoison -c"frestore at $HOME/.rpfdump"

## Para mostrar el escritorio/To show your desktop
bind B showroot

### Escritorios virtuales/Virtual desktops
exec rpws -1
exec /usr/bin/rpws init 6 -k

## bind = F13 = Caps Lock
bind F1 exec rpws 1
bind F2 exec rpws 2
bind F3 exec rpws 3

unbind k

bind j focusdown

bind h focusleft

bind k focusup

bind l focusright

bind J exchangedown

bind H exchangeleft

bind K exchangeup

bind L exchangeright

bind C-k delete
##Alt-tab
definekey top M-Tab next
definekey top M-ISO_Left_Tab prev

### Atajos de teclas/Keybindings
bind e exec pcmanfm
bind i exec iceweasel
bind m exec sylpheed
bind u exec xchat
bind r restart
bind Pause exec sudo /sbin/shutdown -h now
bind w exec ~/bin/windows
bind space exec urxvt
bind o exec xlock -mode blank
bind a exec ratpoison -c"echo `date`"
bind q remove
bind p exec urxvt -e elinks
rudeness 12

# Para lanzar un Run box/To launch a Run box:
definekey top C-space exec

# Para hacer un screenshot/To make a screenshot:
definekey top Print exec urxvt -e scrot -cd 10

# Sound Volume/To increase or decrease the sound volume
bind Next exec amixer -q set PCM 5- unmute
bind Prior exec amixer -q set PCM 5+ unmute

EXPLANATION of the .ratpoisonrc

Basically, rp works like this: you press a binding key together with another you
choose and it launches the app you want or does the function you want.

The default bind combination is C-t (Ctrl+t) but it's cumbersome and most users
use other combinations. The best i found so far is the Caps Lock key, its the
one to the left of your pinky finger. In order to do this you have to create the
.modmaprc file.

Code: Select all

$ touch .xmodmaprc
put the folowing lines in it:

Code: Select all

remove lock = Caps_Lock

keycode 66 = F13
Now the binding key F13 (the old Caps Lock) is the official one

To make this effective before entering the X system, enter the following in your .xinitrc:

Code: Select all

xmodmap .xmodmaprc
If you don't have a .xinitrc file, just create it and add it:

$ touch .xinitrc

here's mine as example:

Code: Select all

#!/bin/sh

xrdb -merge .Xdefaults
unclutter -idle 2 &
numlockx &
xmodmap .xmodmaprc
xsetroot -solid"#006060" 
#icewm
ratpoison
Then get out of the X system (Ctrl+Alt+Backspace)
type 'startx' and voilà ! you're facing a greenish desktop.
If you're using 'slim' do what you have to do, i don't use slim __{{emoticon}}__

Whenever you enter the x system, and press the F13 key bind key (caps lock) a
white X will appear, pressing the letter you assigned will launch the app you
want. Example:

bind + i will launch iceweasel
bind + Space bar = urxvt
bind + Pause = sudo halt
bind + a = gives you the time/date
bind + r = restart ratpoison
bind + w = shows open windows
Ctrl + Space = run box
Print = takes a snapshot
etc, etc.

bind + s = splits the screen horizontally
bind + S = splits the screen vertically

Once you have the screen split horizontally and want and want to focus on a
specific screen, the one on top or the one down:

bind j = focus the one at the bottom
bind k = focus the one on top

If you split the screen vertically:

bind h = focus the one on the left
bind l = focus the one on the right

Now, sometimes after you split the windows you want to exchange the one at the
bottom to the top or the one on the left to the right:

bind + J = moves the screen at the top, down
bind + K = moves the screen at the bottom, up
bind + L = moves the screen on the left, right
bind + H = moves the screen on the right, left

To eliminate the windows split:
bind + q


To close an app:
bind + Ctrl + k

Give it a day, you'll feel like a pro __{{emoticon}}__

References: Thanks to Dion Moult
An efficient and minimalist window manager

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://tinyurl.com/yl99spv"
linktext was:"http://tinyurl.com/yl99spv"
====================================
" onclick="window.open(this.href);return false





Image

Image


PD: I forgot to mention the workspaces:
To go to them:

bind + F1 or F2 or F3 (i only use 3, you can add as many as you need)

For the Debian menu:
bind + period (.)

For switching windows:
Alt-Tab or Bind-bind
Last edited by macondo on 28 Nov 2009, 18:01, edited 9 times in total.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#2
That looks comprehensive, thanks!

Even if you're using Icewesel you set the forum theme to look like if you're using Links2 __{{emoticon}}__
Posts: 215
macondo
Joined: 14 Sep 2007
#3
Ok, i changed my bind key back to F4, the modmap change was giving me problems. No problem __{{emoticon}}__
Posts: 215
macondo
Joined: 14 Sep 2007
#4
Ok, i switched to Squeeze and went back to original bind key (F13) explained in the article, now it's working perfectly.
Posts: 138
harii
Joined: 14 Nov 2007
#5
Do you use ratmenu?
if you do - how close is that to 9menu?
as in configuring.
Posts: 215
macondo
Joined: 14 Sep 2007
#6
hi harii, ratpoison comes with the Debian menu by default.

Code: Select all

 
bind + period (.)
I hope i understood your question