Commit 2e09ab6b2c74b00ff656cd8e6582b3cca030cd78

Authored by Ian Foster
1 parent bfc657d496
Exists in master

dynamic termfair positioning

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

awesome/awesome/layouts/termfair.lua View file @ 2e09ab6
... ... @@ -55,6 +55,13 @@
55 55 --local desired_y = tag.getncol(t)
56 56 local desired_y = ncol
57 57  
  58 + --dynamic positioning
  59 + if #cls < 4
  60 + then
  61 + num_x = #cls
  62 + end
  63 +
  64 +
58 65 if #cls > 0
59 66 then
60 67 local num_y = math.max(math.ceil(#cls / num_x), desired_y)