summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-02-25 17:58:31 +0100
committerAnton Khirnov <anton@khirnov.net>2021-02-25 17:58:31 +0100
commit3bb50dbe15800900945f92e39f0721f5d6632b60 (patch)
treec965d599a95b5e7258af5a0c6feb9a7dd94b29d9
parentdd00d675da87040fe6660fc07c86817b2fa50d51 (diff)
bindings: try to preserve the screen during various moves
-rw-r--r--bindings.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/bindings.lua b/bindings.lua
index 5c32d05..1959d9e 100644
--- a/bindings.lua
+++ b/bindings.lua
@@ -94,14 +94,18 @@ function M.create(workspace)
function ()
if client.focus then
local c = client.focus
+ local s = c.screen
workspace:client_move_relative(c, 1)
+ timer.delayed_call(awful.screen.focus, s)
end
end),
awful.key({ modkey, "Shift" }, "k",
function ()
if client.focus then
local c = client.focus
+ local s = c.screen
workspace:client_move_relative(c, -1)
+ timer.delayed_call(awful.screen.focus, s)
end
end),
@@ -178,7 +182,9 @@ function M.create(workspace)
function ()
if client.focus then
local c = client.focus
- workspace:move_client(c, workspace.screen_state[c.screen].desktop_idx, i)
+ local s = c.screen
+ workspace:move_client(c, workspace.screen_state[s].desktop_idx, i)
+ timer.delayed_call(awful.screen.focus, s)
end
end))
end
@@ -217,9 +223,11 @@ function M.create(workspace)
function ()
if client.focus then
local c = client.focus
+ local s = c.screen
local desk = workspace.desktops[i]
local page_idx = desk:find_empty_page() or 1
workspace:move_client(c, i, page_idx)
+ timer.delayed_call(awful.screen.focus, s)
end
end))
end