Skip to content

Instantly share code, notes, and snippets.

@sl
Created June 25, 2017 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sl/4849f78b68de0444cb188844c49012cb to your computer and use it in GitHub Desktop.
Save sl/4849f78b68de0444cb188844c49012cb to your computer and use it in GitHub Desktop.
Slate configuration
config defaultToCurrentScreen true
# 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 tophalf move screenOriginX;screenOriginY screenSizeX;screenSizeY/2
alias bottomhalf move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX;screenSizeY/2
alias topleft corner top-left resize:screenSizeX/2;screenSizeY/2
alias topright corner top-right resize:screenSizeX/2;screenSizeY/2
alias bottomleft corner bottom-left resize:screenSizeX/2;screenSizeY/2
alias bottomright corner bottom-right resize:screenSizeX/2;screenSizeY/2
alias center move screenOriginX+screenSizeX/6;screenOriginY+screenSizeY/6 2*screenSizeX/3;2*screenSizeY/3
alias bigCenter move screenOriginX+screenSizeX/12;screenOriginY+screenSizeY/12 10*screenSizeX/12;10*screenSizeY/12
# Bind command+option+b to google chrome
bind b:cmd;alt focus 'Google Chrome'
bind v:cmd;alt focus 'IntelliJ Idea'
bind c:cmd;alt focus 'Terminal'
bind g:cmd;alt focus 'Sublime Text'
# The triple keys
alias triple ctrl;alt;cmd
alias triple2 alt;ctrl;shift
# Location bindings
bind left:${triple} ${lefthalf}
bind m:${triple} ${full}
bind right:${triple} ${righthalf}
bind up:${triple} ${tophalf}
bind down:${triple} ${bottomhalf}
bind c:${triple} ${center}
bind v:${triple} ${bigCenter}
bind down:${triple2} ${bottomleft}
bind right:${triple2} ${bottomright}
bind left:${triple2} ${topleft}
bind up:${triple2} ${topright}
bind e:cmd hint ASDFGHJKLQWERTYUIOPCVBN
# Monitor switching bindings
bind right:alt,ctrl throw 1 resize
bind left:alt,ctrl throw 0 resize
bind down:alt,ctrl throw 2 resize
bind up:alt,ctrl throw 1 resize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment