Next: Window Classes, Up: Windows
The following are commands used to manipulate windows.
This jumps you to window n where n is the window number as shown in the Program Bar. You can do the same trick with C-n too. To select no window, blanking the current frame, type `select -'.
This displays the Program Bar which displays the windows you currently have running. The number before each window name is used to jump to that window. You can do this by typing C-t n where n is the number of the window. Note that only windows with numbers from 0 to 9 can be referenced using this keystroke. To reach windows with numbers greater than 9, use C-t ' and type the number at the prompt.
After 5 seconds the Program Bar disappears.
This command is bound to C-t w by default.
When invoked from the command-line like this,
$ ratpoison -c windowsInstead of a message bar, you will get a list of the windows printed to stdout. This allows you to write more advanced scripts than simple keyboard macros. This is where fmt comes into play. If windows is given an argument it treats it as the format string as described in set winfmt.
Rename the currently active window. This name will remain for the duration of the window's life, unless you change it again. By default, the C-t A keystroke is bound to this command.
This toggles between the current window and the last window. By default, this is bound to C-t C-t.
This jumps you to the previous window in the window list. By default, this is bound to C-t p.
This jumps you to the next window in the window list. This one is bound to three keystrokes, namely C-t n, C-t space, and C-t enter.
This destroys the current window. Normally you should only need to use delete, but just in case you need to rip the heart out of a misbehaving window this command should do the trick. Also available as C-t K.
Display information about the current window. At optional fmt argument can be passed to override the default format. info accepts the same format options as windows.
Change the gravity of the current window. A normal window will default to the top-left corner of the screen, but it can also be placed at the bottom-right corner of the screen. Valid values for g are the 8 directions `northwest', `north', `northeast', `east', `southeast', `south', `southwest' and `west', clockwise from the top left corner. `center' will center the window in the frame. g and can be abbreviated to the standard compass 1 and 2 letter abbreviations (i.e. `nw', `s', etc).
When called with no arguments, the current setting is returned.
Set the default window format for the info command. See set winfmt for accepted format characters.
Set rat warping. By default this variable is set (
1
) and ratpoison saves the position of the rat when leaving a window and when the user returns to the window the rat's position is restored. If you find this counter-intuitive, set this variable to0
.When called with no arguments, the current setting is returned.
There are three resources ratpoison can get a window's name from: the WMNAME hint, the res_name from the WMCLASS hint, or the res_class from the WMCLASS hint. name can be `title' which is what most window managers put in the title bar, `name' which is the res_name, or `class' which is the res_class.
When called with no arguments, the current setting is returned.
Set the default gravity for normal windows. See the gravity command.
When called with no arguments, the current setting is returned.
The window list can be displayed in a row or a column. setting can be `row' or `column'.
Set the default window format for the windows command. By default it is `%n%s%t'. The following is a list of valid format characters:
- `%a'
- Application Name
- `%c'
- Resource Class
- `%f'
- The frame number the window is displayed in or a space if it is not in a frame.
- `%g'
- The window's gravity setting
- `%h'
- The window's height
- `%H'
- The window's height increment hint.
- `%i'
- X11 Window ID
- `%l'
- A unique number based on when the window was last accessed. The higher the number, the more recently it was accessed.
- `%n'
- The window number
- `%p'
- Process ID ('?' if _NET_WM_PID isn't set)
- `%s'
- Window status (current window, last window, etc)
- `%S'
- The window's screen
- `%t'
- Window Name
- `%T'
- Whether the window is a transient or not.
- `%M'
- Whether the window is a maxsize window or not.
- `%w'
- The window's width
- `%W'
- The window's width increment hint
- `%x'
- the window's xrandr screen
Additionally there can be a number between the percent sign and the format character, denoting a maximum length this value is to truncate to, e.g. `%n%s%20t'.
When called with no arguments, the current setting is returned.
Set a window's number to n. If another window occupies the requested number already, then the windows' numbers are swapped.
The second argument, target, is optional. It should be the number of the window whose number will be changed. If target is omitted ratpoison defaults to the current window.
Set the default alignment for transient windows. See the gravity command.
When called with no arguments, the current setting is returned.
Set the default alignment for windows with maxsize hints. See the gravity command.
When called with no arguments, the current setting is returned.