Group objects

Groups are Qtile's workspaces. Groups are not responsible for the positioning of windows (that is handled by the layouts) so the available commands are somewhat more limited in scope.

Groups have access to the layouts in that group, the windows in the group and the screen displaying the group.

strict digraph group {
bgcolor="transparent"
node [pos="0,0!", color="Gray", fillcolor="Gray", href="root.html", style="filled", label="root", fontname="regular"];
root;

node [pos="-1.94,-0.44!", color="Gray", fillcolor="Gray", href="bars.html", style="filled", label="bar", fontname="regular"];
bar;

node [pos="-1.56,1.24!", color="Gray", fillcolor="Gray", href="backend.html", style="filled", label="core", fontname="regular"];
core;

node [pos="1.56,1.24!", color="OrangeRed", fillcolor="Orange", href="groups.html", style="filled", label="group", fontname="bold"];
group;

node [pos="1.94,-0.44!", color="Goldenrod", fillcolor="Gold", href="layouts.html", style="filled", label="layout", fontname="regular"];
layout;

node [pos="0.86,-1.8!", color="DarkGreen", fillcolor="LimeGreen", href="screens.html", style="filled", label="screen", fontname="regular"];
screen;

node [pos="-0.86,-1.8!", color="Gray", fillcolor="Gray", href="widgets.html", style="filled", label="widget", fontname="regular"];
widget;

node [pos="0,2!", color="Red", fillcolor="Tomato", href="windows.html", style="filled", label="window", fontname="regular"];
window;

root -> bar [color="Gray"];
root -> group [color="Gray"];
root -> layout [color="Gray"];
root -> screen [color="Gray"];
root -> widget [color="Gray"];
root -> window [color="Gray"];
root -> core [color="Gray"];
bar -> screen [color="Gray", dir="both"];
bar -> widget [color="Gray", dir="both"];
group -> layout [dir="both"];
group -> window [dir="both"];
group -> screen [dir="both"];
layout -> window [color="Gray", dir="both"];
layout -> screen [color="Gray", dir="both"];
screen -> window [color="Gray", dir="both"];
screen -> widget [color="Gray", dir="both"];
}

class libqtile.group._Group[source]

API commands

To access commands on this object via the command graph, use one of the following options:

lazy.group.<command>()

qtile cmd-obj -o group -f <command>

The following commands are available for this object:

commands()

Returns a list of possible commands for this object

doc(name)

Returns the documentation for a specified command name

eval(code)

Evaluates code in the same context as this function

focus_back()

Focus the window that had focus before the current one got it.

focus_by_index(index)

Change to the window at the specified index in the current group.

focus_by_name(name)

Focus the first window with the given name.

function(function, *args, **kwargs)

Call a function with current object as argument

info()

Returns a dictionary of info for this group

info_by_name(name)

Get the info for the first window with the given name without giving it focus.

items(name)

Build a list of contained items for the given item class.

next_window()

Focus the next window in group.

prev_window()

Focus the previous window in group.

set_label(label)

Set the display name of current group to be used in GroupBox widget.

setlayout(layout)

swap_window_order(new_location)

Change the order of the current window within the current group.

switch_groups(name)

Switch position of current group with name

toscreen([screen, toggle])

Pull a group to a specified screen.

unminimize_all()

Unminimise all windows in this group

Command documentation

commands() list[str]

Returns a list of possible commands for this object

Used by __qsh__ for command completion and online help

doc(name) str

Returns the documentation for a specified command name

Used by __qsh__ to provide online help.

eval(code: str) tuple[bool, str | None]

Evaluates code in the same context as this function

Return value is tuple (success, result), success being a boolean and result being a string representing the return value of eval, or None if exec was used instead.

focus_back()[source]

Focus the window that had focus before the current one got it.

Repeated calls to this function would basically continuously switch between the last two focused windows. Do nothing if less than 2 windows ever received focus.

focus_by_index(index: int) None[source]

Change to the window at the specified index in the current group.

focus_by_name(name)[source]

Focus the first window with the given name. Do nothing if the name is not found.

function(function, *args, **kwargs) None

Call a function with current object as argument

info()[source]

Returns a dictionary of info for this group

info_by_name(name)[source]

Get the info for the first window with the given name without giving it focus. Do nothing if the name is not found.

items(name: str) tuple[bool, list[str | int] | None]

Build a list of contained items for the given item class.

Exposing this allows __qsh__ to navigate the command graph.

Returns a tuple (root, items) for the specified item class, where:

root: True if this class accepts a "naked" specification without an item seletion (e.g. "layout" defaults to current layout), and False if it does not (e.g. no default "widget").

items: a list of contained items

next_window()[source]

Focus the next window in group.

Method cycles _all_ windows in group regardless if tiled in current layout or floating. Cycling of tiled and floating windows is not mixed. The cycling order depends on the current Layout.

prev_window()[source]

Focus the previous window in group.

Method cycles _all_ windows in group regardless if tiled in current layout or floating. Cycling of tiled and floating windows is not mixed. The cycling order depends on the current Layout.

set_label(label)[source]

Set the display name of current group to be used in GroupBox widget. If label is None, the name of the group is used as display name. If label is the empty string, the group is invisible in GroupBox.

setlayout(layout)[source]
swap_window_order(new_location: int) None[source]

Change the order of the current window within the current group.

switch_groups(name)[source]

Switch position of current group with name

toscreen(screen=None, toggle=False)[source]

Pull a group to a specified screen.

Parameters:
screen

Screen offset. If not specified, we assume the current screen.

toggle

If this group is already on the screen, then the group is toggled with last used

Examples

Pull group to the current screen:

toscreen()

Pull group to screen 0:

toscreen(0)
unminimize_all()[source]

Unminimise all windows in this group