-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzkmax.lua
38 lines (31 loc) · 867 Bytes
/
zkmax.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- A modified version of max layout. It tosses other tiling clients
-- off the screen, so that their shadows won't darken the shadow of
-- the focused client.
-- Grab environment we need
local pairs = pairs
local max = {}
local function fmax(p)
local area = p.workarea
local focus = client.focus
if focus and not focus.floating then
for _, c in pairs(p.clients) do
local g = {}
g.width = area.width
g.height = area.height
if client.focus == c then
g.x = area.x
g.y = area.y
else
g.x = area.x + area.width
g.y = area.y + area.height
end
p.geometries[c] = g
end
end
end
max.name = "max"
function max.arrange(p)
return fmax(p)
end
return max
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80