Built-in Layouts

Bsp

class libqtile.layout.Bsp(*args, **kwargs)[source]

This layout is inspired by bspwm, but it does not try to copy its features.

The first client occupies the entire screen space. When a new client is created, the selected space is partitioned in 2 and the new client occupies one of those subspaces, leaving the old client with the other.

The partition can be either horizontal or vertical according to the dimensions of the current space: if its width/height ratio is above a pre-configured value, the subspaces are created side-by-side, otherwise, they are created on top of each other. The partition direction can be freely toggled. All subspaces can be resized and clients can be shuffled around.

All clients are organized at the leaves of a full binary tree.

An example key configuration is:

Key([mod], "j", lazy.layout.down()),
Key([mod], "k", lazy.layout.up()),
Key([mod], "h", lazy.layout.left()),
Key([mod], "l", lazy.layout.right()),
Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
Key([mod, "mod1"], "j", lazy.layout.flip_down()),
Key([mod, "mod1"], "k", lazy.layout.flip_up()),
Key([mod, "mod1"], "h", lazy.layout.flip_left()),
Key([mod, "mod1"], "l", lazy.layout.flip_right()),
Key([mod, "control"], "j", lazy.layout.grow_down()),
Key([mod, "control"], "k", lazy.layout.grow_up()),
Key([mod, "control"], "h", lazy.layout.grow_left()),
Key([mod, "control"], "l", lazy.layout.grow_right()),
Key([mod, "shift"], "n", lazy.layout.normalize()),
Key([mod], "Return", lazy.layout.toggle_split()),

Configuration options

key

default

description

border_focus

'#881111'

Border colour(s) for the focused window.

border_normal

'#220000'

Border colour(s) for un-focused windows.

border_on_single

False

Draw border when there is only one window.

border_width

2

Border width.

fair

True

New clients are inserted in the shortest branch.

grow_amount

10

Amount by which to grow a window/column.

lower_right

True

New client occupies lower or right subspace.

margin

0

Margin of the layout (int or list of ints [N E S W]).

margin_on_single

None

Margin when there is only one window (int or list of ints [N E S W], 'None' to use 'margin' value).

ratio

1.6

Width/height ratio that defines the partition direction.

wrap_clients

False

Whether client list should be wrapped when using next and previous commands.

Available commands

Click to view the available commands for Bsp

Columns

class libqtile.layout.Columns(*args, **kwargs)[source]

Extension of the Stack layout.

The screen is split into columns, which can be dynamically added or removed. Each column can present its windows in 2 modes: split or stacked. In split mode, all windows are presented simultaneously, spliting the column space. In stacked mode, only a single window is presented from the stack of windows. Columns and windows can be resized and windows can be shuffled around.

This layout can also emulate wmii's default layout via:

layout.Columns(num_columns=1, insert_position=1)

Or the "Vertical", and "Max", depending on the default parameters.

An example key configuration is:

Key([mod], "j", lazy.layout.down()),
Key([mod], "k", lazy.layout.up()),
Key([mod], "h", lazy.layout.left()),
Key([mod], "l", lazy.layout.right()),
Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
Key([mod, "control"], "j", lazy.layout.grow_down()),
Key([mod, "control"], "k", lazy.layout.grow_up()),
Key([mod, "control"], "h", lazy.layout.grow_left()),
Key([mod, "control"], "l", lazy.layout.grow_right()),
Key([mod, "shift", "control"], "h", lazy.layout.swap_column_left()),
Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right()),
Key([mod], "Return", lazy.layout.toggle_split()),
Key([mod], "n", lazy.layout.normalize()),

Configuration options

key

default

description

align

1

Which side of screen new windows will be added to (one of Columns._left or Columns._right). Ignored if 'fair=True'.

border_focus

'#881111'

Border colour(s) for the focused window.

border_focus_stack

'#881111'

Border colour(s) for the focused window in stacked columns.

border_normal

'#220000'

Border colour(s) for un-focused windows.

border_normal_stack

'#220000'

Border colour(s) for un-focused windows in stacked columns.

border_on_single

False

Draw a border when there is one only window.

border_width

2

Border width.

fair

False

Add new windows to the column with least windows.

grow_amount

10

Amount by which to grow a window/column.

initial_ratio

1

Ratio of first column to second column.

insert_position

0

Position relative to the current window where new ones are inserted (0 means right above the current window, 1 means right after).

margin

0

Margin of the layout (int or list of ints [N E S W]).

margin_on_single

None

Margin when only one window. (int or list of ints [N E S W])

num_columns

2

Preferred number of columns.

single_border_width

None

Border width for single window.

split

True

New columns presentation mode.

wrap_focus_columns

True

Wrap the screen when moving focus across columns.

wrap_focus_rows

True

Wrap the screen when moving focus across rows.

wrap_focus_stacks

True

Wrap the screen when moving focus across stacked.

Available commands

Click to view the available commands for Columns

Floating

class libqtile.layout.Floating(*args, **kwargs)[source]

Floating layout, which does nothing with windows but handles focus order

Configuration options

key

default

description

border_focus

'#0000ff'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

1

Border width.

fullscreen_border_width

0

Border width for fullscreen.

max_border_width

0

Border width for maximize.

Available commands

Click to view the available commands for Floating

Matrix

class libqtile.layout.Matrix(*args, **kwargs)[source]

This layout divides the screen into a matrix of equally sized cells and places one window in each cell. The number of columns is configurable and can also be changed interactively.

Configuration options

key

default

description

border_focus

'#0000ff'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

1

Border width.

columns

2

Number of columns

margin

0

Margin of the layout (int or list of ints [N E S W])

Available commands

Click to view the available commands for Matrix

Max

class libqtile.layout.Max(*args, **kwargs)[source]

Maximized layout

A simple layout that only displays one window at a time, filling the screen_rect. This is suitable for use on laptops and other devices with small screens. Conceptually, the windows are managed as a stack, with commands to switch to next and previous windows in the stack.

Configuration options

key

default

description

border_focus

'#0000ff'

Border colour(s) for the window when focused

border_normal

'#000000'

Border colour(s) for the window when not focused

border_width

0

Border width.

margin

0

Margin of the layout (int or list of ints [N E S W])

only_focused

True

Only draw the focused window

Available commands

Click to view the available commands for Max

MonadTall

class libqtile.layout.MonadTall(*args, **kwargs)[source]

Emulate the behavior of XMonad's default tiling scheme.

Main-Pane:

A main pane that contains a single window takes up a vertical portion of the screen_rect based on the ratio setting. This ratio can be adjusted with the grow_main and shrink_main or, while the main pane is in focus, grow and shrink. You may also set the ratio directly with set_ratio.

---------------------
|            |      |
|            |      |
|            |      |
|            |      |
|            |      |
|            |      |
---------------------

Using the flip method will switch which horizontal side the main pane will occupy. The main pane is considered the "top" of the stack.

---------------------
|      |            |
|      |            |
|      |            |
|      |            |
|      |            |
|      |            |
---------------------

Secondary-panes:

Occupying the rest of the screen_rect are one or more secondary panes. The secondary panes will share the vertical space of the screen_rect however they can be resized at will with the grow and shrink methods. The other secondary panes will adjust their sizes to smoothly fill all of the space.

---------------------          ---------------------
|            |      |          |            |______|
|            |______|          |            |      |
|            |      |          |            |      |
|            |______|          |            |      |
|            |      |          |            |______|
|            |      |          |            |      |
---------------------          ---------------------

Panes can be moved with the shuffle_up and shuffle_down methods. As mentioned the main pane is considered the top of the stack; moving up is counter-clockwise and moving down is clockwise.

---------------------          ---------------------
|            |      |          |            |      |
|            |______|          |            |Focus |
|            |      |          |            |      |
|            |______|          |            |______|
|            |      |          |            |______|
|            |      |          |            |      |
---------------------          ---------------------

Setting auto_maximize will cause the focused secondary pane to be automatically maximized on focus. The non-maximized panes will shrink to the height specified by min_secondary_size.

The opposite is true if the layout is "flipped".

---------------------          ---------------------
|            |  2   |          |   2   |           |
|            |______|          |_______|           |
|            |  3   |          |   3   |           |
|     1      |______|          |_______|     1     |
|            |  4   |          |   4   |           |
|            |      |          |       |           |
---------------------          ---------------------

Normalizing/Resetting:

To restore all secondary client windows to their default size ratios use the normalize method.

To reset all client windows to their default sizes, including the primary window, use the reset method.

Maximizing:

To toggle a client window between its minimum and maximum sizes simply use the maximize on a focused client.

Suggested Bindings:

Key([modkey], "h", lazy.layout.left()),
Key([modkey], "l", lazy.layout.right()),
Key([modkey], "j", lazy.layout.down()),
Key([modkey], "k", lazy.layout.up()),
Key([modkey, "shift"], "h", lazy.layout.swap_left()),
Key([modkey, "shift"], "l", lazy.layout.swap_right()),
Key([modkey, "shift"], "j", lazy.layout.shuffle_down()),
Key([modkey, "shift"], "k", lazy.layout.shuffle_up()),
Key([modkey], "i", lazy.layout.grow()),
Key([modkey], "m", lazy.layout.shrink()),
Key([modkey], "n", lazy.layout.reset()),
Key([modkey, "shift"], "n", lazy.layout.normalize()),
Key([modkey], "o", lazy.layout.maximize()),
Key([modkey, "shift"], "s", lazy.layout.toggle_auto_maximize()),
Key([modkey, "shift"], "space", lazy.layout.flip()),

Configuration options

key

default

description

align

0

Which side master plane will be placed (one of MonadTall._left or MonadTall._right)

auto_maximize

False

Maximize secondary windows on focus.

border_focus

'#ff0000'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

2

Border width.

change_ratio

0.05

Resize ratio

change_size

20

Resize change in pixels

margin

0

Margin of the layout

max_ratio

0.75

The percent of the screen-space the master pane should occupy at maximum.

min_ratio

0.25

The percent of the screen-space the master pane should occupy at minimum.

min_secondary_size

85

minimum size in pixel for a secondary pane window

new_client_position

'after_current'

Place new windows: after_current - after the active window. before_current - before the active window, top - at the top of the stack, bottom - at the bottom of the stack,

ratio

0.5

The percent of the screen-space the master pane should occupy by default.

single_border_width

None

Border width for single window

single_margin

None

Margin size for single window

Available commands

Click to view the available commands for MonadTall

MonadThreeCol

class libqtile.layout.MonadThreeCol(*args, **kwargs)[source]

Emulate the behavior of XMonad's ThreeColumns layout.

A layout similar to tall but with three columns. With an ultra wide display this layout can be used for a huge main window - ideally at the center of the screen - and up to six reasonable sized secondary windows.

Main-Pane:

A main pane that contains a single window takes up a vertical portion of the screen_rect based on the ratio setting. This ratio can be adjusted with the grow_main and shrink_main or, while the main pane is in focus, grow and shrink. The main pane can also be centered.

---------------------------    ---------------------------
|           |      |      |    |      |           |      |
|           |      |      |    |      |           |      |
|           |      |      |    |      |           |      |
|           |      |      |    |      |           |      |
|           |      |      |    |      |           |      |
|           |      |      |    |      |           |      |
---------------------------    ---------------------------

Secondary-panes:

Occupying the rest of the screen_rect are one or more secondary panes. The secondary panes will be divided into two columns and share the vertical space of each column. However they can be resized at will with the grow and shrink methods. The other secondary panes will adjust their sizes to smoothly fill all of the space.

---------------------------    ---------------------------
|           |      |      |    |           |______|      |
|           |______|      |    |           |      |      |
|           |      |______|    |           |      |______|
|           |______|      |    |           |      |      |
|           |      |      |    |           |______|      |
|           |      |      |    |           |      |      |
---------------------------    ---------------------------

Panes can be moved with the shuffle_up and shuffle_down methods. As mentioned the main pane is considered the top of the stack; moving up is counter-clockwise and moving down is clockwise. A secondary pane can also be promoted to the main pane with the swap_main method.

Normalizing/Resetting:

To restore all secondary client windows to their default size ratios use the normalize method.

To reset all client windows to their default sizes, including the primary window, use the reset method.

Maximizing:

To maximized a client window simply use the maximize on a focused client.

Configuration options

key

default

description

align

0

Which side master plane will be placed (one of MonadTall._left or MonadTall._right)

auto_maximize

False

Maximize secondary windows on focus.

border_focus

'#ff0000'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

2

Border width.

change_ratio

0.05

Resize ratio

change_size

20

Resize change in pixels

main_centered

True

Place the main pane at the center of the screen

margin

0

Margin of the layout

max_ratio

0.75

The percent of the screen-space the master pane should occupy at maximum.

min_ratio

0.25

The percent of the screen-space the master pane should occupy at minimum.

min_secondary_size

85

minimum size in pixel for a secondary pane window

new_client_position

'top'

Place new windows: after_current - after the active window. before_current - before the active window, top - at the top of the stack, bottom - at the bottom of the stack,

ratio

0.5

The percent of the screen-space the master pane should occupy by default.

single_border_width

None

Border width for single window

single_margin

None

Margin size for single window

Available commands

Click to view the available commands for MonadThreeCol

MonadWide

class libqtile.layout.MonadWide(*args, **kwargs)[source]

Emulate the behavior of XMonad's horizontal tiling scheme.

This layout attempts to emulate the behavior of XMonad wide tiling scheme.

Main-Pane:

A main pane that contains a single window takes up a horizontal portion of the screen_rect based on the ratio setting. This ratio can be adjusted with the grow_main and shrink_main or, while the main pane is in focus, grow and shrink.

---------------------
|                   |
|                   |
|                   |
|___________________|
|                   |
|                   |
---------------------

Using the flip method will switch which vertical side the main pane will occupy. The main pane is considered the "top" of the stack.

---------------------
|                   |
|___________________|
|                   |
|                   |
|                   |
|                   |
---------------------

Secondary-panes:

Occupying the rest of the screen_rect are one or more secondary panes. The secondary panes will share the horizontal space of the screen_rect however they can be resized at will with the grow and shrink methods. The other secondary panes will adjust their sizes to smoothly fill all of the space.

---------------------          ---------------------
|                   |          |                   |
|                   |          |                   |
|                   |          |                   |
|___________________|          |___________________|
|     |       |     |          |   |           |   |
|     |       |     |          |   |           |   |
---------------------          ---------------------

Panes can be moved with the shuffle_up and shuffle_down methods. As mentioned the main pane is considered the top of the stack; moving up is counter-clockwise and moving down is clockwise.

The opposite is true if the layout is "flipped".

---------------------          ---------------------
|                   |          |  2  |   3   |  4  |
|         1         |          |_____|_______|_____|
|                   |          |                   |
|___________________|          |                   |
|     |       |     |          |        1          |
|  2  |   3   |  4  |          |                   |
---------------------          ---------------------

Normalizing/Resetting:

To restore all secondary client windows to their default size ratios use the normalize method.

To reset all client windows to their default sizes, including the primary window, use the reset method.

Maximizing:

To toggle a client window between its minimum and maximum sizes simply use the maximize on a focused client.

Suggested Bindings:

Key([modkey], "h", lazy.layout.left()),
Key([modkey], "l", lazy.layout.right()),
Key([modkey], "j", lazy.layout.down()),
Key([modkey], "k", lazy.layout.up()),
Key([modkey, "shift"], "h", lazy.layout.swap_left()),
Key([modkey, "shift"], "l", lazy.layout.swap_right()),
Key([modkey, "shift"], "j", lazy.layout.shuffle_down()),
Key([modkey, "shift"], "k", lazy.layout.shuffle_up()),
Key([modkey], "i", lazy.layout.grow()),
Key([modkey], "m", lazy.layout.shrink()),
Key([modkey], "n", lazy.layout.reset()),
Key([modkey, "shift"], "n", lazy.layout.normalize()),
Key([modkey], "o", lazy.layout.maximize()),
Key([modkey, "shift"], "space", lazy.layout.flip()),

Configuration options

key

default

description

align

0

Which side master plane will be placed (one of MonadTall._left or MonadTall._right)

auto_maximize

False

Maximize secondary windows on focus.

border_focus

'#ff0000'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

2

Border width.

change_ratio

0.05

Resize ratio

change_size

20

Resize change in pixels

margin

0

Margin of the layout

max_ratio

0.75

The percent of the screen-space the master pane should occupy at maximum.

min_ratio

0.25

The percent of the screen-space the master pane should occupy at minimum.

min_secondary_size

85

minimum size in pixel for a secondary pane window

new_client_position

'after_current'

Place new windows: after_current - after the active window. before_current - before the active window, top - at the top of the stack, bottom - at the bottom of the stack,

ratio

0.5

The percent of the screen-space the master pane should occupy by default.

single_border_width

None

Border width for single window

single_margin

None

Margin size for single window

Available commands

Click to view the available commands for MonadWide

Plasma

class libqtile.layout.Plasma(*args, **kwargs)[source]

A flexible tree-based layout.

Each tree node represents a container whose children are aligned either horizontally or vertically. Each window is attached to a leaf of the tree and takes either a calculated relative amount or a custom absolute amount of space in its parent container. Windows can be resized, rearranged and integrated into other containers.

Windows in a container will all open in the same direction. Calling lazy.layout.mode_vertical/horizontal() will insert a new container allowing windows to be added in the new direction.

You can use the Plasma widget to show which mode will apply when opening a new window based on the currently focused node.

Windows can be focused selectively by using lazy.layout.up/down/left/right() to focus the nearest window in that direction relative to the currently focused window.

"Integrating" windows is best explained with an illustation. Starting with three windows, a, b, c. b is currently focused. Calling lazy.layout.integrate_left() will have the following effect:

----------------------         ----------------------
| a    | b    | c    |         | a        | c       |
|      |      |      |         |          |         |
|      |      |      |  -->    |          |         |
|      |      |      |         |----------|         |
|      |      |      |         | b        |         |
|      |      |      |         |          |         |
|      |      |      |         |          |         |
----------------------         ----------------------

Finally, windows can me moved around the layout with lazy.layout.move_up/down/left/right().

Example keybindings:

from libqtile.config import EzKey
from libqtile.lazy import lazy
...
keymap = {
    'M-h': lazy.layout.left(),
    'M-j': lazy.layout.down(),
    'M-k': lazy.layout.up(),
    'M-l': lazy.layout.right(),
    'M-S-h': lazy.layout.move_left(),
    'M-S-j': lazy.layout.move_down(),
    'M-S-k': lazy.layout.move_up(),
    'M-S-l': lazy.layout.move_right(),
    'M-A-h': lazy.layout.integrate_left(),
    'M-A-j': lazy.layout.integrate_down(),
    'M-A-k': lazy.layout.integrate_up(),
    'M-A-l': lazy.layout.integrate_right(),
    'M-d': lazy.layout.mode_horizontal(),
    'M-v': lazy.layout.mode_vertical(),
    'M-S-d': lazy.layout.mode_horizontal_split(),
    'M-S-v': lazy.layout.mode_vertical_split(),
    'M-a': lazy.layout.grow_width(30),
    'M-x': lazy.layout.grow_width(-30),
    'M-S-a': lazy.layout.grow_height(30),
    'M-S-x': lazy.layout.grow_height(-30),
    'M-C-5': lazy.layout.size(500),
    'M-C-8': lazy.layout.size(800),
    'M-n': lazy.layout.reset_size(),
}
keys = [EzKey(k, v) for k, v in keymap.items()]

Acknowledgements: This layout was developed by numirias and published at https://github.com/numirias/qtile-plasma A few minor amendments have been made to that layout as part of incorporating this into the main qtile codebase but the majority of the work is theirs.

Configuration options

key

default

description

border_focus

'#00e891'

Focused window border color

border_focus_fixed

'#00e8dc'

Focused fixed-size window border color

border_normal

'#333333'

Unfocused window border color

border_normal_fixed

'#333333'

Unfocused fixed-size window border color

border_width

1

Border width

border_width_single

0

Border width for single window

fair

False

When False effort will be made to preserve nodes with a fixed size. Set to True to enable new windows to take more space from fixed size nodes.

margin

0

Layout margin

name

'Plasma'

Layout name

Available commands

Click to view the available commands for Plasma

RatioTile

class libqtile.layout.RatioTile(*args, **kwargs)[source]

Tries to tile all windows in the width/height ratio passed in

Configuration options

key

default

description

border_focus

'#0000ff'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

1

Border width.

fancy

False

Use a different method to calculate window sizes.

margin

0

Margin of the layout (int or list of ints [N E S W])

ratio

1.618

Ratio of the tiles

ratio_increment

0.1

Amount to increment per ratio increment

Available commands

Click to view the available commands for RatioTile

ScreenSplit

class libqtile.layout.ScreenSplit(*args, **kwargs)[source]

A layout that allows you to split the screen into separate areas, each of which can be assigned its own layout.

This layout is intended to be used on large monitors where separate layouts may be desirable. However, unlike creating virtual screens, this layout retains the full screen configuration meaning that full screen windows will continue to fill the entire screen.

Each split is defined as a dictionary with the following keys:
  • name: this is used with the ScreenSplit widget (see below)

  • rect: a tuple of (x, y, width, height) with each value being between 0 and 1. These are relative values based on the screen's dimensions e.g. a value of (0.5, 0, 0.5, 1) would define an area starting at the top middle of the screen and extending to the bottom left corner.

  • layout: the layout to occupy the defined split.

  • matches: (optional) list of Match objects which define which windows will open in the defined split.

Different splits can be selected by using the following lazy.layout.next_split() and lazy.layout.previous_split() commands.

To identify which split is active, users can use the ScreenSplit widget will show the name of the split and the relevant layout. Scrolling up and down on the widget will change the active split.

Note

While keybindings will be passed to the active split's layout, bindings using the .when(layout=...)` syntax will not be applied as the primary layout is ScreenSplit.

Configuration options

key

default

description

splits

[{'layout': <libqtile.layout.max.Max object at 0x7f250a3499c0>, 'name': 'top', 'rect': (0, 0, 1, 0.5)}, {'layout': <libqtile.layout.columns.Columns object at 0x7f250a34a320>, 'name': 'bottom', 'rect': (0, 0.5, 1, 0.5)}]

Screen splits. See documentation for details.

Available commands

Click to view the available commands for ScreenSplit

Slice

class libqtile.layout.Slice(*args, **kwargs)[source]

Slice layout

This layout cuts piece of screen_rect and places a single window on that piece, and delegates other window placement to other layout

Configuration options

key

default

description

fallback

<libqtile.layout.max.Max object at 0x7f250a349f30>

Layout to be used for the non-slice area.

match

None

Match-object describing which window(s) to move to the slice.

side

'left'

Position of the slice (left, right, top, bottom).

width

256

Slice width.

Available commands

Click to view the available commands for Slice

Spiral

class libqtile.layout.Spiral(*args, **kwargs)[source]

A mathematical layout.

Renders windows in a spiral form by splitting the screen based on a selected ratio. The direction of the split is changed every time in a defined order resulting in a spiral formation.

The main window can be sized with lazy.layout.grow_main() and lazy.layout.shrink_main(). All other windows are sized by lazy.layout.increase_ratio() and lazy.layout.decrease_ratio().

NB if main_pane_ratio is not set then it will also be adjusted according to ratio. However, as soon shrink_main() or grow_main() have been called once then the master pane will only change size following further calls to those methods.

Users are able to choose the location of the main (i.e. largest) pane and the direction of the rotation.

Some examples:

main_pane="left", clockwise=True

----------------------
|1        |2         |
|         |          |
|         |          |
|         |----------|
|         |5 |6 |3   |
|         |-----|    |
|         |4    |    |
----------------------

main_pane="top", clockwise=False

----------------------
|1                   |
|                    |
|                    |
|--------------------|
|2        |5    |4   |
|         |----------|
|         |3         |
----------------------

Configuration options

key

default

description

border_focus

'#0000ff'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_width

1

Border width.

clockwise

True

Direction of spiral

main_pane

'left'

Location of biggest window 'top', 'bottom', 'left', 'right'

main_pane_ratio

None

Ratio for biggest window or 'None' to use same ratio for all windows.

margin

0

Margin of the layout (int or list of ints [N E S W])

new_client_position

'top'

Place new windows: 'after_current' - after the active window, 'before_current' - before the active window, 'top' - in the main pane, 'bottom '- at the bottom of the stack. NB windows that are added too low in the stack may be hidden if there is no remaining space in the spiral.

ratio

0.6180469715698392

Ratio of the tiles

ratio_increment

0.1

Amount to increment per ratio increment

Available commands

Click to view the available commands for Spiral

Stack

class libqtile.layout.Stack(*args, **kwargs)[source]

A layout composed of stacks of windows

The stack layout divides the screen_rect horizontally into a set of stacks. Commands allow you to switch between stacks, to next and previous windows within a stack, and to split a stack to show all windows in the stack, or unsplit it to show only the current window.

Unlike the columns layout the number of stacks is fixed.

Configuration options

key

default

description

autosplit

False

Auto split all new stacks.

border_focus

'#0000ff'

Border colour(s) for the focused window.

border_focus_stack

None

Border colour(s) for the focused stacked window. If 'None' will default to border_focus.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_normal_stack

None

Border colour(s) for un-focused stacked windows. If 'None' will default to border_normal.

border_width

1

Border width.

fair

False

Add new windows to the stacks in a round robin way.

margin

0

Margin of the layout (int or list of ints [N E S W])

num_stacks

2

Number of stacks.

Available commands

Click to view the available commands for Stack

Tile

class libqtile.layout.Tile(*args, **kwargs)[source]

A layout with two stacks of windows dividing the screen

The Tile layout divides the screen_rect horizontally into two stacks. The maximum amount of "master" windows can be configured; surplus windows will be displayed in the slave stack on the right. Within their stacks, the windows will be tiled vertically. The windows can be rotated in their entirety by calling up() or down() or, if shift_windows is set to True, individually.

Configuration options

key

default

description

add_after_last

False

Add new clients after all the others. If this is True, it overrides add_on_top.

add_on_top

True

Add new clients before all the others, potentially pushing other windows into slave stack.

border_focus

'#0000ff'

Border colour(s) for the focused window.

border_normal

'#000000'

Border colour(s) for un-focused windows.

border_on_single

True

Whether to draw border if there is only one window.

border_width

1

Border width.

expand

True

Expand the master windows to the full screen width if no slaves are present.

margin

0

Margin of the layout (int or list of ints [N E S W])

margin_on_single

True

Whether to draw margin if there is only one window.

master_length

1

Amount of windows displayed in the master stack. Surplus windows will be moved to the slave stack.

master_match

None

A Match object defining which window(s) should be kept masters (single or a list of Match-objects).

max_ratio

0.85

Maximum width of master windows

min_ratio

0.15

Minimum width of master windows

ratio

0.618

Width-percentage of screen size reserved for master windows.

ratio_increment

0.05

By which amount to change ratio when decrease_ratio or increase_ratio are called.

shift_windows

False

Allow to shift windows within the layout. If False, the layout will be rotated instead.

Available commands

Click to view the available commands for Tile

TreeTab

class libqtile.layout.TreeTab(*args, **kwargs)[source]

Tree Tab Layout

This layout works just like Max but displays tree of the windows at the left border of the screen_rect, which allows you to overview all opened windows. It's designed to work with uzbl-browser but works with other windows too.

The panel at the left border contains sections, each of which contains windows. Initially the panel looks like flat lists inside its section, and looks like trees if some of the windows are "moved" left or right.

For example, it looks like below with two sections initially:

+------------+
|Section Foo |
+------------+
| Window A   |
+------------+
| Window B   |
+------------+
| Window C   |
+------------+
|Section Bar |
+------------+

And then it will look like below if "Window B" is moved right and "Window C" is moved right too:

+------------+
|Section Foo |
+------------+
| Window A   |
+------------+
|  Window B  |
+------------+
|   Window C |
+------------+
|Section Bar |
+------------+

Configuration options

key

default

description

active_bg

'000080'

Background color of active tab

active_fg

'ffffff'

Foreground color of active tab

bg_color

'000000'

Background color of tabs

border_width

2

Width of the border

font

'sans'

Font

fontshadow

None

font shadow color, default is None (no shadow)

fontsize

14

Font pixel size.

inactive_bg

'606060'

Background color of inactive tab

inactive_fg

'ffffff'

Foreground color of inactive tab

level_shift

8

Shift for children tabs

margin_left

6

Left margin of tab panel

margin_y

6

Vertical margin of tab panel

padding_left

6

Left padding for tabs

padding_x

6

Left padding for tab label

padding_y

2

Top padding for tab label

panel_width

150

Width of the left panel

place_right

False

Place the tab panel on the right side

previous_on_rm

False

Focus previous window on close instead of first.

section_bottom

6

Bottom margin of section

section_fg

'ffffff'

Color of section label

section_fontsize

11

Font pixel size of section label

section_left

4

Left margin of section label

section_padding

4

Bottom of margin section label

section_top

4

Top margin of section label

sections

['Default']

Titles of section instances

urgent_bg

'ff0000'

Background color of urgent tab

urgent_fg

'ffffff'

Foreground color of urgent tab

vspace

2

Space between tabs

Available commands

Click to view the available commands for TreeTab

VerticalTile

class libqtile.layout.VerticalTile(*args, **kwargs)[source]

Tiling layout that works nice on vertically mounted monitors

The available height gets divided by the number of panes, if no pane is maximized. If one pane has been maximized, the available height gets split in master and secondary area. The maximized pane (master pane) gets the full height of the master area and the other panes (secondary panes) share the remaining space. The master area (at default 75%) can grow and shrink via keybindings.

-----------------                -----------------  ---
|               |                |               |   |
|       1       |  <-- Panes     |               |   |
|               |        |       |               |   |
|---------------|        |       |               |   |
|               |        |       |               |   |
|       2       |  <-----+       |       1       |   |  Master Area
|               |        |       |               |   |
|---------------|        |       |               |   |
|               |        |       |               |   |
|       3       |  <-----+       |               |   |
|               |        |       |               |   |
|---------------|        |       |---------------|  ---
|               |        |       |       2       |   |
|       4       |  <-----+       |---------------|   |  Secondary Area
|               |                |       3       |   |
-----------------                -----------------  ---

Normal behavior.                 One maximized pane in the master area
No maximized pane.               and two secondary panes in the
No specific areas.               secondary area.
-----------------------------------  In some cases, VerticalTile can be
|                                 |  useful on horizontal mounted
|                1                |  monitors too.
|                                 |  For example, if you want to have a
|---------------------------------|  web browser and a shell below it.
|                                 |
|                2                |
|                                 |
-----------------------------------

Suggested keybindings:

Key([modkey], 'j', lazy.layout.down()),
Key([modkey], 'k', lazy.layout.up()),
Key([modkey], 'Tab', lazy.layout.next()),
Key([modkey, 'shift'], 'Tab', lazy.layout.next()),
Key([modkey, 'shift'], 'j', lazy.layout.shuffle_down()),
Key([modkey, 'shift'], 'k', lazy.layout.shuffle_up()),
Key([modkey], 'm', lazy.layout.maximize()),
Key([modkey], 'n', lazy.layout.normalize()),

Configuration options

key

default

description

border_focus

'#FF0000'

Border color(s) for the focused window.

border_normal

'#FFFFFF'

Border color(s) for un-focused windows.

border_width

1

Border width.

margin

0

Border margin (int or list of ints [N E S W]).

single_border_width

None

Border width for single window.

single_margin

None

Margin for single window.

Available commands

Click to view the available commands for VerticalTile

Zoomy

class libqtile.layout.Zoomy(*args, **kwargs)[source]

A layout with single active windows, and few other previews at the right

Configuration options

key

default

description

columnwidth

150

Width of the right column

margin

0

Margin of the layout (int or list of ints [N E S W])

property_big

'1.0'

Property value to set on normal window (X11 only)

property_name

'ZOOM'

Property to set on zoomed window (X11 only)

property_small

'0.1'

Property value to set on zoomed window (X11 only)

Available commands

Click to view the available commands for Zoomy