Luakit and Awesome WM – Make YouTube Fullscreen Work

awesomebrowser

I'm running Arch Linux on my box. I use the awesome window manager, which is a tiling WM, but allows floating windows too.

The ArchWiki's Awesome entry tells me to put the following in my awesome rc.lua to make youtube's fullscreen floating by default:

{ rule = { instance = "plugin-container" },
  properties = { floating = true } },

Yet this doesn't seem to be working. I've tried the rule they suggested for the chromium browser and this worked, which is leading me too believe that the approach is correct.

I'm guessing that the "plugin-container" is not the correct specifier for the browser I'm am using: luakit.

So here's the question: what is the correct instance specifier to make luakit youtube videos be recognized by the awesome rules?

Best Answer

It's a bit tricky:

You're right "plugin-container" looks quite like firefox.

Unfortunately you cannot distinguish the newly spawned yt-client by "instance" since it's simply an empty string, which matches more clients than you want.

I have found another way: The "class" property of that client is "Luakit" instead of "luakit" for normal luakit-clients. So a corresponding rule could look like this:

{ rule = { class = "Luakit" },
   properties = { floating = true } },

But that distinction seems likely to be changed in the future.

You could find out more about the properties of the clients by adding the following code to your rc.lua

mytimer=timer{timeout=2}
mytimer:add_signal("timeout",
        function () for i,c in ipairs(client.get(mouse.screen)) do
                        if c:tags()[mouse.screen]== awful.tag.selected(mouse.screen) then
                                naughty.notify({title=c.class,text=c.role})
                                naughty.notify({title=c.class,text=c.instance})
                                end
                    end
        end)
mytimer:start()
Related Question