]> 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:

fix moving tags between screens
authormartin f. krafft <madduck@madduck.net>
Sun, 22 Dec 2024 16:44:07 +0000 (17:44 +0100)
committermartin f. krafft <madduck@madduck.net>
Thu, 17 Apr 2025 08:49:21 +0000 (10:49 +0200)
.config/awesome/rc.lua

index ec9eb190a56a1bee2aa8e47f9d8f2a8cdaeee829..8ff8a127d1fb243ce00aa65445239892dfbc21f9 100644 (file)
@@ -696,11 +696,16 @@ local function toggle_tag_by_name(tagname, exclusive)
 end
 
 local function move_tags_to_screen_relative(direction)
-       local s = awful.screen.focused()
-       for _, tag in ipairs(s.selected_tags) do
-               print("index: " .. s.index .. " count: " .. screen:count())
-               tag.screen = screen[(s.index + screen:count() + direction) % screen.count()]
-       end
+    local s = awful.screen.focused()
+    local ts = screen:count() - (s.index + direction) % screen:count()
+    for _,tag in ipairs(s.selected_tags) do
+        print("index: " .. s.index .. " count: " .. screen:count() .. " target: " .. ts)
+        tag.screen = screen[ts]
+
+        for _,t in ipairs(tag.screen.tags) do
+            t.selected = (tag == t)
+        end
+    end
 end
 
 globalkeys = gears.table.join(