From 7ab34da1e4e7846b02841461b8fc6c11f4fbf3ff Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sat, 28 Sep 2013 13:05:05 +0200 Subject: [PATCH] dynamic tagging: move_tag added --- util/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util/init.lua b/util/init.lua index 06db0d4..e380cbb 100644 --- a/util/init.lua +++ b/util/init.lua @@ -191,6 +191,18 @@ function util.rename_tag(mypromptbox) end) end +-- Move current tag +-- pos in {-1, 1} <-> {previous, next} tag position +function util.move_tag(pos) + local tag = awful.tag.selected(mouse.screen) + local idx = awful.tag.getidx(tag) + if tonumber(pos) <= -1 then + awful.tag.move(idx - 1, tag) + else + awful.tag.move(idx + 1, tag) + end +end + -- Delete current tag (if empty) -- Any rule set on the tag shall be broken function util.remove_tag()