From 4e7c1d7ad2cfe755dd9b381dbdc45147a70e0628 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 22 Dec 2024 17:44:07 +0100 Subject: [PATCH 1/1] fix moving tags between screens --- .config/awesome/rc.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index ec9eb19..8ff8a12 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -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( -- 2.39.5