-
Notifications
You must be signed in to change notification settings - Fork 0
/
.slate
139 lines (116 loc) · 5.19 KB
/
.slate
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# vim: set sw=2 ts=2 sts=2 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker ft=vim
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config windowHintsIgnoreHiddenWindows false
config windowHintsShowIcons true
config windowHintsDuration 5
# config windowHintsOrder persist # seems to break things
config windowHintsSpread true
#config layoutFocusOnActivate true
# window hints
bind e:cmd hint ASDFGHJKLQWERTYUIOPCVBN
### Aliases {{{
alias hyper ctrl;alt;cmd
# Apps
alias browser 'Firefox.app'
# Hints
alias showHintsLeftHand hint AOEUIYQJKX
alias showNormalHint hint AOEUIDHTNSYXFBPKGMCW
# Abstract positions
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
alias rightmost move screenOriginX+screenSizeX*0.4;screenOriginY screenSizeX*0.6;screenSizeY
alias rightless move screenOriginX+screenSizeX*0.6;screenOriginY screenSizeX*0.4;screenSizeY
alias leftmost move screenOriginX;screenOriginY screenSizeX*0.6;screenSizeY
alias leftless move screenOriginX;screenOriginY
# }}}
### Layouts {{{
## Chrome / Terminal
#layout ChromeTerminal 'Google Chrome' push left bar-resize:screenSizeX/2
#layout ChromeTerminal 'Terminal' push right bar-resize:screenSizeX/2
#bind 1:${hyper} sequence focus 'Google Chrome' | focus 'Terminal' | layout ChromeTerminal
## Preview / Terminal
#layout PreviewTerminal 'Terminal' push left bar-resize:screenSizeX/2
#layout PreviewTerminal 'Preview' push right bar-resize:screenSizeX/2
#bind 2:${hyper} sequence focus 'Preview' | focus 'Terminal' | layout PreviewTerminal
## Preview / SublimeText
#layout PreviewSublimeText 'Preview' push left bar-resize:screenSizeX/2
#layout PreviewSublimeText 'Sublime Text 2' push right bar-resize:screenSizeX/2
#bind 3:${hyper} sequence focus 'Preview' | focus 'Sublime Text 2' | layout PreviewSublimeText
## Clearview / Terminal
#layout ClearviewTerminal 'Clearview' push left bar-resize:screenSizeX/3
#layout ClearviewTerminal 'Terminal' push right bar-resize:screenSizeX/1.5
#bind 4:${hyper} sequence focus 'Clearview' | focus 'Terminal' | layout ClearviewTerminal
## }}}
## Clearview / Terminal
#layout ClearviewTerminal2 'Clearview' push left bar-resize:screenSizeX/2.5
#layout ClearviewTerminal2 'Terminal' push right bar-resize:screenSizeX/1.67
#bind 5:${hyper} sequence focus 'Clearview' | focus 'Terminal' | layout ClearviewTerminal2
## }}}
## Clearview / Terminal
#layout ClearviewTerminal3 'Clearview' push left bar-resize:screenSizeX/2.25
#layout ClearviewTerminal3 'Terminal' push right bar-resize:screenSizeX/1.8
#bind 6:${hyper} sequence focus 'Clearview' | focus 'Terminal' | layout ClearviewTerminal3
## }}}
## Clearview / Terminal
#layout ClearviewTerminal4 'Clearview' push left bar-resize:screenSizeX/2
#layout ClearviewTerminal4 'Terminal' push right bar-resize:screenSizeX/2
#bind 7:${hyper} sequence focus 'Clearview' | focus 'Terminal' | layout ClearviewTerminal4
## }}}
### Bindings {{{
bind `:${hyper} hint QWERASDFZXCVTGBYUIOPHJKLNM
# Resize Bindings
bind f:${hyper} ${full}
#bind f:${hyper} chain ${full} | undo # Can't chain undo apparently
# see https://github.com/jigish/slate/issues/153 for fix with js config
bind =:${hyper} resize +5% +0
bind -:${hyper} resize -5% +0
#bind up:alt resize +0 -10%
#bind down:alt resize +0 +10%
#bind right:ctrl;alt resize -10% +0 bottom-right
#bind left:ctrl;alt resize +10% +0 bottom-right
#bind up:ctrl;alt resize +0 +10% bottom-right
#bind down:ctrl;alt resize +0 -10% bottom-right
# Push Bindings
bind right:${hyper} push right bar-resize:screenSizeX/2
bind left:${hyper} push left bar-resize:screenSizeX/2
bind up:${hyper} push up bar-resize:screenSizeY/2
bind down:${hyper} push down bar-resize:screenSizeY/2
# Nudge Bindings
bind right:shift;ctrl nudge +5% +0
bind left:shift;ctrl nudge -5% +0
bind up:shift;ctrl nudge +0 -10%
bind down:shift;ctrl nudge +0 +10%
# Throw Bindings
bind 1:${hyper} throw 0 resize
bind 2:${hyper} throw 1 resize
bind 3:${hyper} throw 2 resize
#bind left:${hyper} throw left resize
#bind right:${hyper} throw right resize
#bind up:${hyper} throw up resize
#bind down:${hyper} throw down resize
# Focus Bindings
bind j:${hyper} focus left
bind k:${hyper} focus right
#bind j:ctrl focus left
#bind k:ctrl focus right
#bind up:cmd focus up
#bind down:cmd focus down
#bind up:cmd;alt focus behind
#bind down:cmd;alt focus behind
# App Switcher (beta - doesn't seem to work)
#bind tab:${hyper} switch
# Undo
bind u:${hyper} undo
# Relaunch slate
bind r:${hyper} relaunch
# exp
# swap windows
# can js config tell whether the left or right is focused and swap intelligently?
# first focus the window to the left, then push the previously focused window to the left, then push the newly focused window to the right.
bind j:shift;${hyper} sequence focus left > push left | push right
# same when focus is on right window
bind k:shift;${hyper} sequence focus right > push right | push left
# }}}