Bar objects

The bar is primarily used to display widgets on the screen. As a result, the bar does not need many of its own commands.

To select a bar on the command graph, you must use a selector (as there is no default bar). The selector is the position of the bar on the screen i.e. "top", "bottom", "left" or "right".

The bar can access the screen it's on and the widgets it contains via the command graph.

strict digraph bar {
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="Purple", fillcolor="Violet", href="bars.html", style="filled", label="bar", fontname="bold"];
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="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="DarkGreen", fillcolor="LimeGreen", href="screens.html", style="filled", label="screen", fontname="regular"];
screen;

node [pos="-0.86,-1.8!", color="Blue", fillcolor="LightBlue", 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 [dir="both"];
bar -> widget [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"];
}
class libqtile.bar.Bar[source]

API commands

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

lazy.bar["position"].<command>()

qtile cmd-obj -o bar position -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

fake_button_press(screen, position, x, y[, ...])

Fake a mouse-button-press on the bar.

function(function, *args, **kwargs)

Call a function with current object as argument

info()

Info for this object.

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.

fake_button_press(screen: int, position: str, x: int, y: int, button: int = 1) None[source]

Fake a mouse-button-press on the bar. Co-ordinates are relative to the top-left corner of the bar.

Parameters:
widgets

A list of widget objects.

size

The "thickness" of the bar, i.e. the height of a horizontal bar, or the width of a vertical bar.

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

Call a function with current object as argument

info() dict[str, Any][source]

Info for this object.

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