-- Mod+Shift_{E/D}: move window to next/prev screen
awful.key(k_mc, "Right", function()
- local s = mouse.screen + 1
- while s > screen.count() do s = s - screen.count() end
- client.focus.screen = s
+ client.focus.screen = awful.util.cycle(screen.count(), mouse.screen + 1)
end),
awful.key(k_mc, "Left", function()
- local s = mouse.screen - 1
- while s < 1 do s = s + screen.count() end
- client.focus.screen = s
+ client.focus.screen = awful.util.cycle(screen.count(), mouse.screen - 1)
end),