From 7122465e3660104871f4ca20042b50a2631db9e7 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Mon, 11 Sep 2023 22:23:06 +0100 Subject: Revised hook that disables float on libreoffice windows except their floating windows --- .config/qtile/hooks.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.config/qtile') diff --git a/.config/qtile/hooks.py b/.config/qtile/hooks.py index 295c265..98308ae 100644 --- a/.config/qtile/hooks.py +++ b/.config/qtile/hooks.py @@ -80,3 +80,14 @@ def repos(window): if window.get_wm_class() and 'mpv' in window.get_wm_class(): window.floating = True window.place(1200, 650, 640, 360, 2, "#ffffff") + +# If 'libreoffice' opens toggle floating off + + +@hook.subscribe.client_new +def libreoffice(window): + wm_class = window.get_wm_class() + if wm_class is None: + wm_class = [] + if [x for x in wm_class if x.startswith("libreoffice")]: + window.disable_floating() -- cgit v1.2.3