문제

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

도움이 되었습니까?

해결책

You were close to the correct way:

screen[1]:connect_signal("tag::history::update", function()
       mytagbox.text = awful.tag.selected(1).name
end)

-- Or add_signal on awesome < 3.5

So mytagbox.text will be changing on each tags switching.

다른 팁

Another solution would be to change filter function on taglist

mytaglist[s] = awful.widget.taglist(s, function(t, args) return t.selected end, mytaglist.buttons)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top