4.2.6. Editing the configuration file
After using Alpine a little, one problem may become apparent. Its shortcut for selecting a file, for example to attach it, is C-t. But that's Ratpoison's escape key combination! In fact, Ratpoison has a solution for such conflicts, referred to somewhat cryptically in the shortcut list as meta: C-t t should send C-t to the application in the active window. However, this does not work in the terminal, which does not recognise the character if it receives it in this form.
Everything in Ratpoison is configurable, and the C-t combination itself is no exception. A temporary solution is to reassign the binding using Ratpoison's command input feature. C-t : conjures up an input line at the top right of the screen. This can be used for passing instructions to Ratpoison. For instance, one way of opening an application in a new console is:
:exec xterm -e alpine
(that is, C-t : exec xterm -e alpine) which starts the program we just installed. The colon command can be used to pass a number of instructions to Ratpoison; see man Ratpoison for a full list together with shortcuts where they have been defined. In fact, there is a shortcut for exec. Just type C-t ! [application]; C-t C-! opens it in a console.
To change the C-t default, do: :escape Super_L.
which is the so-called "Windows key" to the left of the keyboard. As well as resolving the conflict with Alpine, this has the great benefit of being just one keystroke. Some functions may not work correctly, in particular the very useful C-t C-t to go back to where you just were, and performance varies from one keyboard to another, so it's worth experimenting. Another possibility is the "Menu" key. To return to the default: :escape C-t.
To make such a change permanent, edit ~/.ratpoisonrc. If you are using Ratpoison, you can open the file now (with GVim or Vim) and tile it horizontally with the window where you are reading this guide (C-t shift-s). Let's go through some items in the file.
banish sends the mouse pointer to bottom right (incidentally, you may wish to install unclutter, which makes it fade out altogether after a few seconds' stillness; place the line unclutter & in your ~/.xinitrc to run it automatically when X is started). We've seen all but one of the custom keybindings in the "bind" statements. To change the wallpaper, point to a different image. The final item sets up workspaces, which we'll look at next - including C-t W.
Before editing the file, create a backup copy in case anything goes wrong. To change the C-t default, simply add a line :
escape Menu # make sure you test your choice first using ':'
We've seen many of the custom keybindings in the "bind" statements.
The final item, together with the bindings to function keys, sets up workspaces; we'll look at these next - including C-t W.