Using Ratpoison/Basic Keystrokes

There are a few important keystrokes that are good to remember while using Ratpoison. When you have started your console window, why stop there? It is time to learn how to execute any program, and to switch between these in an effective manner.

Switching and killing programs
Assuming that you have your console still running (if not, do Ctrl c), you can execute programs from within that window, just like any other window manager. Again, the difference is that there are no borders and that you cannot switch between these programs with your mouse. Type  if you are out of ideas about which program to start. Now, to change back to the console window you press Ctrl n. N of course means next, so you probably already guessed that Ctrl p moves to the previous window. Now, the difference between “next” and “previous” is non-existent if you are running only two programs, but as you run more and more programs simultaneously, it becomes ever more useful to be able to move “forward” and “backward” in some sense.

Now, how do you close a program? A number of programs have their own kill bindings (ex. Ctrl Ctrl for Emacs, Ctrl for Firefox and Xchat etc.) but ratpoison provides one command guaranteed to close and kill all running programs: the Ctrl k salute. The k stands for kill, and is implemented much the same way as clicking on the “close” button mainstream window managers provide.

Handling many programs
Now, if you have got a multitude of programs running, it is tiresome to repetitively type Ctrl n enough times to get to the proper program when you need it. Ctrl number switches to a certain window. Keep in mind that this list is zero-indexed and sorted chronologically—the first program started is accessed via Ctrl 0, not 1.

Also, you can use Ctrl instead of Ctrl n to move to the next program. If you want to do a quick alt tab-like (that is, switch to last program accessed) command, Ctrl Ctrl will do that.