Enjoying Open Source Software

Ratpoison window manager on GalliumOS


GalliumOS is the default distro installed by chrx. Chrx is an awesome tool that makes it possible to install a real Linux distribution on your Chromebook.

Some weeks ago, I have installed GalliumOS on an old Chromebook to use it as a machine to learn Elisp.

Ratpoison window manager

Ratpoison is a wonderful and light weight tiling window manager. It is largely modeled after GNU Screen. Ratpoison is like the mother of all tiling window managers, it was one of the first, and I have been using it very long.

Windows in Ratpoison are borderless and open full screen, unless you tile multiple windows next to each other. So you actually use every pixel of the display.

Ratpoison is completely keyboard driven. Which makes it extremely fast. Adoption is smooth, because the Ratpoison key bindings mimic the key bindings of GNU Screen. Most people use Tmux now, as a replacement for GNU Screen, but the key bindings of Tmux are compatible with those of GNU Screen.

Prefix key

Just like GNU Screen and Tmux, Ratpoison uses a so called prefix key. In GNU Screen this is Ctrl-A, the default prefix key of Tmux is Ctrl-B and the default prefix key for Ratpoison is Ctlr-T.

I have been using Ctrl-Z as my Ratpoison prefix key for ages.

The key bindings in Ratpoison don't hinder the working of Emacs, GNU Screen, Tmux, or Vim.

Ratpoison is configured with a small dotfile, ~/.ratpoisonrc.

Ratmenu (or Ratmen)

In Ratpoison the windows are numbered, and you can select a window by its number, just like in DWM and I3.

However, Ratmenu (or Ratmen, the better version of Ratmenu) simplifies the use of Ratpoison. It makes switching to another window much easier. I use a small shell script that creates on the fly a menu, which is populated with the available windows. This script is called "windows" and is floating around on the internet.

Here are the contents of this script:


ratpoison -c 'windows %l;%n;%t' | sort -nr | \
awk -F';' 'BEGIN{ printf "ratmenu -style dreary "} \
{ printf "'\\\"'%s: %s'\\\"' '\\\"'ratpoison -c '\''select %s'\'''\\\"' ", \
$2, $3, $2 }' | sh

In Debian and its derivatives (like Ubuntu, and GalliumOS) you can also generate a menu from the Debian menu hierarchy by running a script. but I don't use that.

Configure GalliumOS to use Ratpoison

To change the window manager, edit the file /etc/lxdm/lxdm.conf and change the line which sets the session:

# session=/usr/bin/startxfce4

After that, reboot.

Have fun!


⇽ Emacs Doom on an old Chromebook Gitweb on FreeBSD with mini_httpd ⇾