How to save your Linux screen space

ratpoison

Tiling window managers are all about speed, and the quickest way to tell your computer what you want it to do is from the keyboard, since it's where your fingers are already resting. This is the primary motivation behind Ratpoison, a popular tiling window manager that hopes to convince you that your mouse is dead.

However, keyboard shortcuts need you to put in some effort before you actually start saving time using them, rather than running through the documentation. And most users will agree, Ratpoison has a steep learning curve.

You even need to prove you're up to the task before you can enter the environment – at least you do if you're running Ubuntu with the GDM login manager.

After installing the Ratpoison package, you'll need to either run the window manager manually or create a 'ratpoison.desktop' file in the ''/usr/share/xsessions' directory by copying the Xterm example and changing the executable path to '/usr/bin/ratpoison' and the 'X-Ubuntu-Gettext-Domain' to 'ratpoison-session'.

After that, you'll be able to see the new option in the login window manager menu.

But you won't see anything. Ratpoison is probably the most zen-like desktop for Linux, and doesn't clutter the screen with anything that suggests it's running. You might notice a brief message telling you how to get started, but if you happen to be checking your watch at that moment, Ratpoison will look exactly like a crashed desktop – a completely empty X server.

To get from this point to usability requires keyboard shortcuts, and the bit of information you've just missed is how to see a list of the keyboard commands.

Keyboard shortcuts

The most used shortcut in Ratpoison is Ctrl+T. This places the desktop into a mode ready to accept further keyboard commands. You could add the '?' key, for instance, to reveal the help file listing all the other keyboard shortcuts you can use, but here's our pick of the most useful ones.

Following Ctrl+T with 'C' will open a terminal, and from there you can launch any other applications you need. You can also replace 'C' with '!' to run a single command line.

Applications will run in full-screen mode, and they won't have any window border, meaning you can't move them with your mouse. Instead, you can use the 'N' (next) and 'P' (previous) shortcuts to switch between your running applications, although you'll also find this switches between tabs in Firefox too.

You can see which windows are open with 'W', and they'll be listed in what Ratpoison calls its status bar, which defaults to the top-right of the screen. Switch between windows and tabs by using the number that appears in the list.

All this keyboard speed might seem like an advantage, but there's currently very little tiling. At the moment, each application is running full-screen. This can be remedied with another shortcut, 'S', which will split the display horizontally, or Shift+S vertically.

The application behind the current one will then fill the space, and you can continue splitting the display in this way until you've got as many viewable applications within each section as you need. You can then switch between each section using the cursor keys, and you can resize the selected frame using 'R' followed by some judicious use of the cursor keys to expand and contract the application borders.

All the other frames will scale automatically to accommodate your changes, and and when you want to remove a frame completely from the display, use the 'Q' shortcut.

Custom config

Finally, if you really want to customise how Ratpoison handles applications, you'll need to edit the configuration file, which can be found hidden in your home directory as '.ratpoisonrc'. If not, you'll need to create it.

The manual includes some excellent information on what you can accomplish here and, depending on your package installation, you should find good examples of what's possible in the installation directory. You can, for instance, create several virtual desktops for your applications, or try using what Ratpoison calls Hooks to add simple scripted behaviour to your keyboard shortcuts.

You can add shortcuts for running specific commands, and even dump and restore specific application layouts, which is useful if you want one configuration for web browsing and another for programming. But if it's customisation you're after, there's only so far Ratpoison will go. You'll need to look for an even more advanced option.

TOPICS