From 2e09ab6b2c74b00ff656cd8e6582b3cca030cd78 Mon Sep 17 00:00:00 2001 From: Ian Foster Date: Wed, 8 Jan 2014 17:11:33 -0800 Subject: [PATCH] dynamic termfair positioning --- awesome/awesome/layouts/termfair.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/awesome/awesome/layouts/termfair.lua b/awesome/awesome/layouts/termfair.lua index 32ab11a..efce7d8 100644 --- a/awesome/awesome/layouts/termfair.lua +++ b/awesome/awesome/layouts/termfair.lua @@ -55,6 +55,13 @@ function arrange(p) --local desired_y = tag.getncol(t) local desired_y = ncol + --dynamic positioning + if #cls < 4 + then + num_x = #cls + end + + if #cls > 0 then local num_y = math.max(math.ceil(#cls / num_x), desired_y) -- 1.9.1