mpv pushed back to tiling
i am trying to make mpv always float, it starts off in floating mode in monadtall but gets pushed back into tiled when maximazed/minimized ,i have been going through the issues and found alot of similar problems but no fix, is there some workaround to minimize and maximize and for the floating window to return as floating?
https://pastebin.com/3qYFb33B
Did you find a solution? Or was it a non-problem? Please help future readers. :)

no its a non problem but still looking-around for a solution for mpv to stay floating when minimized/maximized
Can you try #2179? I think it may fix this.
i have no idea how to patch qtile but it looks like its just like in dwm, il give it a try
Just follow the steps to install from sources, but run this right before the pip install .:
git checkout -b ramnes-handle-paspect master
git pull https://github.com/ramnes/qtile.git handle-paspect
Just follow the steps to install from sources, but run this right before the
pip install .:git checkout -b ramnes-handle-paspect master git pull https://github.com/ramnes/qtile.git handle-paspect
is there a workaround without instaling from source like in this?#1260
Not really, there isn't any hook available for what we're doing there, yet.
Not really, there isn't any hook available for what we're doing there, yet.
ok well i got it installed just cant get the xsession working for some reason but then i found the executable in .local/bin for some reason eh i should have it fixed by tomorrow i appreciate your help man
I still have this issue in Qtile 0.21.0, can anyone confirm? Are there any workarounds to have mpv always as floating?
I think the solution may have been putting no-keepaspect-window in your mpv config
I think the solution may have been putting
no-keepaspect-windowin your mpv config
Many thanks for the answer. I may have missed something, but using no-keepaspect-window makes mpv tiled by default for me, while I want the opposite, i.e., mpv should always be floating. Without this option mpv starts as floating (what I want) but then reverts to tiled when making the player window fullscreen and then non-fullscreen.
I've also tried to add Match(wm_class="mpv"), to my float_rules but to no avail.
If there is no solution at the moment, maybe this issue could be re-opened to keep track of this problem?
Did you try both the Match and the mpv.conf option together? This somewhat surprising behaviour is likely a similar to the issue described here: https://github.com/qtile/qtile/issues/2901, which is due to mpv updating its state and hitting some kind of float/tile rule. That said I'm not sure what would make it tile... we don't have a tile_rules. But yep let's re-open this until we get it sorted!
Yes, I've tried all sorts of combinations:
-
*layout.Floating.default_float_rules,Match(wm_class="mpv")andno-keepaspect-window: mpv starts as floating, toggling fullscreen => tiled. -
*layout.Floating.default_float_rules, andno-keepaspect-window: mpv starts as tiled, toggling fullscreen => tiled. -
Match(wm_class="mpv")without the other two: mpv starts as floating, toggling fullscreen => tiled.
FWIW, I have the same problem with VLC and MPlayer. I didn't have this issue with i3 (or xmonad if I remember correctly).
As a workaround, this seems to work:
@hook.subscribe.float_change
def float_mpv():
window = qtile.current_window
wm_class = window.get_wm_class()
if wm_class and "mpv" in wm_class:
window.floating = True
window.cmd_center()
However, it has another issue - cmd_center doesn't seem to work correctly for my second monitor (the window always becomes centered on my left monitor). This is on X11. I can file a separate issue for this if it's not the intended behavior (unless I made a mistake in my code).
EDIT: Quick workaround for the issue with cmd_center before I head to bed...
Replace window.cmd_center() above with the following:
screen = window.group.screen
x = screen.x + (screen.width - window.width) // 2
y = screen.y + (screen.height - window.height) // 2
window.place(
x,
y,
window.width,
window.height,
window.borderwidth,
window.bordercolor,
above=True,
respect_hints=True,
)
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
I'm still affected by this bug (qtile 0.22.1), so I think it would be good to keep track of the issue.
I'm affected by this bug too, along with #2901.
Seems related if not identical to #2415