X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/e72deb9de709a9adaa3a239a4e18ed641538de6e..5de6ca283bffbc041eeb094c8b82dfd8d680f04f:/layout/uselesspiral.lua?ds=sidebyside diff --git a/layout/uselesspiral.lua b/layout/uselesspiral.lua index ad2ba04..3164c75 100644 --- a/layout/uselesspiral.lua +++ b/layout/uselesspiral.lua @@ -64,6 +64,8 @@ local function spiral(p, spiral) top = false left = false + gap_factor = (useless_gap / 100) * 2 + if wa2.y == static_wa.y then top = true end @@ -73,17 +75,17 @@ local function spiral(p, spiral) end if top then - wa2.height = wa2.height - 2 * useless_gap + wa2.height = wa2.height - (2 + gap_factor) * useless_gap wa2.y = wa2.y + useless_gap else - wa2.height = wa2.height - useless_gap + wa2.height = wa2.height - (1 + gap_factor) * useless_gap end if left then - wa2.width = wa2.width - 2 * useless_gap + wa2.width = wa2.width - (2 + gap_factor) * useless_gap wa2.x = wa2.x + useless_gap else - wa2.width = wa2.width - useless_gap + wa2.width = wa2.width - (1 + gap_factor) * useless_gap end end -- End of useless gap.