Skip to content

Commit

Permalink
Centre windows matching float rules
Browse files Browse the repository at this point in the history
When we float windows matching the user's `float_rules`, let's make sure
the window is centred in the screen.
  • Loading branch information
elParaguayo committed Jun 15, 2024
1 parent 1c6634d commit 9b33c37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libqtile/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def add(self, win, focus=True, force=False):
win._float_state = FloatStates.FULLSCREEN
elif self.floating_layout.match(win) and not win.fullscreen:
win._float_state = FloatStates.FLOATING
win.center()
if self.qtile.config.floats_kept_above:
win.keep_above(enable=True)
if win.floating and not win.fullscreen:
Expand Down

0 comments on commit 9b33c37

Please sign in to comment.