That feels like something that we could potentially expose as a command so 
that you could then do something like "lazy.window.centre()".

On Monday, 6 December 2021 at 16:43:36 UTC [email protected] wrote:

> 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/ecb2ab9a-7e06-4d20-9efe-7a8c1b67f183n%40googlegroups.com.

Reply via email to