A group is a container for a bunch of windows,
analogous to workspaces in other window managers. Each
client window managed by the window manager belongs to
exactly one group. The
groups config file variable
should be initialized to a list of
DGroup objects provide several options for group configuration. Groups can
be configured to show and hide themselves when they’re not empty, spawn
applications for them when they start, automatically acquire certain groups,
and various other options.
Match(title=None, wm_class=None, role=None, wm_type=None, wm_instance_class=None, net_wm_pid=None)¶
Match for dynamic groups It can match by title, class or role.
__init__(title=None, wm_class=None, role=None, wm_type=None, wm_instance_class=None, net_wm_pid=None)¶
Matchsupports both regular expression objects (i.e. the result of
re.compile()) or strings (match as a “include” match). If a window matches any of the things in any of the lists, it is considered a match.
- title – things to match against the title (WM_NAME)
- wm_class – things to match against the second string in WM_CLASS atom
- role – things to match against the WM_ROLE atom
- wm_type – things to match against the WM_TYPE atom
- wm_instance_class – things to match against the first string in WM_CLASS atom
- net_wm_pid – things to match against the _NET_WM_PID atom (only int allowed in this rule)
Group(name, matches=None, exclusive=False, spawn=None, layout=None, layouts=None, persist=True, init=True, layout_opts=None, screen_affinity=None, position=9223372036854775807)¶
Represents a “dynamic” group. These groups can spawn apps, only allow certain Matched windows to be on them, hide when they’re not in use, etc.
__init__(name, matches=None, exclusive=False, spawn=None, layout=None, layouts=None, persist=True, init=True, layout_opts=None, screen_affinity=None, position=9223372036854775807)¶
- name (string) – the name of this group
- matches (default
None) – list of
Matchobjects whose windows will be assigned to this group
- exclusive (boolean) – when other apps are started in this group, should we allow them here or not?
- spawn (string or list of strings) – this will be
exec()d when the group is created, you can pass either a program name or a list of programs to
- layout (string) – the default layout for this group (e.g. ‘max’ or ‘stack’)
- layouts (list) – the group layouts list overriding global layouts
- persist (boolean) – should this group stay alive with no member windows?
- init (boolean) – is this group alive when qtile starts?
- position (int) – group position
Bind keys to mod+group position or to the keys specified as second argument.
from libqtile.config import Group, Match groups = [ Group("a"), Group("b"), Group("c", matches=[Match(wm_class=["Firefox"])]), ] # allow mod3+1 through mod3+0 to bind to groups; if you bind your groups # by hand in your config, you don't need to do this. from libqtile.dgroups import simple_key_binder dgroups_key_binder = simple_key_binder("mod3")