dynamic tagging: move_tag added

This commit is contained in:
luke bonham 2013-09-28 13:05:05 +02:00
parent 4b2bb0b413
commit d97e816e0f
1 changed files with 12 additions and 0 deletions

View File

@ -191,6 +191,18 @@ function util.rename_tag(mypromptbox)
end) end)
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) -- Delete current tag (if empty)
-- Any rule set on the tag shall be broken -- Any rule set on the tag shall be broken
function util.remove_tag() function util.remove_tag()