-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.lua
72 lines (63 loc) · 1.65 KB
/
init.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
function tileTo(c, sector)
local s = client.focus.screen
local screengeom = screen[s].workarea
local geometrySet = {}
geometrySet['left'] = {
x = screengeom.x,
y = screengeom.y,
width = screengeom.width / 2,
height = screengeom.height
}
geometrySet['right'] = {
x = screengeom.width / 2,
y = screengeom.y,
width = screengeom.width / 2,
height = screengeom.height
}
geometrySet['left-top'] = {
x = screengeom.x,
y = screengeom.y,
width = screengeom.width / 2,
height = screengeom.height / 2
}
geometrySet['left-bottom'] = {
x = screengeom.x,
y = screengeom.height / 2,
width = screengeom.width / 2,
height = screengeom.height / 2
}
geometrySet['right-top'] = {
x = screengeom.width / 2,
y = screengeom.y,
width = screengeom.width / 2,
height = screengeom.height /2
}
geometrySet['right-bottom'] = {
x = screengeom.width / 2,
y = screengeom.height / 2 ,
width = screengeom.width / 2,
height = screengeom.height / 2
}
geometrySet['top'] = {
x = screengeom.x,
y = screengeom.y,
width = screengeom.width,
height = screengeom.height / 2
}
geometrySet['bottom'] = {
x = screengeom.x,
y = screengeom.height / 2,
width = screengeom.width,
height = screengeom.height / 2
}
geometrySet['full'] = {
x = screengeom.x,
y = screengeom.y,
width = screengeom.width,
height = screengeom.height
}
c:geometry(geometrySet[sector])
end
local handTiler = {}
handTiler.tileTo = tileTo
return handTiler