From 8ff69e3529cb6c98566301b74f45c14ff0187519 Mon Sep 17 00:00:00 2001 From: koniu Date: Thu, 27 Aug 2009 16:16:56 +0100 Subject: [PATCH] awful.tag: add viewtoggle function Helper function to toggle tag selection whilst updating history. Signed-off-by: koniu Signed-off-by: Julien Danjou --- lib/awful/tag.lua.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in index dc6f96286..009619468 100644 --- a/lib/awful/tag.lua.in +++ b/lib/awful/tag.lua.in @@ -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.