简体   繁体   English

真棒WM-应用程序的全屏模式,无需全屏显示

[英]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. 例如,我想在全屏模式下在Web浏览器上观看视频以隐藏除视频之外的浏览器/网站的所有其他栏/内容,但我想保留自己的显示布局以同时查看其他应用程序。

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. 这是正常的awful.rules All clients which do not match the rule are handled normally by awful.ewmh.geometry . 所有不符合规则的客户端通常由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 . 然后使用回调函数function() no_fullscreen = not no_fullscreen end添加键绑定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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