]> git.madduck.net Git - etc/awesome.git/blobdiff - layout/centerfair.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

centerfair: ncol uselessgaps fixed
[etc/awesome.git] / layout / centerfair.lua
index 01a2fe06f064fe04858a0d85118cb304fa8f23b7..37507d3be40ca3f8de7aa20331f20a14ad8a87ff 100644 (file)
@@ -91,11 +91,14 @@ function centerfair.arrange(p)
 
         -- Master client deserves a special treatement
         local g = {}
 
         -- Master client deserves a special treatement
         local g = {}
-        g.width = wa.width - (num_x  - 1) * width - num_x * useless_gap
+        g.width = wa.width - (num_x  - 1) * width - num_x * 2*useless_gap - 2 
         g.height = wa.height - 2*useless_gap - 2
         g.x = offset_x + useless_gap + global_border
         g.y = offset_y + global_border
         g.height = wa.height - 2*useless_gap - 2
         g.x = offset_x + useless_gap + global_border
         g.y = offset_y + global_border
-        cls[1]:geometry(g)
+
+        if cls[1] then
+            cls[1]:geometry(g)
+        end
 
         -- Treat the other clients
 
 
         -- Treat the other clients
 
@@ -139,7 +142,7 @@ function centerfair.arrange(p)
         g.width = width
 
         if useless_gap > 0 then
         g.width = width
 
         if useless_gap > 0 then
-            g.width = g.width - useless_gap/2 - 2
+            g.width = g.width + useless_gap - 2
         end
 
         for i = 1, (num_x-1) do
         end
 
         for i = 1, (num_x-1) do