真棒WM-应用程序的全屏模式,无需全屏显示 [英] Awesome WM - Application's fullscreen mode without taking whole screen

查看:101
本文介绍了真棒WM-应用程序的全屏模式,无需全屏显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法,让应用程序使用其自己的全屏模式,但不调整其窗口大小.

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

例如,我想以全屏模式在Web浏览器上观看视频,以隐藏浏览器/网站上除视频之外的所有其他栏/内容,但我想保持自己的显示布局以同时查看其他应用程序

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 !

推荐答案

我没有测试以下内容,但它可能有效.该规则的思想是用于检测哪些窗口不应该全屏显示.这是一个正常的awful.rules规则.所有不符合规则的客户端均由awful.ewmh.geometry正常处理.

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)

要切换此行为,我建议以下内容:

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)

然后使用回调函数function() no_fullscreen = not no_fullscreen end添加键绑定.

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

这篇关于真棒WM-应用程序的全屏模式,无需全屏显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆