awful.tag: add viewtoggle function

Helper function to toggle tag selection whilst updating history.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
koniu 2009-08-27 16:16:56 +01:00 committed by Julien Danjou
parent 529502ffbf
commit 8ff69e3529

View file

@ -268,6 +268,13 @@ function viewmore(tags, screen)
capi.screen[screen]:emit_signal("tag::history::update")
end
--- Toggle selection of a tag
-- @param tag Tag to be toggled
function viewtoggle(t)
t.selected = not t.selected
capi.screen[t.screen]:emit_signal("tag::history::update")
end
--- Get tag data table.
-- @param tag The Tag.
-- @return The data table.