qtile: add exceptions rules to disable floating

This commit is contained in:
Guilherme Rugai Freire 2021-08-06 08:05:41 -03:00
parent 5cbb508a72
commit a0d0a1cc50
No known key found for this signature in database
GPG Key ID: 0F9FE41723A8A297

View File

@ -352,6 +352,18 @@ floating_layout = layout.Floating(
Match(wm_class="gnome-calendar"), # Calendar
]
)
# Exceptions rules to disable floating in default config
@hook.subscribe.client_new
def disable_floating(window):
rules = [
Match(wm_class="mpv")
]
if any(window.match(rule) for rule in rules):
window.togroup(qtile.current_group.name)
window.cmd_disable_floating()
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True