Qtile: remove broken floating_types client_new hook #5

Open
opened 2026-07-17 22:36:52 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-07-17 22:36:52 +00:00 (Migrated from github.com)

Evidence

The supplied Qtile log contains 38 failures from the set_floating hook:

NameError: name 'floating_types' is not defined. Did you mean: 'floating_layout'?

The current config contains:

@hook.subscribe.client_new
def set_floating(window):
    if (window.window.get_wm_transient_for()
            or window.window.get_wm_type() in floating_types):
        window.floating = True

No floating_types value is defined anywhere in the active config.

Root cause

This stale hook duplicates responsibility already handled by the configured floating_layout, which includes Qtile's default float rules plus the repository's custom Match(...) rules.

Affected files:

  • .config/qtile/qtile.org — source of truth
  • .config/qtile/config.py — tangled output

Documented fix

Remove the entire set_floating hook and keep floating behavior in one place:

floating_layout = layout.Floating(
    float_rules=[
        *layout.Floating.default_float_rules,
        # existing custom Match rules
    ],
    fullscreen_border_width=0,
    border_width=0,
)

This avoids maintaining a second, undefined list of window types and prevents every new client from executing a broken callback.

If a window type is not covered after removing the hook, add a specific Match(...) rule to floating_layout.float_rules rather than restoring a global floating_types hook.

Apply the change in qtile.org, then tangle config.py.

Acceptance criteria

  • Opening applications no longer logs floating_types NameError failures.
  • Pinentry, confirmation dialogs, notifications, and the existing custom matched windows still float.
  • Floating rules exist only in floating_layout.
  • The tangled config.py matches qtile.org.
## Evidence The supplied Qtile log contains 38 failures from the `set_floating` hook: ```text NameError: name 'floating_types' is not defined. Did you mean: 'floating_layout'? ``` The current config contains: ```python @hook.subscribe.client_new def set_floating(window): if (window.window.get_wm_transient_for() or window.window.get_wm_type() in floating_types): window.floating = True ``` No `floating_types` value is defined anywhere in the active config. ## Root cause This stale hook duplicates responsibility already handled by the configured `floating_layout`, which includes Qtile's default float rules plus the repository's custom `Match(...)` rules. Affected files: - `.config/qtile/qtile.org` — source of truth - `.config/qtile/config.py` — tangled output ## Documented fix Remove the entire `set_floating` hook and keep floating behavior in one place: ```python floating_layout = layout.Floating( float_rules=[ *layout.Floating.default_float_rules, # existing custom Match rules ], fullscreen_border_width=0, border_width=0, ) ``` This avoids maintaining a second, undefined list of window types and prevents every new client from executing a broken callback. If a window type is not covered after removing the hook, add a specific `Match(...)` rule to `floating_layout.float_rules` rather than restoring a global `floating_types` hook. Apply the change in `qtile.org`, then tangle `config.py`. ## Acceptance criteria - Opening applications no longer logs `floating_types` `NameError` failures. - Pinentry, confirmation dialogs, notifications, and the existing custom matched windows still float. - Floating rules exist only in `floating_layout`. - The tangled `config.py` matches `qtile.org`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/dotfiles#5
No description provided.