screens configuration variable is where the physical screens, their
bars, and the
widgets contained within the bars are defined.
See Built-in Widgets for a listing of available widgets.
Tying together screens, bars and widgets, we get something like this:
from libqtile.config import Screen from libqtile import bar, widget screens = [ Screen( bottom=bar.Bar([ widget.GroupBox(), widget.WindowName() ], 30), ), Screen( bottom=bar.Bar([ widget.GroupBox(), widget.WindowName() ], 30), ) ]
Bars support both solid background colors and gradients by supplying a list of
colors that make up a linear gradient. For example,
background="#000000") will give you a black back ground (the default), while
bar.Bar(..., background=["#000000", "#FFFFFF"]) will give you a
background that fades from black to white.
There might be some reasons to use third-party bars. For instance you can come from another window manager and you have already configured dzen2, xmobar, or something else. They definitely can be used with Qtile too. In fact, any additional configurations aren’t needed. Just run the bar and qtile will adapt.
Screen(top=None, bottom=None, left=None, right=None, x=None, y=None, width=None, height=None)¶
A physical screen, and its associated paraphernalia.
Define a screen with a given set of Bars of a specific geometry. Note that bar.Bar objects can only be placed at the top or the bottom of the screen (bar.Gap objects can be placed anywhere). Also,
heightaren’t specified usually unless you are using ‘fake screens’.
top: List of Gap/Bar objects, or None.
bottom: List of Gap/Bar objects, or None.
left: List of Gap/Bar objects, or None.
right: List of Gap/Bar objects, or None.
x : int or None
y : int or None
width : int or None
height : int or None
Bar(widgets, size, **config)¶
A bar, which can contain widgets
A list of widget objects.
The “thickness” of the bar, i.e. the height of a horizontal bar, or the width of a vertical bar.
key default description
Bar window opacity.
A gap placed along one of the edges of the screen
If a gap has been defined, Qtile will avoid covering it with windows. The most probable reason for configuring a gap is to make space for a third-party bar or other static window.
The “thickness” of the gap, i.e. the height of a horizontal gap, or the width of a vertical gap.