-->
Home » , » Ratpoison is a Window Manager that puts that sick little rodent out of its misery.

Ratpoison is a Window Manager that puts that sick little rodent out of its misery.

Ratpoison is a tiling window manager for the X Window System primarily developed by Shawn Betts.

Ratpoison is a simple Window Manager with no fat library dependencies, no fancy graphics, no window decorations, and no rodent dependence. It is largely modelled after GNU Screen which has done wonders in the virtual terminal market.

The screen can be split into non-overlapping frames. All windows are kept maximized inside their frames to take full advantage of your precious screen real estate.

All interaction with the window manager is done through keystrokes. ratpoison has a prefix map to minimize the key clobbering that cripples Emacs and other quality pieces of software.
If you're wondering how we came up with the name ratpoison, here is the usenet post that started it all.


Its user interface and much of its functionality are inspired by the GNU Screen terminal multiplexer.

Its name reflects a major design goal of ratpoison: it lets the user manage windows without using the mouse. Unlike other tiling window managers like Ion, ratpoison completely ignores the mouse, and avoids window decorations as much as possible.

Ratpoison is free software licensed under the GNU General Public License.

Reception

Mark Pilgrim, a frequent user, praised it for being "minimalist" and "configurable".[5] Jeff Covey found it "lightning fast and perfectly stable".

Peter Seebach remarked that "the convenience and performance are impressive; the learning curve, however, daunts many users.

Similarly, Brian Proffitt observes that "the key commands are well explained in this window manager's man pages, and whatever you do, read these first. The keyboard commands do make sense after some use but initially the learning curve is pretty steep."

In the same vein, Bruce Byfield found it (and stumpwm) "virtually unusable until you read the documentation".

Stumpwm is a window manager intended as a successor to ratpoison, created when Betts found ratpoison growing increasingly large and "lispy". As explained on the StumpWM wiki, the developers decided to largely reimplement ratpoison in Common Lisp:

StumpWM grew out of the authors' frustration with writing ratpoison in C. Very quickly we realized we were building into ratpoison lispy-emacs style paradigms. We had a REPL hanging off 'C-t :', hooks, and a growing subset of Common Lisp in the implementation... It was clear what we really wanted was a window manager written in Lisp from the ground up with lots of room for customizing and real-time hacking.


Ratpoison is, however, just the Linux window manager some people need. It is an ultra-lite tiling window manager, very fast, and does not use the mouse for any user action. If you prefer to work primarily from the keyboard, this might be just your ticket. Note that though ratpoison doesn't use the mouse, applications that use the mouse can still do so.

Ratpoison, like Dwm, is a tiling window manager, meaning that it lets the user arrange the multiple open windows on a screen in a tile manner. The windows fit tightly together and do not overlap. It's about using up all the screen surface area with window content -- not frills. It's also about being able to quickly move between windows without use of a mouse.

Ratpoison initially presents a plain, unadorned screen to the user. There is no floating window support, no tab support, and no direct multiple workspace support. There's no title bar on the window, no icons, no buttons, and no panel. Sounds pretty grim, yes?

But ratpoison does have some interesting tricks up its sleeve, including tiling windows, window groups, and the ability to save and restore tile arrangements. The cleverly designed rpws script (for ratpoison Work Space) makes use of some of these features to provide support for a multiple workspace utility. If you decide to experiment with the ratpoison window manager, I urge you to download and install this perl script. Running rpws help will get you started on how to use rpws to augment ratpoison.

In most Linux distributions, ratpoison is easy to install. I use Debian Linux, so I was able to install by doing:  

apt-get install ratpoison.

To get the rpws script working with your ratpoison install, insert the following command into your .ratpoisonrc file:

exec rpws init 4 -k


To make this work the rpws has to be marked as executable. You may have to include the full path of rpws in the exec statement. With this addition, ratpoison will have 4 workspace available, and an alt-Fn key (where n is the key numer, like alt-F3) will move you to the respective workspace.
As an example of an ideal application for ratpoison, I have a resuscitated Old Laptop that has only about 83 megabytes of memory. The screen resolution is 800x600 tops. Yet in that old laptop I'm running the Etch version of Debian Linux. I thus am running a significant operating system on what is now considered very meager resources.

I get away with it because I use the ratpoison and dwm window managers. Both are very small in memory requirement, and both can make heavy use of keyboard commands. In fact, ratpoison makes use of only the keyboard.

You might wonder why I don't use ratpoison exclusively. The reason is because ratpoison is purely a tiling window manager. It always consumes the entire screen with whatever frames are open, and windows never partially cover one another. They can exist in side by side frames, or totally cover one another. Applications, like GIMP that desire to open multiple windows of specific size are clobbered by ratpoison's insistence on forcing windows to fit tiles.

With ratpoison, each utility window of Xephem, for example, becomes a full frame by default. You have to either page through the windows to see the various utilities, or tell ratpoison to split the windows into tiled frames and arrange the utilities into the tiled frames. That's not convenient, and not what ratpoison does well. But when you read about how to save frames and create scripts, you may see how you can conquer even those pesky multi-window applications.

For general work, ratpoison provides a very small, very efficient, and very handy environment for those who like to work primarily through the keyboard. For the instances where ratpoison is somewhat of a hindrance, I always have dwm at the ready. Dwm's resource use is as small as ratpoison's, but it can support floating windows as an option.

To use dwm for those special occasions, I can either exit ratpoison and change my .xinitrc file to run dwm, or I can stay in ratpoison, enter alt-t : and when prompted enter tmpwm dwm. This will bring up the dwm window manager, but return to ratpoison when I exit dwm.


Ratpoison Screen Control.
Ratpoison Screenshot At left you see an example screenshot of ratpoison. You can click on the image to get a full-sized view.
The screen in this example is split into 4 frames of unequal size. At upper left is an xterm showing the ratpoison info file. At upper right is xclock. At lower left is the file manager program thunar. At lower right is xosview
The first thing you might notice is the unusual look of xosview. This is because ratpoison always adjusts a window's size to fit the available frame. The only way to shrink the height of xosview to give a more normal view, in this example, is to simultaneously expand the height of the xclock frame, making it distorted.
That's an example of the nature of the way ratpoison uses tiled frames. However many you set up by splitting the screen, whatever is in each frame is adjusted to fill the frame.
So that brings up a question. How do you split the screen into multiple tiled frames? That's discussed in the next segment.


Getting Around In And Controlling Ratpoison.
If you decide to install ratpoison, at first you might be quite lost. What you get when you login is a big gray screen. Where do you go next?

The first thing to do is type a cntl-t ? command. That's hold down the control key while pressing the t key, then press the ? key. That will fill the screen with the available keyboard commands. The cntl-t key is considered the command key, and precedes any other key on the illustrated help screen to accomplish the respective action. Hit Esc to escape from the help screen.

To get more information about the features and control commands for ratpoison, you should try info ratpoison. If info is installed, it will present a nice, structured help system. You can also do man ratpoison to get some information, though not as much as with the info command.
If you run a command from your big gray screen, such as xterm -e mc to open another xterm with Midnight Commander, you'll find yourself in Midnight Commander. So how do you get back to the window you were just in? It's completely covered up with the Midnight Commander window.

There are a number of ways to switch to different open windows, and to split the screen up into multiple frames. The following table shows a few of the handy commands you may want to start with to help find yourself around to all your open windows. Note that the word window is used to denote the display opened by a task, and the word frame is used to denote a tiled area of the full screen.

# cntl-t space - Switch to next window. Repeated, it cycles through all open windows.
# cntl-t n - Switch to next window -- same as space.
# cntl-t p - Switch to previous window.
# cntl-t w - Display list of open windows
# cntl-t 0-9 - Switch to numbered window (see cntl-t w).
# cntl-t A - Name a window.
# cntl-t ' - Switch to window by name.
# cntl-t s - Split frame into upper and lower frames.
# cntl-t S - Split frame into left and right frames.
# cntl-t Q - Make frame full screen (close other frames).
# cntl-t r - Resize current frame. Press enter when done.
# cntl-t tab - Switch to next frame (if screen is split)
# cntl-t ? - Get help screen.
# cntl-t ! - Run a shell command.

This list is by no means a complete list of ratpoison key commands, but the help screen (cntl-t ?) and the info file will give a complete list. It is possible to change any of the commands to a sequence you find more comfortable. It's also possible to add additional commands, such as key sequences that launch some of your favorite applications. It's even possible to change the command key from cntl-t to something else (I use cntl-k).

To customize your ratpoison window manager setup, make a $HOME/.ratpoisonrc file, and make your own tailored commands. Below is a snippet of my $HOME/.ratpoisonrc file:
# Change the command key to cntl-k
escape C-k

# Set up easier ability to move to frames than tab
bind j focus

# Set up easier key to maximize window than Q (use o)
bind o only

# Bind x to launch a new xterm
bind x exec xterm -bg grey -fg black -fn 8x13 &

# Bind e to my favorite editor
bind e exec xterm -e vim

These new keys now operate in conjunction with the command key to do the operations desired. For example, cntl-t x launches an x terminal. The full list of ratpoison commands that can be bound to keys is in the info file under Command Index
Download.

The current stable version is 1.4.5 and can be downloaded here.
Take a look at http://savannah.nongnu.org/projects/ratpoison/ for further information on obtaining ratpoison.
ratpoison is also available via Git. go to http://savannah.nongnu.org/git/?group=ratpoison for more information.


Some Help With Tiling.
I've already suggested that you use the rpws script to augment your Linux ratpoison install. With rpws, you have what is functionally multiple workspaces. Whatever tiles you set up on a computer workspace are preserved by rpws. When you change go another workspace, the new workspace's tile arrangement will be recovered.

I've added a couple of simple scripts of my own to give me the ability to save screen tile arrangements for later use, then restore them at will. These scripts, which I named rput for saving tile arrangements and rget for retrieving tile arrangements, are defined as follows:
...rput...
#!/bin/tcsh
# save a current frame setup
ratpoison -c fdump >$1

...rget...
#!/bin/tcsh
# restore a ratpoison frame setup
ratpoison -c "frestore 'cat $1'"
Typing rput some_name from a Linux xterm within a tile arrangement will save the tile arrangement in a file by the name I choose. When I run rget the_same_name at a later time (even another session), the tile arrangement will be restored, and the focus will be on the tile I was in when I saved the arrangement.

Not too terrific, I admit. But when combined with the ability to pass commands to ratpoison from script files, this concept can be used to make a script file to launch some multi-windowing utility or some arrangement of multiple tasks and automatically reconstruct the tile arrangement with each tile hosting the windows as I wish.

For example, by saving a tile arrangement and making a launch script, I can have the screen arrangement shown at left pop up in it's same arrangement every time I run it. The setting up of tiles, loading of the program, and assignment of windows to tiles can be automatic.
Automatic Tiling With Ratpoison The first trick is to save the tile arrangement with rput, then find out their focus sequence for later reference in the launch script. To do that you can use the cntl-t j command to step focus through the tiles, and take note of the sequence.
In the screenshot shown here, I have an xephem configuration that always shows the xephem control window, the xephem sky view and the xephem Jupiter view. With the auto-tiling launch script I can restore my xephem setup a single command.
The following script for the illustrated xephem display is shown below:
#!/bin/tcsh
/home/bat/rget xephem.ratw
ratpoison -c "exec xephem"
sleep 2
ratpoison -c focus
ratpoison -c "select XEphem 3.7.2"
ratpoison -c focus
ratpoison -c "select xephem Jupiter view"
ratpoison -c focus
ratpoison -c "select xephem sky view"

Notice that the script starts with my rget script, which restores a previously saved (with rput) tile arrangement. Then the script instructs ratpoison to start the xephem program. The sleep command is used to give xephem time to run so that the windows it creates will exist before the remainder of the script references them.

The focus command advances focus to the next tile. In this case, I wanted the control window of xephem to be in the next tile from the one I was in when I saved the tile arrangement. Each focus command instructs ratpoison to advance focus to the next tile, just like the cntl-t j key sequence does.
The select command instructs ratpoison to select the indicated window name for the currently focused tile. The window names are the same as those shown by the cntl-t w ratpoison command for displaying a list of opened windows.

The sequence of ratpoison -c commands shown in the illustration can be broken down into a single, merged command as follows:

ratpoison -c focus -c "select XEphem 3.7.2" -c focus -c "select xephem Jupiter view" -c focus -c "select xephem sky view"

Once you master the use of a few scripts to handle those applications that need multiple windows, you'll be able to fly with ratpoison, using about the minimum possible overhead for the X windows system.

Hopefully this whirlwind explanation will help you see how you can save and restore tile arrangements, and combine that ability with launch scripts to auto-load and arrange program windows.


Summary.
So is ratpoison what you want for your high powered desktop computer? 

Probably not. Unless -- you are a developer or high powered programmer who finds reaching for the mouse an enormous distraction.
But for my old laptop, with its minimal memory and ailing track ball mouse, ratpoison works very well. In fact, even if the tiny track ball was working perfectly, I'd likely still find ratpoison to be very handy in applications where I do mostly word processing, spell checking, programming, and similar tasks. I find that using ratpoison as my laptop default and dwm as my floating window alternative works very well. Maybe it will for at least some of your applications also.

Screenshots.








Custom Search
Adserver                   610x250
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:


0 commenti:

Post a Comment

Random Posts

Recent Posts

Recent Posts Widget

Popular Posts

Labels

Archive

page counter follow us in feedly
 
Copyright © 2014 Linuxlandit & The Conqueror Penguin
-->