在客户端移动到 Awesome WM 中的新标签后,如何继续关注客户端?



如何使Awesome的窗口(客户端(移动行为与DWM的ViewonTag补丁类似

跟随窗口到要移动到的标签。

修补程序20210312防止在移动窗口时跟踪该窗口到";所有";标签

我应该在这里写什么代码?

awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
---   ???????? ---
---   How to follow the client window? ---
end
end
end,
{description = "move focused client to tag #"..i, group = "tag"}),

经过多次尝试,我解决了这个问题。但是我不知道为什么它需要声明变量screentag2。为什么不能使用tag:view_only()

-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
local screen = awful.screen.focused()
local tag2 = screen.tags[i]
tag2:view_only()
end
end
end,
{ description = "move focused client to tag #"..i, group = "tag" }
),

最新更新