Ratpoison

Resources

ratpoison is [[Article description::a tiling window manager modeled after screen.]] The main philosophy behind ratpoison is to manage window without using a mouse (what its name reflects). Written in C, it is extremely lightweight and fast.

Installation

USE flags

USE flags for x11-wm/ratpoison window manager without mouse dependency

debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
emacs Add support for GNU Emacs
history Use sys-libs/readline for history handling
sloppy Install sloppy, a focus-follows-mouse implementation for ratpoison
xft Build with support for XFT font renderer (x11-libs/libXft)
xrandr Enable support for XRandR

Emerge

Install x11-wm/ratpoison:

root #emerge --ask x11-wm/ratpoison

Configuration

Starting

Edit ~/.xinitrc in the user's home directory by adding the following line:

FILE ~/.xinitrc
<syntaxhighlight lang="bash">exec /usr/bin/ratpoison</syntaxhighlight>

Startup file

Being a simple window manager, ratpoison does not need much out-of-the-box configuration. Customizable settings can be adjusted to each user's needs by editing ratpoison's start up file.

On start up ratpoison runs commands found in the ~/.ratpoisonrc file. This file contains key bindings and programs that need to be run with ratpoison. Here is an example of a ~/.ratpoisonrc file:

FILE ~/.ratpoisonrc
# Add key bindings:
bind c exec /usr/bin/urxvt
bind e exec /usr/bin/urxvt -e /usr/bin/emacs
bind m exec /usr/bin/urxvt -bg black -fg white -e /usr/bin/mitmproxy
bind f exec /usr/bin/firefox

# What programs should be ran on start up?
exec /usr/bin/numlockx

# Initiate here the number of desired workspaces:
exec /usr/bin/rpws init 6 -k

Usage

Since ratpoison is modeled after screen, users accustomed to screen will easily manage to use it. Each command begins with a Ctrl-t (abbreviated C-t from now on), and is followed by one other keystroke. The simplest way to get to know the commands is to press C-t ? This will open a help window containing the most common key bindings.

Most commonly used keys:

KeystrokeDescription
C-t C-cExecute xterm
C-t !Spawn a shell executing shell command, usually an application, such as C-t ! firefox Enter
C-t kClose the current window
C-t bBanish the rat cursor to the lower right corner of the screen. The next step would be to unplug the rat from the computer altogether.
C-t C-tSwitch to the window that was last accessed but is not currently visible
C-t sSplit the current frame into upper frame and a lower frame. By default, split in halves.
C-t SSplit the current frame into left frame and a right frame.
C-t rResize the current frame interactively by pressing Up and Down keys. Hit Enter when finished.
C-t RRemove the current frame and extend some frames around to fill the remaining gap.
C-t :quitRun before exiting ratpoison
C-t aOutput current data and time
C-t C-gDo nothing and that successfully
Note
All windows are maximized to the full screen size.

Tips

By default, ratpoison only has one workspace. Add the following line to the ~/.ratpoisonrc file in order to create six workspaces:

FILE ~/.ratpoisonrc
<syntaxhighlight lang="bash">exec /usr/bin/rpws init 6 -k</syntaxhighlight>

Switch between workspaces with Alt+F1, Alt+F2, etc.

See also

  • Openbox — a highly configurable, next generation, stacking window manager for X11 with extensive standards support.
  • LXDE - The Lightweight X11 Desktop Environment built off Openbox and a smart collection of lightweight applications.
  • Xfce — a lightweight desktop environment for Unix-like operating systems.
This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.