问题
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 !
回答1:
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
.
来源:https://stackoverflow.com/questions/44571965/awesome-wm-applications-fullscreen-mode-without-taking-whole-screen