我想在按下组合键时显示一个很棒的 wibox,例如,我希望这个 wibox 在 3 秒后消失。我不想使用 naughty 或 popup,因为 wibox 里面会有小部件。
我已经有一个解决方案,但我不知道这个解决方案是标准解决方案还是有其他方法可以做到这一点:
function taglist_wibox_show_hide(box)
local show = timer({ timeout = 0 })
show:connect_signal("timeout", function ()
print("show")
box.visible=true
show:stop() end)
show:start()
local hide = timer({ timeout = 2 })
hide:connect_signal("timeout", function ()
print("hide")
box.visible=false
hide:stop() end)
hide:start()
end
然后我添加这个快捷方式:
awful.key({ modkey, "Control" },"y",function()
taglist_wibox_show_hide(box[mouse.screen])
end),