bindings: don't move apps to other screen when there is none

This commit is contained in:
Vincent Bernat 2013-04-20 22:29:03 +02:00
parent 0403154128
commit 8d39eb9c83
2 changed files with 2 additions and 0 deletions

View file

@ -235,6 +235,7 @@ config.keys.client = awful.util.table.join(
"Close"), "Close"),
awful.key({ modkey, }, "o", awful.key({ modkey, }, "o",
function (c) function (c)
if screen.count() == 1 then return nil end
local s = awful.util.cycle(screen.count(), c.screen + 1) local s = awful.util.cycle(screen.count(), c.screen + 1)
if awful.tag.selected(s) then if awful.tag.selected(s) then
c.screen = s c.screen = s

View file

@ -94,6 +94,7 @@ config.keys.global = awful.util.table.join(
awful.key({ modkey }, "Right", awful.tag.viewnext, "View next tag"), awful.key({ modkey }, "Right", awful.tag.viewnext, "View next tag"),
awful.key({ modkey, "Shift"}, "o", awful.key({ modkey, "Shift"}, "o",
function() function()
if screen.count() == 1 then return nil end
local t = awful.tag.selected() local t = awful.tag.selected()
local s = awful.util.cycle(screen.count(), t.screen + 1) local s = awful.util.cycle(screen.count(), t.screen + 1)
awful.tag.history.restore() awful.tag.history.restore()