From 7b99cab243b2c0b5b670d2dc1a372d63c6309674 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 7 Jul 2012 14:36:09 +0200 Subject: [PATCH] tags: swap tags when the target tag is another screen --- rc/tags.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rc/tags.lua b/rc/tags.lua index 634215d..0cb17a1 100644 --- a/rc/tags.lua +++ b/rc/tags.lua @@ -28,6 +28,14 @@ for i = 1, #tags do function () local t = tags[i] if t.screen ~= mouse.screen then + if t.selected then + -- This tag is selected on another screen, let's swap + local currents = awful.tag.selectedlist(mouse.screen) + for _,current in pairs(currents) do + sharetags.tag_move(current, t.screen) + end + awful.tag.viewmore(currents, t.screen) + end sharetags.tag_move(t, mouse.screen) end awful.tag.viewonly(tags[i])