Picture-in-Picture video

390 Views Asked by At

So, I have been using Opera as my main browser just because of preference, but I want to come away from it and go to another browser, probably chromium because my job works with websites and Opera isn't the greatest.

My most loved feature of Opera is the pop-out video feature. As seen by the screen shot below of Opera 65.0.3467.62 on my Arch Linux running suckless DWM.

enter image description here

My problem is the newer versions of chromium use a different method for this video pop-out. Above is Opera 65, but if I update to after, it becomes a new window (screen shot below). You can see that my DWM can see it as a new window seen by a title in top 'Picture-in-Picture'.

enter image description here

Just as another screenshot, here is my Chromium doing the same thing.

enter image description here

static const Rule rules[] = {
    /* xprop(1):
     *  WM_CLASS(STRING) = instance, class
     *  WM_NAME(STRING) = title
     */
    /* class      instance    title       tags mask     isfloating   monitor */
    { "Gimp",     NULL,       NULL,       0,            1,           -1 },
    { "Picture-in-picture",     NULL,       NULL,       0,            1,           -1 },
    { "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
};

I presume there are a couple of ways to fix this, either a patch for the browser to prevent it from becoming a new window, or a new line in my DWM config, possibly in rules. I did try that above, but my problem is, I have no clue how to do this, or revert the pop-out video to an old version. Can anyone help me?

1

There are 1 best solutions below

1
On
static const Rule rules[] = {
        /* xprop(1):
         *      WM_CLASS(STRING) = instance, class
         *      WM_NAME(STRING) = title
         */
        /* class      instance    title       tags mask     isfloating   monitor */
        { "Gimp",     NULL,       NULL,       0,            1,           -1 },
        { NULL,       NULL,     "Picture-in-picture",       ~0,            1,           -1 },
        { "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
};

So, I did a bit of testing using the rules, the line in the middle is what I used. Title, for the pop-out video title, tag mask ~0 for all the tags and isFloating to 1 to float it.

I think I will stick with this method, and use DWM default keybinds.

MOD+LMB = Move floating window

MOD+RMB = Resize floating window