From de7bfa4adef64618d69301245b172dbd9430e1f2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 8 Apr 2020 17:48:47 +0200 Subject: bindings: bind Shift+qwe move clients to specific screen --- bindings.lua | 3 +++ utils.lua | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bindings.lua b/bindings.lua index 73226ca..0379525 100644 --- a/bindings.lua +++ b/bindings.lua @@ -148,6 +148,9 @@ function M.create(workspace) awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), awful.key({ modkey, }, "o", function (c) c:move_to_screen() end), + awful.key({ modkey, "Shift" }, "q", function( c) c:move_to_screen(utils.screen_physical(1)) end), + awful.key({ modkey, "Shift" }, "w", function( c) c:move_to_screen(utils.screen_physical(2)) end), + awful.key({ modkey, "Shift" }, "e", function( c) c:move_to_screen(utils.screen_physical(3)) end), awful.key({ modkey, }, "m", function (c) c.maximized_horizontal = not c.maximized_horizontal diff --git a/utils.lua b/utils.lua index ebb1995..77f2b54 100644 --- a/utils.lua +++ b/utils.lua @@ -4,7 +4,7 @@ local awful = require("awful") -- mapping from logical screen indices to indices corresponding to their -- physical layout -local function screen_physical(n) +function M.screen_physical(n) local function screen_cmp(s1, s2) return s1.geometry.x < s2.geometry.x end @@ -23,7 +23,7 @@ local function screen_physical(n) end function M.screen_focus_physical(n) - local s = screen_physical(n) + local s = M.screen_physical(n) if s then awful.screen.focus(s) end -- cgit v1.2.3