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:
Fabienne Ducroquet 2009-08-19 20:37:24 +02:00 committed by Julien Danjou
parent d716476872
commit 7ae072b791
1 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ local ipairs = ipairs
module("awful.layout.suit.spiral")
local function spiral(p, dwindle)
local function spiral(p, spiral)
local wa = p.workarea
local cls = p.clients
@ -29,17 +29,17 @@ local function spiral(p, dwindle)
end
end
if k % 4 == 0 and not dwindle then
if k % 4 == 0 and spiral then
nx = nx - nw
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
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
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
end
@ -52,13 +52,13 @@ end
dwindle = {}
dwindle.name = "dwindle"
function dwindle.arrange(p)
return spiral(p, true)
return spiral(p, false)
end
--- Spiral layout
name = "spiral"
function arrange(p)
return spiral(p, false)
return spiral(p, true)
end
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80