Yeah, there is. It's have to be a custom function (though one that
could/should be added to core qtile).

Basically, you'll need to:
- get the coordinates/dimension of the current window
- calculate the center of the screen,
- get the dimensions of the current window
- calculate the required displacement (note that window position is based
on one of the corners of the window. I believe top left, but don't quote me
on it)
- move the currently active window to move it to the center of the current
screen. Should be a method of the active window.

Unfortunately I don't remember the actual commands for doing everything
above. One of these days I'll actually make a video/write up about how I
hack in qtile so I can just point to that.

Regardless, if you have any questions on the above, let me know.

On Sat, Dec 4, 2021, 15:40 David Budzynski <[email protected]>
wrote:

> Is there a way to assign a key binding so a floating window goes to the
> center of the screen?
>
> --
> You received this message because you are subscribed to the Google Groups
> "qtile-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/qtile-dev/ec547e3f-d2b7-40f9-8bf4-96331061b455n%40googlegroups.com
> <https://groups.google.com/d/msgid/qtile-dev/ec547e3f-d2b7-40f9-8bf4-96331061b455n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/CAHErDQgY0tAk5H98SP58jck15dVkZdq2ts3i9vPJttu99nhnhQ%40mail.gmail.com.

Reply via email to