Skip to content

Instantly share code, notes, and snippets.

@thejmazz
Created August 7, 2016 14:57
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 thejmazz/1a23a46402b66c4bf213fab80309d206 to your computer and use it in GitHub Desktop.
Save thejmazz/1a23a46402b66c4bf213fab80309d206 to your computer and use it in GitHub Desktop.
Slate Config
# Slate
# === CONFIG ===
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config repeatOnHoldOps resize,nudge
config secondsBeforeRepeat 0.4
config secondsBetweenRepeat 0.01
# === ALIASES ===
alias center move screenSizeX/2-newWindowSizeX/2;screenSizeY/2-newWindowSizeY/2 windowSizeX;windowSizeY
# === BINDINGS ===
# allowed modifiers:
# alt, cmd, ctrl, shift
# hjkl bindings:
# alt, cmd -> push to edges
# alt, ctrl -> focus windows
# alt, shift -> used for special characters: hjkl:ÓÔÒ; nudging
# cmd, ctrl -> push to edges and resize
# cmd, shift -> resize with top-left
# ctrl, shift -> btt, focus behind
# cmd, ctrl, shift -> resize with bottom-right
# push to edges
bind h:alt,cmd push left
bind j:alt,cmd push down
bind k:alt,cmd push up
bind l:alt,cmd push right
# "push" to center
bind c:alt,cmd ${center}
# push to edge and maximize width
bind h:alt,ctrl,cmd move 0;windowTopLeftY screenSizeX;windowSizeY
bind l:alt,ctrl,cmd move 0;windowTopLeftY screenSizeX;windowSizeY
bind m:alt,ctrl,cmd move windowTopLeftX;windowTopLeftY screenSizeX*0.8;screenSizeY*0.7 ${center}
# focus
# hjkl:alt,ctrl
# similar to nnoremap <c-j> <c-w><c-j> vim mappings
bind h:alt,ctrl focus left
bind j:alt,ctrl focus down
bind k:alt,ctrl focus up
bind l:alt,ctrl focus right
# h:ctrl,shift and l:ctrl,shift used in btt to move window across spaces
bind k:ctrl,shift focus behind
bind j:ctrl,shift focus behind
# push to edges and resize to half
# hjkl:cmd,ctrl
bind h:cmd,ctrl push left bar-resize:screenSizeX/2
bind j:cmd,ctrl push down bar-resize:screenSizeY/2
bind k:cmd,ctrl push up bar-resize:screenSizeY/2
bind l:cmd,ctrl push right bar-resize:screenSizeX/2
# resize
bind h:cmd,shift resize -5% +0
bind j:cmd,shift resize +0 +5%
bind k:cmd,shift resize +0 -5%
bind l:cmd,shift resize +5% +0
bind h:alt,cmd,shift resize +5% +0 bottom-right
bind j:alt,cmd,shift resize +0 -5% bottom-right
bind k:alt,cmd,shift resize +0 +5% bottom-right
bind l:alt,cmd,shift resize -5% +0 bottom-right
# Nudge
bind h:alt,shift nudge -5% +0
bind j:alt,shift nudge +0 +5%
bind k:alt,shift nudge +0 -5%
bind l:alt,shift nudge +5% +0
# Grid
bind g:alt grid padding:5 1680x1050:3,3
# Window Hints
bind esc:cmd hint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment