layout: spiral: test spiral rather than dwindle
Since all the tests are now "not dwindle". Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d716476872
commit
7ae072b791
|
@ -10,7 +10,7 @@ local ipairs = ipairs
|
||||||
|
|
||||||
module("awful.layout.suit.spiral")
|
module("awful.layout.suit.spiral")
|
||||||
|
|
||||||
local function spiral(p, dwindle)
|
local function spiral(p, spiral)
|
||||||
local wa = p.workarea
|
local wa = p.workarea
|
||||||
local cls = p.clients
|
local cls = p.clients
|
||||||
|
|
||||||
|
@ -29,17 +29,17 @@ local function spiral(p, dwindle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if k % 4 == 0 and not dwindle then
|
if k % 4 == 0 and spiral then
|
||||||
nx = nx - nw
|
nx = nx - nw
|
||||||
elseif k % 2 == 0 or
|
elseif k % 2 == 0 or
|
||||||
(k % 4 == 3 and k < n and not dwindle) then
|
(k % 4 == 3 and k < n and spiral) then
|
||||||
nx = nx + nw
|
nx = nx + nw
|
||||||
end
|
end
|
||||||
|
|
||||||
if k % 4 == 1 and k ~= 1 and not dwindle then
|
if k % 4 == 1 and k ~= 1 and spiral then
|
||||||
ny = ny - nh
|
ny = ny - nh
|
||||||
elseif k % 2 == 1 and k ~= 1 or
|
elseif k % 2 == 1 and k ~= 1 or
|
||||||
(k % 4 == 0 and k < n and not dwindle) then
|
(k % 4 == 0 and k < n and spiral) then
|
||||||
ny = ny + nh
|
ny = ny + nh
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -52,13 +52,13 @@ end
|
||||||
dwindle = {}
|
dwindle = {}
|
||||||
dwindle.name = "dwindle"
|
dwindle.name = "dwindle"
|
||||||
function dwindle.arrange(p)
|
function dwindle.arrange(p)
|
||||||
return spiral(p, true)
|
return spiral(p, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Spiral layout
|
--- Spiral layout
|
||||||
name = "spiral"
|
name = "spiral"
|
||||||
function arrange(p)
|
function arrange(p)
|
||||||
return spiral(p, false)
|
return spiral(p, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue