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.
- 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
(x, y[, button])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(x: int, y: int, button: int = 1) None [source]
Fake a mouse-button-press on the bar. Coordinates are relative to the top-left corner of the bar.
- Parameters:
- x
X coordinate of the mouse button press.
- y
Y coordinate of the mouse button press.
- button:
Mouse button, for more details, see Mouse events.
- function(function, *args, **kwargs) Task | 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