Ratpoison

From Gentoo Linux Wiki

(Redirected from HOWTO RatPoison)
Jump to: navigation, search


Desktop environments

Lightweight desktop environments

Window managers

Compositing window managers

Screenshots

edit
Description
Description

Contents

[edit] About

Ratpoison is a radically different window manager. Actually, when you get to use it for a while, you notice that the name window manager doesn't quite apply, since you don't run into a single window in the traditional sense. Well then, what is RatPoison? For those who know the terminal utility called Screen, ratpoison is its X counterpart. In RatPoison by default, every application takes up the whole screen. You can switch between screens using key combinations, launch new screens, and, more importantly, split the screen in two frames and run one application in each screen.

For more information about it, you can check RatPoison's homepage.

[edit] Installation

As always, to install ratpoison you simply need to type the magic words:

emerge ratpoison

Now, the next step is to configure your X server to launch that. If you are using XDM, then you can change your ~/.xinitrc file to read something like the following:

File: ~/.xinitrc
exec ratpoison

However, if you are using GDM (this also works for KDM presently), then you have to create the file /usr/share/xsessions/ratpoison.desktop:

File: /usr/share/xsessions/ratpoison.desktop
[Desktop Entry]
Type=Application
Version=1.3.3.7
Encoding=UTF-8
Name=RatPoison
Comment=Minimalistic Window Manager
Exec=ratpoison

Note: If it helps with your backup scheme, you can create /etc/X11/dm/Sessions/ratpoison.desktop instead.

[edit] Basic Usage

When you first invoke ratpoison, you may be surprised to see, well, nothing but a blank screen. But that is precisely the beauty of it. No menus, no titlebar, no icons, in short nothing. Everything works by using some rather simple keystrokes.

The first thing to note is that every internal ratpoison command starts with Ctrl-t. And if you are going to remember just one keystroke, remember "C-t ?"--the help command, which displays all the other commands that you need to know. To run this use this command, you press 'Ctrl' and 't' together, release them, then press '?' alone.

To launch applications, you can use C-t ! to execute a command. To cycle through the various open windows, you can use C-t n , where n is the index of the screen you want to switch to.

Some Useful Commands (Case-Sensitive):

  • Start a terminal (xterm by default): C-t c
  • Prev/Next frame quick toggle: C-t TAB
  • Close (kill) a window: C-t k
  • Split the screen horizontally: C-t s
  • Split vertically: C-t S
  • Move between split windows: C-t and the appropriate arrow key
  • Delete the selected frame: C-t R
  • Resize a frame: C-t r, resize with arrow keys (only in unstable, as of 29/09/06)
  • Unsplit (single maximized window): C-t Q
  • Next window: C-t n or C-t Spacebar or C-t Return
  • Prev window: C-t p
  • List windows: C-t w
  • Banish the mouse pointer to the bottom right of the screen: C-t b
  • Send a C-t to the program (such as open new tab in firefox): C-t t
  • Execute a program: C-t !
  • Execute a ratpoison command: C-t :
  • Quit ratpoison: C-t :quit

Ratpoison is highly configurable, and you can remap all keycombinations as you wish. The file .ratpoisonrc in your home directory should contain default settings, which are sourced when ratpoison loads up. Some lines you may wish to add to your .ratpoisonrc:

bind C-f exec firefox

This starts firefox on receiving the keycombination C-f (of course, after a C-t). Use this to make your own binds

definekey top KP_Insert select 0

Saves the C-t keypress.. note the 'top' keyword. This maps the numpad 0 key to directly switch to window 0

[edit] Tips

Ratpoison with workspaces:

File: ~/.ratpoisonrc

exec /usr/bin/rpws init 6 -k

Where 6 is the number of workspaces.

Basic rpws usage:

  • M-F1 Workspace 1
  • M-F2 Workspace 2

and so on (depending on how you have configured rpws).

If you want change bindings for switching between the workspaces you could use xbindkeys

emerge xbindkeys

then:

File: ~/.xbindkeysrc
"rpws 1"
alt + 1

"rpws 2"
alt + 2

and so on (depending on how you have configured rpws).

then:

File: ~/.xinitrc
xbindkeys &
Personal tools