From 8867d417fce527dce7155fb18b26e2ab9a269c6c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 26 Oct 2021 18:55:55 +0200 Subject: bindings: factor out shifting current client up/down --- workspace.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'workspace.lua') diff --git a/workspace.lua b/workspace.lua index 654b118..db9973a 100644 --- a/workspace.lua +++ b/workspace.lua @@ -179,6 +179,15 @@ function Workspace:swap_screens(phys_idx) end end +function Workspace:shift_cur_client(dir) + if client.focus then + local c = client.focus + local s = c.screen + self:client_move_relative(c, dir) + timer.delayed_call(awful.screen.focus, s) + end +end + function Workspace:new(layouts) local o = setmetatable({}, self) self.__index = self -- cgit v1.2.3