From: luke bonham Date: Sat, 28 Sep 2013 11:05:05 +0000 (+0200) Subject: dynamic tagging: move_tag added X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/d97e816e0f613ccbcf20e28ebf0a967e93702824 dynamic tagging: move_tag added --- 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()