diff --git a/qtile/.config/qtile/config.py b/qtile/.config/qtile/config.py index 1143fbe..8cf639c 100644 --- a/qtile/.config/qtile/config.py +++ b/qtile/.config/qtile/config.py @@ -27,9 +27,11 @@ from libqtile.config import Key, Screen, Group, Drag, Click, ScratchPad, DropDown from libqtile.command import lazy from libqtile import layout, bar, widget, extension, hook +from libqtile.log_utils import logger from os.path import expanduser from subprocess import call + from typing import List # noqa: F401 wmname = "???" @@ -244,27 +246,15 @@ main = None follow_mouse_focus = True bring_front_click = False cursor_warp = False -floating_layout = layout.Floating( - float_rules=[ - {"wmclass": "confirm"}, - {"wmclass": "dialog"}, - {"wmclass": "download"}, - {"wmclass": "error"}, - {"wmclass": "file_progress"}, - {"wmclass": "notification"}, - {"wmclass": "splash"}, - {"wmclass": "toolbar"}, - {"wmclass": "confirmreset"}, # gitk - {"wmclass": "makebranch"}, # gitk - {"wmclass": "maketag"}, # gitk - {"wname": "branchdialog"}, # gitk - {"wname": "pinentry"}, # GPG key password entry - {"wmclass": "ssh-askpass"}, # ssh-askpass - ] -) auto_fullscreen = True focus_on_window_activation = "smart" +@hook.subscribe.client_new +def floating_dialogs(window): + dialog = window.window.get_wm_type() == 'dialog' + transient = window.window.get_wm_transient_for() + if dialog or transient: + window.floating = True @hook.subscribe.startup_once def autostart():