]> git.madduck.net Git - etc/awesome.git/blobdiff - layout/uselesstile.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:

Merge branch 'projektile-master'
[etc/awesome.git] / layout / uselesstile.lua
index 47aa4a443ebcd6695b2d76bdcce94c8a903346a2..eccfdadbff024b19c628d7a65d220b598078de97 100644 (file)
@@ -9,7 +9,6 @@
                                                   
 --]]
 
                                                   
 --]]
 
-local naughty = require("naughty")
 local tag       = require("awful.tag")
 local beautiful = require("beautiful")
 local ipairs    = ipairs
 local tag       = require("awful.tag")
 local beautiful = require("beautiful")
 local ipairs    = ipairs
@@ -28,10 +27,11 @@ local function tile_group(cls, wa, orientation, fact, group)
 
     -- A global border can be defined with
     -- beautiful.global_border_width
 
     -- A global border can be defined with
     -- beautiful.global_border_width
-    global_border = tonumber(beautiful.global_border_width) or 0
+    local global_border = tonumber(beautiful.global_border_width) or 0
     if global_border < 0 then global_border = 0 end
 
     if global_border < 0 then global_border = 0 end
 
-    -- BW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
+    -- Themes border width requires an offset
+    local bw = tonumber(beautiful.border_width) or 0
 
     -- get our orientation right
     local height = "height"
 
     -- get our orientation right
     local height = "height"
@@ -78,8 +78,8 @@ local function tile_group(cls, wa, orientation, fact, group)
     --stat_coord = size
     for c = group.first,group.last do
         local i = c - group.first +1
     --stat_coord = size
     for c = group.first,group.last do
         local i = c - group.first +1
-        geom[width] = size - global_border
-        geom[height] = math.floor(unused * fact[i] / total_fact)
+        geom[width] = size - global_border - (bw * 2)
+        geom[height] = math.floor(unused * fact[i] / total_fact) - (bw * 2)
         geom[x] = group.coord + global_border + (useless_gap / 2)
         geom[y] = coord + global_border + (useless_gap / 2)
 
         geom[x] = group.coord + global_border + (useless_gap / 2)
         geom[y] = coord + global_border + (useless_gap / 2)
 
@@ -144,11 +144,6 @@ local function tile(param, orientation)
         y = "x"
     end
 
         y = "x"
     end
 
-    -- A global border can be defined with
-    -- beautiful.global_border_width
-    global_border = tonumber(beautiful.global_border_width) or 0
-    if global_border < 0 then global_border = 0 end
-
     local cls = param.clients
     local nmaster = math.min(tag.getnmaster(t), #cls)
     local nother = math.max(#cls - nmaster,0)
     local cls = param.clients
     local nmaster = math.min(tag.getnmaster(t), #cls)
     local nother = math.max(#cls - nmaster,0)