i3: Starting mpv from ranger on different workspace

907 Views Asked by At

I would like to configure my i3wm and ranger file manager in such a way that when I choose a movie in ranger, it opens video in mpv on workspace 10 in fullscreen. The problem is that everything works fine without --fs (fullscreen option on mpv), but when I add the --fs flag, i3 doesn't move mpv to workspace 10 and it opens wherever ranger is.

In .i3/config:

assign [class="mpv"] $ws10

In .config/ranger/rifle.conf:

mime ^video|audio, has mpv, X, flag f = mpv --fs -- "$@"

Why is fullscreen so problematic? Is there any solution to this?

1

There are 1 best solutions below

0
On

I applied your settings: assign [class="mpv"] $ws10 and mime ^video|audio, has mpv, X, flag f = mpv --fs -- "$@". When I open a video file in ranger, mpv opens video in fullscreen mode in ws10. Actually, your settings work well on my machine :)

Since --fs is the problem for you, I would suggest to remove --fs in .config/ranger/rifle.conf: mime ^video|audio, has mpv, X, flag f = mpv -- "$@"

And then, use fullscreen mode from i3wm: assign [class="mpv"] $ws10 for_window [class="mpv"] fullscreen

Hope this alternative could solve your problem.