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.
4 Licensed under GNU General Public License v2
6 * (c) 2013, Luke Bonham
7 * (c) 2010-2012, Peter Hofmann
11 local tag = require("awful.tag")
12 local beautiful = require("beautiful")
22 function cascade.arrange(p)
26 -- A global border can be defined with
27 -- beautiful.global_border_width.
28 local global_border = tonumber(beautiful.global_border_width) or 0
29 if global_border < 0 then global_border = 0 end
31 -- Themes border width requires an offset.
32 local bw = tonumber(beautiful.border_width) or 0
38 wa.height = wa.height - ((global_border * 2) + (bw * 2))
39 wa.width = wa.width - ((global_border * 2) + (bw * 2))
40 wa.x = wa.x + global_border
41 wa.y = wa.y + global_border
43 -- Opening a new window will usually force all existing windows to
44 -- get resized. This wastes a lot of CPU time. So let's set a lower
45 -- bound to "how_many": This wastes a little screen space but you'll
46 -- get a much better user experience.
47 local t = tag.selected(p.screen)
49 if cascade.nmaster > 0
51 num_c = cascade.nmaster
53 num_c = tag.getnmaster(t)
62 local current_offset_x = cascade.offset_x * (how_many - 1)
63 local current_offset_y = cascade.offset_y * (how_many - 1)
71 g.x = wa.x + (how_many - i) * cascade.offset_x
72 g.y = wa.y + (i - 1) * cascade.offset_y
73 g.width = wa.width - current_offset_x
74 g.height = wa.height - current_offset_y