awful.client: rename focus and swap bydirection
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4f1273794b
commit
bf5001337c
|
@ -34,6 +34,7 @@ data.marked = {}
|
||||||
urgent = {}
|
urgent = {}
|
||||||
focus = {}
|
focus = {}
|
||||||
focus.history = {}
|
focus.history = {}
|
||||||
|
swap = {}
|
||||||
|
|
||||||
-- User hooks
|
-- User hooks
|
||||||
hooks.user.create('marked')
|
hooks.user.create('marked')
|
||||||
|
@ -292,7 +293,7 @@ end
|
||||||
--- Focus a client by the given direction.
|
--- Focus a client by the given direction.
|
||||||
-- @param dir The direction, can be either "up", "down", "left" or "right".
|
-- @param dir The direction, can be either "up", "down", "left" or "right".
|
||||||
-- @param c Optional client.
|
-- @param c Optional client.
|
||||||
function focusbydirection(dir, c)
|
function focus.bydirection(dir, c)
|
||||||
local sel = c or capi.client.focus
|
local sel = c or capi.client.focus
|
||||||
if sel then
|
if sel then
|
||||||
local target = get_client_in_direction(dir, sel)
|
local target = get_client_in_direction(dir, sel)
|
||||||
|
@ -304,6 +305,11 @@ function focusbydirection(dir, c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function focusbydirection(dir, c)
|
||||||
|
util.deprecate()
|
||||||
|
return focus.bydirection(dir, c)
|
||||||
|
end
|
||||||
|
|
||||||
function focusbyidx(i, c)
|
function focusbyidx(i, c)
|
||||||
util.deprecate()
|
util.deprecate()
|
||||||
return focus.byidx(i, c)
|
return focus.byidx(i, c)
|
||||||
|
@ -322,7 +328,7 @@ end
|
||||||
--- Swap a client with another client in the given direction
|
--- Swap a client with another client in the given direction
|
||||||
-- @param dir The direction, can be either "up", "down", "left" or "right".
|
-- @param dir The direction, can be either "up", "down", "left" or "right".
|
||||||
-- @param c Optional client.
|
-- @param c Optional client.
|
||||||
function swapbydirection(dir, c)
|
function swap.bydirection(dir, c)
|
||||||
local sel = c or capi.client.focus
|
local sel = c or capi.client.focus
|
||||||
if sel then
|
if sel then
|
||||||
local target = get_client_in_direction(dir, sel)
|
local target = get_client_in_direction(dir, sel)
|
||||||
|
|
Loading…
Reference in New Issue