-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.slate.js
73 lines (65 loc) · 1.73 KB
/
.slate.js
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
73
// Configs
S.cfga({
// Default action to he current screen
"defaultToCurrentScreen": true,
"keyboardLayout": "dvorak"
});
// Center windows on screen
var full = S.op("move", {
"x": "screenOriginX",
"y": "screenOriginY",
"width": "screenSizeX",
"height": "screenSizeY"
});
var base = S.op("move", {
"x": "screenOriginX",
"y": "screenOriginY",
"width": "windowSizeX",
"height": "windowSizeY"
});
var pushLeft = base.dup({
"y": "(screenSizeY-windowSizeY)/2"
});
var pushRight = base.dup({
"y": "(screenSizeY-windowSizeY)/2",
"x": "screenSizeX-windowSizeX"
});
var pushFullRight = base.dup({
"x": "screenSizeX-windowSizeX",
"y": "screenOriginY",
"height": "screenSizeY"
});
var pushFullLeft = base.dup({
"height": "screenSizeY"
});
var center = base.dup({
"x": "(screenSizeX-windowSizeX)/2",
"y": "(screenSizeY-windowSizeY)/2"
});
var centerHalf = base.dup({
"x": "screenSizeX/4",
"y": "screenSizeY/4",
"width": "screenSizeX/2",
"height": "screenSizeY/2"
});
var cornerTR = S.op("corner", { "direction": "top-right", });
var cornerTL = S.op("corner", { "direction": "top-left", });
var cornerBR = S.op("corner", { "direction": "bottom-right", });
var cornerBL = S.op("corner", { "direction": "bottom-left", });
S.bnda({
// Reload config
"r:ctrl;shift": S.op("relaunch"),
"f:ctrl;shift": full,
"c:ctrl;shift": center,
"c:alt;shift": centerHalf,
//"c:ctrl;shift": center,
"g:alt;shift": cornerTR,
"p:alt;shift": cornerTL,
"m:alt;shift": cornerBR,
"k:alt;shift": cornerBL,
"right:ctrl": pushRight,
"left:ctrl": pushLeft,
"right:ctrl;shift": pushFullRight,
"left:ctrl;shift": pushFullLeft,
"esc:ctrl": S.op("grid")
});