[awful] Add client.movetoscreen()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4af0791499
commit
ce44489bf2
|
@ -158,6 +158,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" }, "j", function () awful.screen.focus(1) end):add()
|
||||||
keybinding.new({ modkey, "Control" }, "k", 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" }, "space", awful.client.togglefloating):add()
|
||||||
|
keybinding.new({ modkey }, "o", awful.client.movetoscreen):add()
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
keybinding.new({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
|
keybinding.new({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
|
||||||
|
|
15
awful.lua
15
awful.lua
|
@ -39,7 +39,6 @@ function array_boundandcycle(t, i)
|
||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Function to get a client by its relative index:
|
-- Function to get a client by its relative index:
|
||||||
-- set i to 1 to get next, -1 to get previous.
|
-- set i to 1 to get next, -1 to get previous.
|
||||||
function client_next(i)
|
function client_next(i)
|
||||||
|
@ -238,6 +237,19 @@ function client_togglefloating(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Move a client to a screen. Default is next screen, cycling.
|
||||||
|
function client_movetoscreen(c, s)
|
||||||
|
local sel = c or client.focus_get();
|
||||||
|
if sel then
|
||||||
|
local sc = screen.count()
|
||||||
|
if not s then
|
||||||
|
s = sel:screen_get() + 1
|
||||||
|
end
|
||||||
|
if s > sc then s = 1 elseif s < 1 then s = sc end
|
||||||
|
sel:screen_set(s)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function layout_get(screen)
|
function layout_get(screen)
|
||||||
local t = tag_selected(screen)
|
local t = tag_selected(screen)
|
||||||
if t then
|
if t then
|
||||||
|
@ -354,6 +366,7 @@ P.client =
|
||||||
toggletag = client_toggletag;
|
toggletag = client_toggletag;
|
||||||
togglefloating = client_togglefloating;
|
togglefloating = client_togglefloating;
|
||||||
moveresize = client_moveresize;
|
moveresize = client_moveresize;
|
||||||
|
movetoscreen = client_movetoscreen;
|
||||||
}
|
}
|
||||||
P.screen =
|
P.screen =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue