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
1 changed files with 7 additions and 0 deletions

View File

@ -268,6 +268,13 @@ function viewmore(tags, screen)
capi.screen[screen]:emit_signal("tag::history::update") capi.screen[screen]:emit_signal("tag::history::update")
end 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. --- Get tag data table.
-- @param tag The Tag. -- @param tag The Tag.
-- @return The data table. -- @return The data table.