From: martin f. krafft Date: Sun, 22 Dec 2024 16:44:07 +0000 (+0100) Subject: fix moving tags between screens X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/4e7c1d7ad2cfe755dd9b381dbdc45147a70e0628?ds=sidebyside;hp=cc10afdabdcdd24844e5bdca1f766e622b18b761 fix moving tags between screens --- 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(