]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

dynamic tagging: move_tag added
authorluke bonham <dadasignificanulla@gmail.com>
Sat, 28 Sep 2013 11:05:05 +0000 (13:05 +0200)
committercopycat-killer <dada@archlinux.info>
Wed, 5 Aug 2015 11:30:30 +0000 (13:30 +0200)
util/init.lua

index 06db0d4bc0acc8c00b8c5f30d0a2df1dc4e1deb0..e380cbbf1f8a42a52ded8b14eaf83715128f5db3 100644 (file)
@@ -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()