启动客户端时,应全屏启动。我尝试使用规则来配置它,但无论我做什么,客户端都不会覆盖wibox。
到目前为止我所拥有的:
function set_fullscreen(c)
mywibox[c.screen].ontop = false
c.fullscreen = false
c.fullscreen = true
c.x = 0
c.y = 0
mywibox[c.screen].ontop = false
c.fullscreen = false
c.fullscreen = true
c.x = 0
c.y = 0
end
awful.rules.rules = {
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "<name>" },
properties = { fullscreen = true,
size_hints_honor = false,
focus = true },
callback = set_fullscreen }
}
我的底部有wibox,应用程序涂在wibox上方。它也会在屏幕上方画出,这是wibox的大小。该应用程序似乎具有正确的大小,但wibox似乎在阻碍。
当我为应用程序切换全屏时,当它已经运行时,全屏按预期工作。该应用程序确实覆盖了wibox。
function toggle_fullscreen(c)
c.fullscreen = not c.fullscreen
end
我还有一个信号处理程序,当焦点客户端的全屏属性发生变化时,它会切换到wibox的ontop:
client.connect_signal("property::fullscreen", function (c)
if c.fullscreen and c == client.focus then
mywibox[c.screen].ontop = false
else
mywibox[c.screen].ontop = true
end
end)
我所做的一切似乎都不是全屏启动应用程序,我总是需要手动切换。有谁知道我做错了什么?
答案 0 :(得分:0)
client.connect_signal("property::fullscreen", function (c)
if c.fullscreen and c == client.focus then
mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
else
mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
end
end)
为我工作。
答案 1 :(得分:0)
这应该有所帮助:
<table id="my-table">