Domanda

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

È stato utile?

Soluzione

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.

Altri suggerimenti

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)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top