aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2023-09-11 22:23:06 +0100
committerJustine Smithies <justine@smithies.me.uk>2023-09-11 22:23:06 +0100
commit7122465e3660104871f4ca20042b50a2631db9e7 (patch)
treee9805ba41ad622b81587fc4df9a769216fb16806
parenta3ded28b7095b6b34d0a2d61f95a788803b071c9 (diff)
Revised hook that disables float on libreoffice windows except their floating windows
-rw-r--r--.config/qtile/hooks.py11
1 files changed, 11 insertions, 0 deletions
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()