Skip to content

Instantly share code, notes, and snippets.

@shawnhansen
Last active December 31, 2015 01:49
Show Gist options
  • Save shawnhansen/7916418 to your computer and use it in GitHub Desktop.
Save shawnhansen/7916418 to your computer and use it in GitHub Desktop.
Slate config (.slate)
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
#config windowHintsDuration 5
config windowHintsSpread true
#config windowHintsOrder persist
# Monitor Aliases
alias mon-iMac 0
alias mon-cinema 1
# Misc Aliases
alias showHintsLeftHand hint AOEUIYQJKX
alias showNormalHint hint AOEUIDHTNSYXFBPKGMCW
alias browser 'Google Chrome'
alias editor 'Sublime Text'
# 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 screenSizeX*0.4;screenSizeY
# Concrete positions
alias 1-full move screenOriginX;screenOriginY screenSizeX;screenSizeY ${mon-iMac}
alias 1-left move screenOriginX;screenOriginY screenSizeX/2;screenSizeY ${mon-iMac}
alias 1-right move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY ${mon-iMac}
alias 2-left move screenOriginX;screenOriginY screenSizeX/2;screenSizeY ${mon-cinema}
alias 2-right move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY ${mon-cinema}
alias 1-righttop move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY/2 ${mon-iMac}
alias 1-rightbottom move screenOriginX+screenSizeX/2;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2 ${mon-iMac}
alias 2-righttop move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY/2 ${mon-cinema}
alias 2-rightbottom move screenOriginX+screenSizeX/2;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2 ${mon-cinema}
alias 2-lefttop move screenOriginX;screenOriginY screenSizeX/2;screenSizeY/2 ${mon-cinema}
alias 2-leftbottom move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2 ${mon-cinema}
# 2 Monitor layout
layout 2monitors 'iTerm':MAIN_FIRST ${2-righttop} | ${1-rightbottom}
layout 2monitors 'Google Chrome':REPEAT ${1-left}
layout 2monitors 'Nightly':REPEAT ${1-full}
layout 2monitors 'Sublime Text':REPEAT ${1-right}
layout 2monitors 'Twitter':REPEAT ${2-lefttop}
layout 2monitors 'Spotify':MAIN_FIRST ${2-leftbottom}
layout 2monitors 'Transmit':MAIN_FIRST ${2-rightbottom}
layout 2monitors 'Xcode':REPEAT ${1-full}
layout 2monitors 'MacVim':REPEAT ${1-right}
layout 2monitors 'iTunes':REPEAT ${2-leftbottom}
# 1 Monitor layout
layout 1monitor 'iTerm':MAIN_FIRST ${1-right}
layout 1monitor 'Sublime Text 2':MAIN_FIRST ${1-right}
layout 1monitor 'MacVim':MAIN_FIRST ${1-right}
# Default Layouts
default 2monitors resolutions:${mon-iMac};${mon-cinema};
default 1monitor resolutions:${mon-iMac}
# Numpad location Bindings
bind pad0 ${showHintsLeftHand}
bind pad1 ${leftless}
bind pad2 push bottom bar-resize:screenSizeY/2
bind pad3 ${rightless}
bind pad4 ${lefthalf}
bind pad5 ${full}
bind pad6 ${righthalf}
bind pad7 ${leftmost}
bind pad8 push top bar-resize:screenSizeY/2
bind pad9 ${rightmost}
bind padEnter grid padding:5 ${mon-iMac}:6,2 ${mon-cinema}:8,3
bind pad+ throw next
bind pad. focus behind
bind pad* layout 2monitors
bind pad/ layout 1monitor
bind e:cmd ${showNormalHint}
# ======================================
# The HYPER key
# ======================================
alias hyper ctrl;shift;alt;cmd
# Location bindings
bind t:${hyper} ${lefthalf}
bind n:${hyper} ${full}
bind s:${hyper} ${righthalf}
bind r:${hyper} throw next
# Resize Bindings
#bind r:${hyper} ${leftmost}
#bind g:${hyper} ${rightmost}
# Focus Bindings
bind right:${hyper} focus right
bind left:${hyper} focus left
bind up:${hyper} focus up
bind down:${hyper} focus down
# App bindings
bind e:${hyper} focus ${browser}
bind u:${hyper} focus ${editor}
bind x:${hyper} focus 'Xcode'
bind g:${hyper} focus 'GitHub'
bind m:${hyper} focus 'Mail'
bind i:${hyper} focus 'iTerm'
bind o:${hyper} focus 'Finder'
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment