【发布时间】:2018-02-17 19:27:28
【问题描述】:
我在水平线上有三台显示器。有时我想通过按组合键一次将一个窗口最大化到三个监视器(然后在必要时将其全部返回)。我该怎么做?
【问题讨论】:
标签: multiple-monitors awesome-wm
我在水平线上有三台显示器。有时我想通过按组合键一次将一个窗口最大化到三个监视器(然后在必要时将其全部返回)。我该怎么做?
【问题讨论】:
标签: multiple-monitors awesome-wm
未经测试,但基本思想是使窗口浮动并调整其大小以覆盖所有内容:
function(c)
c.floating = true
local geo = screen[1].geometry
geo.x2 = geo.x + geo.width
geo.y2 = geo.y + geo.height
for s in screen do
local geo2 = s.geometry
geo.x = math.min(geo.x, geo2.x)
geo.y = math.min(geo.y, geo2.y)
geo.x2 = math.max(geo.x2, geo2.x + geo2.width)
geo.y2 = math.max(geo.y2, geo2.y + geo2.height)
end
c:geometry{
x = geo.x,
y = geo.y,
width = geo.x2 - geo.x,
height = geo.y2 - geo.y
}
end
要撤消上述操作,请使客户端不再浮动,即c.floating = false。
将以上内容连接到键绑定留给读者作为练习。
【讨论】: