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

陌路散爱 提交于 2020-07-19 08:58:27

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!