Go to the first, previous, next, last section, table of contents.


panes Extension Module

The panes mixins provide an alternative method of managing windows. Rather than wrapping each window in a frame which is manipulated to manipulate the window, windows are placed in "panes", and the only thing the user can do to windows in a pane is circulate through them. When a window is placed in a pane, it will be resized to the largest size that it can handle which will fit in that pane. However, panes can be split into two parts at whatever fraction of the full pane the user chooses, so that panes can be created with nearly arbitrary geometry. Panes do not overlap, and every pixel on the screen is in a pane.

See `examples/plpwm.py' for an example of using panes to build a window manager.

Class: Pane

Method: Pane add_window ( client )

Adds the clients window to the current pane. It will become the top window in the pane. If the current top window in the pane has focus, the new top window will get focus.

Method: Pane iconify_window ( )

Iconifies the panes active window.

Method: Pane force_window ( )

Resize the window again. This actually resizes the window down then back up, and is useful if the application doesn't realize how big the window really is. This is most often seen in programs started in an xterm by the xterm command.

Method: Pane next_window ( )

Make the next window associated with this pane the top window.

Method: Pane prev_window ( )

Make the previous window associated with this pane the top window. When a window is added to a pane, the window that was the top window becomes the previous window.

Method: Pane horizontal_split ( fraction = .5 )

Split the current pane into two halves horizontally. The new pane will get fraction of the current panes height at the bottom of the current pane, and will become the active pane.

Method: Pane vertical_split ( fraction = .5 )

Split the current pane into two halves vertically. The new pane will get fraction of the current panes width at the right of the current pane, and will become the active pane.

Method: Pane maximize ( )

Make the current pane occupy the entire screen, removing all other panes.

Filter: panelfilter ( pane )

True if the client is in the given pane.

WindowManager Mixin: panesManager

The panesManager mixin adds panes and pane manipulation to the window manager.

Instance Variable: panesManager panes_list

The list of panes managed by this windowmanager.

Instance Variable: panesManager panes_current

The index of the pane containing the currently active window, also known as the active pane.

Instance Variable: panesManager panes_window_gravity

The gravity to be used for normal windows in this pane.

Instance Variable: panesManager panes_maxsize_gravity

The gravity to be used for windows with maxsize hints in this pane.

Instance Variable: panesManager panes_transient_gravity

The gravity to be used for transient windows in this pane.

Method: panesManager panes_goto ( index )

Make the pane at index in panes_list the active pane.

Method: panesManager panes_activate ( pane )

Make pane the active pane.

Method: panesManager panes_next ( )

Make the next pane in the list the active pane. If the last pane is the active pane, make pane 0 the active pane.

Method: panesManager panes_prev ( )

Make the previous pane in the list the active pane. If pane 0 was active, make the last pane in the list active.

Method: panesManager panes_number ( number )

Rearrange panes_list so that the active pane is pane number. This is done by exchanging the list positions of pane number and pane panes_current.

Method: panesManager panes_save ( )

Save the state of all clients by building a dictionary of which pane they are associated with.

Method: panesManager panes_restore ( )

Put all clients back in the pane they were in when panes_save was last invoked, if possible. If the pane doesn't exist or is on a different screen from the window, the restore isn't possible.

Screen Mixin: panesScreen

This mixin causes the first pane to be created on each screen being managed. It has no variables or methods useful to the user, but you must mix it into your screen class if you want to use panes.

Client Mixin: panesClient

This mixin passes client events to the pane that the client's window is associated with. It has no variables or methods useful to the user, but you must mix it into your client class if you want to use panes.


Go to the first, previous, next, last section, table of contents.