Skip to content

Instantly share code, notes, and snippets.

@kwlzn
Created May 16, 2015 01:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kwlzn/5ad6e5e87fdd3ccfc85f to your computer and use it in GitHub Desktop.
slate config
## configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
# triggers the twoScreenLayout when there are 2 monitors.
default twoScreenLayout count:2
## hint aliases
alias showHintsLeftHand hint AOEUIYQJKX
alias showNormalHint hint AOEUIDHTNSYXFBPKGMCW
## monitor aliases
alias mon-one 0
alias mon-two 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
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
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
## concrete positions, screen 1
alias 1-full move screenOriginX;screenOriginY screenSizeX;screenSizeY ${mon-one}
alias 1-left move screenOriginX;screenOriginY screenSizeX/2;screenSizeY ${mon-one}
alias 1-right move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY ${mon-one}
alias 1-topleft corner top-left resize:screenSizeX/2;screenSizeY/2 ${mon-one}
alias 1-topright corner top-right resize:screenSizeX/2;screenSizeY/2 ${mon-one}
alias 1-bottomleft corner bottom-left resize:screenSizeX/2;screenSizeY/2 ${mon-one}
alias 1-bottomright corner bottom-right resize:screenSizeX/2;screenSizeY/2 ${mon-one}
## concrete positions, screen 2
alias 2-full move screenOriginX;screenOriginY screenSizeX;screenSizeY ${mon-two}
alias 2-left move screenOriginX;screenOriginY screenSizeX/2;screenSizeY ${mon-two}
alias 2-right move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY ${mon-two}
alias 2-righttop move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY/2 ${mon-two}
alias 2-rightbottom move screenOriginX+screenSizeX/2;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2 ${mon-two}
alias 2-topleft corner top-left resize:screenSizeX/2;screenSizeY/2 ${mon-two}
alias 2-topright corner top-right resize:screenSizeX/2;screenSizeY/2 ${mon-two}
alias 2-bottomleft corner bottom-left resize:screenSizeX/2;screenSizeY/2 ${mon-two}
alias 2-bottomright corner bottom-right resize:screenSizeX/2;screenSizeY/2 ${mon-two}
## default layouts
default 1monitor resolutions:${mon-one}
default 2monitors resolutions:${mon-one};${mon-two};
## laptop layout
layout 1monitor 'Terminal':MAIN_FIRST ${1-topleft} | ${1-bottomleft} | ${1-topright} | ${1-bottomright}
layout 1monitor 'Chrome':REPEAT ${1-full}
layout 1monitor 'Sublime Text':REPEAT ${1-full}
layout 1monitor 'Rdio':REPEAT ${1-full}
## monitor layout
layout 2monitors 'Terminal':MAIN_FIRST ${2-topleft} | ${2-bottomleft} | ${2-topright} | ${2-bottomright}
layout 2monitors 'Chrome':REPEAT ${1-full}
layout 2monitors 'Sublime Text':REPEAT ${1-full}
layout 2monitors 'Rdio':REPEAT ${2-full}
## hyper key
alias hyper ctrl;alt;cmd
## numpad location bindings
bind pad0:${hyper} ${showNormalHint}
bind pad.:${hyper} relaunch
bind pad1:${hyper} ${bottomleft}
bind pad2:${hyper} push bottom bar-resize:screenSizeY/2
bind pad3:${hyper} ${bottomright}
bind pad4:${hyper} ${lefthalf}
bind pad5:${hyper} ${full}
bind pad6:${hyper} ${righthalf}
bind pad7:${hyper} ${topleft}
bind pad8:${hyper} push top bar-resize:screenSizeY/2
bind pad9:${hyper} ${topright}
bind padEnter:${hyper} grid padding:5 ${mon-one}:8,8 ${mon-two}:8,8
bind pad+:${hyper} throw next
# bind pad.:${hyper} focus behind
bind pad/:${hyper} layout 1monitor
bind pad*:${hyper} layout 2monitors
## bind hyper+0 to full-screen
bind 0:${hyper} ${full}
## bind hyper+9 to laptop screen layout
bind 9:${hyper} layout 1monitor
# # Resize - Resizes the window in the specified direction
# bind l:alt resize +1% +0
# # Nudge - Nudges the window in the specified direction
# bind l:shift;alt nudge +1% +0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment