diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-04-08 17:48:47 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-04-08 17:49:07 +0200 |
commit | de7bfa4adef64618d69301245b172dbd9430e1f2 (patch) | |
tree | b2296bbe34b34a254cb9ae3c71f1050267027cc0 | |
parent | 15372f7dcfc027cd5bf767584de0e826cc876612 (diff) |
bindings: bind Shift+qwe move clients to specific screen
-rw-r--r-- | bindings.lua | 3 | ||||
-rw-r--r-- | 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 @@ -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 |