简体   繁体   中英

Awesome WM - Application's fullscreen mode without taking whole screen

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 !

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM