4

i'm looking for a way to let applications using their own fullscreen mode but without resizing their own windows.

For example, i want to watch a video on a web browser in fullscreen mode to hide all other bars/content of the browser/website except the video but i want to keep my display layout to see other apps at the same time.

Any ideas? Thanks !

mewTl8
  • 41
  • 1
  • 2
  • How can you have a fullscreen app but still see other apps at the same time? – Camusensei Jun 16 '17 at 08:09
  • It's not real fullscreen, I'm looking for a way to hide the interface, for example when you use the fullscreen button on a youtube video it hides everything of the firefox windows except the video and set the windows in fullscreen. I aim to ignore second part. – mewTl8 Jun 16 '17 at 19:36

1 Answers1

4

I did not test the following, but it might work. The idea of the rule is that it is used to detect which windows should not be fullscreend. It is a normal awful.rules-rule. All clients which do not match the rule are handled normally by awful.ewmh.geometry.

local rule = { class = "Firefox" }
client.disconnect_signal("request::geometry", awful.ewmh.geometry)
client.connect_signal("request::geometry", function(c, context, ...)
    if context ~= "fullscreen" or not awful.rules.match(c, rule) then
        awful.ewmh.geometry(c, context, ...)
    end
end)

Edit: To toggle this behaviour I suggest the following:

local no_fullscreen = true
local rule = { class = "Firefox" }
client.disconnect_signal("request::geometry", awful.ewmh.geometry)
client.connect_signal("request::geometry", function(c, context, ...)
    if not no_fullscreen or context ~= "fullscreen" or not awful.rules.match(c, rule) then
        awful.ewmh.geometry(c, context, ...)
    end
end)

Then add a key binding with callback function function() no_fullscreen = not no_fullscreen end.

Uli Schlachter
  • 9,337
  • 1
  • 23
  • 39
  • It works fine but i can't resize/move the "fullscreen client" anymore. Any thoughts? – mewTl8 Jun 16 '17 at 19:24
  • You mean "also cannot resize the fullscreen client when it is not fullscreen", right? See my edit, the code should now only ignore requests when the "context" is "fullscreen". If you mean "cannot resize while fullscreen", then that assumption is buried so deep in the code that it cannot easily be disabled. – Uli Schlachter Jun 18 '17 at 07:00
  • Cool! I really like this. Follow-up question: How can I toggle that behaviour? Sometimes I'd still like Firefox to go really full screen. – Andreas Jun 19 '17 at 12:48
  • Sure, just add another condition to the `if`. See my edit. – Uli Schlachter Jun 19 '17 at 19:05
  • I see, thanks. My question would be needless, if Firefox respected the max.fullscreen layout. Hence my (off-topic) next question: How can I make Firefox respect the max.fullscreen layout or is that just me? – Andreas Jun 20 '17 at 13:09
  • Uhm... Run `xprop _NET_WM_STATE` in a terminal and click on Firefox. Does it say anything helpful? Is Firefox perhaps made Floating? Dunno. – Uli Schlachter Sep 09 '18 at 08:29
  • This is what I'm looking for but the window is not tiled anymore, any suggestions ? – kronolynx Oct 21 '20 at 09:37