From 8d39eb9c83a56fb1524367a8899a307ec5493940 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 20 Apr 2013 22:29:03 +0200 Subject: [PATCH] bindings: don't move apps to other screen when there is none --- rc/bindings.lua | 1 + rc/tags.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/rc/bindings.lua b/rc/bindings.lua index 65d91b4..b188703 100644 --- a/rc/bindings.lua +++ b/rc/bindings.lua @@ -235,6 +235,7 @@ config.keys.client = awful.util.table.join( "Close"), awful.key({ modkey, }, "o", function (c) + if screen.count() == 1 then return nil end local s = awful.util.cycle(screen.count(), c.screen + 1) if awful.tag.selected(s) then c.screen = s diff --git a/rc/tags.lua b/rc/tags.lua index f089f1a..5352c6e 100644 --- a/rc/tags.lua +++ b/rc/tags.lua @@ -94,6 +94,7 @@ config.keys.global = awful.util.table.join( awful.key({ modkey }, "Right", awful.tag.viewnext, "View next tag"), awful.key({ modkey, "Shift"}, "o", function() + if screen.count() == 1 then return nil end local t = awful.tag.selected() local s = awful.util.cycle(screen.count(), t.screen + 1) awful.tag.history.restore()