Backend core objects¶
The backend core is the link between the Qtile objects (windows, layouts, groups etc.) and the specific backend (X11 or Wayland). This core should be largely invisible to users and, as a result, these objects do not expose many commands.
Nevertheless, both backends do contain important commands, notably set_keymap
on X11 and
change_vt
used to change to a different TTY on Wayland.
The backend core has no access to other nodes on the command graph.
![strict digraph core {
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="SlateBlue", fillcolor="SlateBlue1", href="backend.html", style="filled", label="core", fontname="bold"];
core;
node [pos="1.56,1.24!", color="Gray", fillcolor="Gray", href="groups.html", style="filled", label="group", fontname="regular"];
group;
node [pos="1.94,-0.44!", color="Gray", fillcolor="Gray", href="layouts.html", style="filled", label="layout", fontname="regular"];
layout;
node [pos="0.86,-1.8!", color="Gray", fillcolor="Gray", 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="Gray", fillcolor="Gray", 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 [color="Gray", dir="both"];
group -> window [color="Gray", dir="both"];
group -> screen [color="Gray", 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"];
}](../../../_images/graphviz-86b0ae22d64e5bfd4c442789d2874c99f807c956.png)
X11 backend¶
- class libqtile.backend.x11.core.Core[source]¶
API commands
To access commands on this object via the command graph, use one of the following options:
lazy.core.<command>()
qtile cmd-obj -o core -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
function
(function, *args, **kwargs)Call a function with current object as argument
info
()Get basic information about the running backend.
items
(name)Build a list of contained items for the given item class.
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.
- function(function, *args, **kwargs) None ¶
Call a function with current object as argument
- 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
Wayland backend¶
- class libqtile.backend.wayland.core.Core[source]¶
API commands
To access commands on this object via the command graph, use one of the following options:
lazy.core.<command>()
qtile cmd-obj -o core -f <command>
The following commands are available for this object:
change_vt
(vt)Change virtual terminal to that specified
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
function
(function, *args, **kwargs)Call a function with current object as argument
Get information on all input devices.
Hide the cursor.
info
()Get basic information about the running backend.
items
(name)Build a list of contained items for the given item class.
Get IDs of all mapped windows in ascending Z order.
set_keymap
([layout, options, variant])Set the keymap for the current keyboard.
Unhide the cursor.
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.
- function(function, *args, **kwargs) None ¶
Call a function with current object as argument
- 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
- set_keymap(layout: str | None = None, options: str | None = None, variant: str | None = None) None [source]¶
Set the keymap for the current keyboard.
The options correspond to xkbcommon configuration environmental variables and if not specified are taken from the environment. Acceptable values are strings identical to those accepted by the env variables.