-
Notifications
You must be signed in to change notification settings - Fork 3
/
slate
88 lines (71 loc) · 3.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
# Inspired by http://thume.ca/howto/2012/11/19/using-slate/
## Config ##
config defaultToCurrentScreen true
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
## Positions ##
# Monitor Aliases
alias mon-internal 0
alias mon-external 1
# 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
# Concrete positions
# First Monitor
alias 1-full move screenOriginX;screenOriginY screenSizeX;screenSizeY ${mon-internal}
alias 1-left move screenOriginX;screenOriginY screenSizeX/2;screenSizeY ${mon-internal}
alias 1-right move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY ${mon-internal}
# Second Monitor
alias 2-left move screenOriginX;screenOriginY screenSizeX/2;screenSizeY ${mon-external}
alias 2-right move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY ${mon-external}
## Layouts ##
# 1 Monitor
layout 1monitor 'iTerm':MAIN_FIRST ${1-right}
layout 1monitor 'Safari':REPEAT ${1-left}
layout 1monitor 'Chrome':REPEAT ${1-left}
layout 1monitor 'Mail':MAIN_FIRST ${1-right}
layout 1monitor 'Thunderbird':MAIN_FIRST ${1-right}
layout 1monitor 'Eclipse':REPEAT ${1-full}
layout 1monitor 'IntelliJ IDEA':REPEAT ${1-full}
layout 1monitor 'Emacs':REPEAT ${1-full}
layout 1monitor 'iTunes':REPEAT ${1-full}
# 2 Monitors
layout 2monitors 'iTerm':MAIN_FIRST ${1-right}
layout 2monitors 'Safari':REPEAT ${1-left}
layout 2monitors 'Chrome':REPEAT ${1-left}
layout 2monitors 'Mail':MAIN_FIRST ${2-left}
layout 2monitors 'Thunderbird':MAIN_FIRST ${2-left}
layout 2monitors 'Eclipse':REPEAT ${1-full}
layout 2monitors 'IntelliJ IDEA':REPEAT ${1-full}
layout 2monitors 'Emacs':REPEAT ${1-right}
layout 2monitors 'iTunes':REPEAT ${2-right}
# Default Layouts
default 2monitors resolutions:${mon-internal};${mon-external};
default 1monitor resolutions:${mon-internal}
## Keys ##
# Aliased Caps-Lock -> R_Control -> C-S-A-Cmd using PCKeyboardHack and KeyRemap4MacBook
alias hyper ctrl;shift;alt;cmd
bind e:cmd hint ASDFGHJKLQWERTYUIOPCVBN # use whatever keys you want
# Focus Bindings
bind right:${hyper} focus right
bind left:${hyper} focus left
bind up:${hyper} focus up
bind down:${hyper} focus down
# Location bindings
bind q:${hyper} ${lefthalf}
bind n:${hyper} ${full}
bind p:${hyper} ${righthalf}
bind r:${hyper} throw next
bind 1:${hyper} layout 1monitor
bind 2:${hyper} layout 2monitors
# Apps
bind b:${hyper} focus 'Google Chrome'
bind j:${hyper} focus 'IntelliJ IDEA'
bind i:${hyper} focus 'iTerm'
bind e:${hyper} focus 'Emacs'
bind a:${hyper} focus 'Adium'
bind m:${hyper} focus 'Mail'
bind u:${hyper} focus 'Thunderbird'