Window Manager – How to Set Awesome’s Wibox Visible Only for Certain Tags

awesomewindow-manager

I'd like to have special wiboxes for certain tags like multimedia, development. I couldn't find any option in wibox for that.

I think it can be done using some event handlers and show/hide it manually, but isn't it implemented in some module and if not what's the best way to do it?

Best Answer

I don't know about any ready-to-use modules, but I built something like that with event handlers. First you initialize your wibox as usual. Then make it invisible:

your_wibox.visible = false

Then add the signal handler for showing it to the tag(s) on which it should be visible:

your_tag:add_signal("property:selected", function(tag)
        your_wibox.visible = tag.selected
end)

This triggers, whenever the selected property of the tag changes, so the wibox' visibility changes with the visibility of the tag.

I don't think, that putting that into a module could make it much shorter.

Related Question