diff --git a/awesomerc.lua.in b/awesomerc.lua.in index ce120651..5ac4bde6 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -193,6 +193,7 @@ keybinding.new({ modkey, "Shift" }, "k", function () awful.client.swap(-1) end): keybinding.new({ modkey, "Control" }, "j", function () awful.screen.focus(1) end):add() keybinding.new({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end):add() keybinding.new({ modkey, "Control" }, "space", awful.client.togglefloating):add() +keybinding.new({ modkey, "Control" }, "Return", function () client.focus_get():swap(awful.client.master()) end):add() keybinding.new({ modkey }, "o", awful.client.movetoscreen):add() -- Layout manipulation diff --git a/awful.lua b/awful.lua index 510ffd7d..3b1f40cb 100644 --- a/awful.lua +++ b/awful.lua @@ -96,6 +96,10 @@ local function client_swap(i) end end +local function client_master() + return client.visible_get(mouse.screen_get())[1] +end + -- Move/resize a client relativ to current coordinates. local function client_moveresize(x, y, w, h) local sel = client.focus_get() @@ -590,6 +594,7 @@ P.client = next = client_next; focus = client_focus; swap = client_swap; + master = client_master; movetotag = client_movetotag; toggletag = client_toggletag; togglefloating = client_togglefloating;