Built-in Hooks¶
-
subscribe.
client_managed
(func)¶ Called after Qtile starts managing a new client
That is, after a window is assigned to a group, or when a window is made static. This hook is not called for internal windows.
Arguments:
window.Window object
-
subscribe.
client_state_changed
(func)¶ Called whenever client state changes
-
subscribe.
startup_once
(func)¶ Called when Qtile has initialized, exactly once (i.e. not on each lazy.restart()).
-
subscribe.
layout_change
(func)¶ Called on layout change
-
subscribe.
client_urgent_hint_changed
(func)¶ Called when the client urgent hint changes
-
subscribe.
group_window_add
(func)¶ Called when a new window is added to a group
-
subscribe.
setgroup
(func)¶ Called when group is changed
-
subscribe.
float_change
(func)¶ Called when a change in float state is made
-
subscribe.
window_name_change
(func)¶ Called whenever a windows name changes
-
subscribe.
current_screen_change
(func)¶ Called when the current screen (i.e. the screen with focus) changes
No arguments.
-
subscribe.
selection_change
(func)¶ Called on selection chance
-
subscribe.
client_mouse_enter
(func)¶ Called when the mouse enters a client
-
subscribe.
client_new
(func)¶ Called before Qtile starts managing a new client
Use this hook to declare windows static, or add them to a group on startup. This hook is not called for internal windows.
Arguments:
window.Window objectExamples
def func(c): if c.name == "xterm": c.togroup("a") elif c.name == "dzen": c.static(0) libqtile.hook.subscribe.client_new(func)
-
subscribe.
addgroup
(func)¶ Called when group is added
-
subscribe.
selection_notify
(func)¶ Called on selection notify
-
subscribe.
screen_change
(func)¶ Called when a screen is added or screen configuration is changed (via xrandr)
The hook should take two arguments: the root qtile object and the
xproto.randr.ScreenChangeNotify
event. Common usage is simply to callqtile.cmd_restart()
on each event (to restart qtile when there is a new monitor):Example:
def restart_on_randr(qtile, ev): qtile.cmd_restart()
-
subscribe.
client_killed
(func)¶ Called after a client has been unmanaged.
Arguments:
window.Window object of the killed window.
-
subscribe.
changegroup
(func)¶ Called whenever a group change occurs
-
subscribe.
client_type_changed
(func)¶ Called whenever window type changes
-
subscribe.
delgroup
(func)¶ Called when group is deleted
-
subscribe.
startup
(func)¶ Called each time qtile is started (including the first time qtile starts)
-
subscribe.
client_focus
(func)¶ Called whenever focus changes
- Arguments:
- window.Window object of the new focus.
-
subscribe.
client_name_updated
(func)¶ Called when the client name changes
-
subscribe.
focus_change
(func)¶ Called when focus is changed
-
subscribe.
net_wm_icon_change
(func)¶ Called on _NET_WM_ICON chance