如何在awesome wm中检索当前标签名称?
我希望用一个仅显示当前标签名称的简单文本框替换很棒的 WM 中的标签列表。我尝试创建一个包含以下代码的文本框:
mytagbox = widget({ type = "textbox" })
mytagbox.text = awful.tag.selected(s).getproperty("name")
但这不起作用,并且将 Awesome 恢复为其默认配置。我需要输入什么正确的代码才能实现这一点?我也在用 Shifty。谢谢
I am looking to replace the tag list in awesome WM with a simple text box that only displays the name of the current tag. I have tried to create a textbox that contains the following code:
mytagbox = widget({ type = "textbox" })
mytagbox.text = awful.tag.selected(s).getproperty("name")
But this does not work and reverts awesome to its default config. What is the correct code I need to put in to make this possible? I'm also using Shifty. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您已经接近正确的方法:
因此
mytagbox.text
将在每次标签切换时发生变化。You were close to the correct way:
So
mytagbox.text
will be changing on each tags switching.另一个解决方案是更改标签列表上的过滤功能
Another solution would be to change filter function on taglist