Skip to content

Instantly share code, notes, and snippets.

@arjunvenkat
Last active December 15, 2015 07:19
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 arjunvenkat/5222285 to your computer and use it in GitHub Desktop.
Save arjunvenkat/5222285 to your computer and use it in GitHub Desktop.
Content for .slate config file and associated shortcuts
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
bind e:cmd hint ASDFGHJKLQWERTYUIOPCVBN # use whatever keys you want
# 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 leftthird move screenOriginX;screenOriginY screenSizeX/3;screenSizeY
alias middlethird move screenOriginX+screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
alias rightthird move screenOriginX+2*screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
# Hyper alias
alias hyper ctrl;shift;alt;cmd
layout default_layout 'Sublime Text 2' ${lefthalf}
layout default_layout 'Google Chrome' ${topright}
layout default_layout 'Terminal' ${bottomright}
bind l:${hyper} layout default_layout
layout secondary_layout 'Google Chrome' ${tophalf}
layout secondary_layout 'Terminal' ${bottomhalf}
bind ;:${hyper} layout secondary_layout
config defaultToCurrentScreen true
# Resize Bindings
bind right:ctrl;alt resize -10% +0 bottom-right
bind left:ctrl;alt resize +10% +0 bottom-right
bind up:ctrl;alt resize +0 +10% bottom-right
bind down:ctrl;alt resize +0 -10% bottom-right
# Push Bindings
bind q:${hyper} ${topleft}
bind e:${hyper} ${topright}
bind z:${hyper} ${bottomleft}
bind c:${hyper} ${bottomright}
bind a:${hyper} ${leftthird}
bind w:${hyper} ${tophalf}
bind x:${hyper} ${bottomhalf}
bind s:${hyper} ${middlethird}
bind d:${hyper} ${rightthird}
bind up:ctrl;alt;cmd ${full}
bind right:ctrl;alt;cmd ${righthalf}
bind left:ctrl;alt;cmd ${lefthalf}
# hacked minimize key-binding is ctrl + option + cmd + down arrow
# Nudge Bindings
bind right:shift;alt nudge +10% +0
bind left:shift;alt nudge -10% +0
bind up:shift;alt nudge +0 -10%
bind down:shift;alt nudge +0 +10%
# Throw Bindings
bind 1:ctrl;alt throw 0 resize
bind 2:ctrl;alt throw 1 resize
bind 3:ctrl;alt throw 2 resize
bind right:ctrl;alt;cmd throw right resize
bind left:ctrl;alt;cmd throw left resize
bind up:ctrl;alt;cmd throw up resize
bind down:ctrl;alt;cmd throw down resize
# Focus Bindings
bind up:cmd;alt focus behind
bind down:cmd;alt focus behind
# Window Hints
bind esc:cmd hint
cmd + e => see focus shortcuts for all open apps
right-option + l => default layout with Chrome, Sublime and Terminal
ctrl + option + cmd + up arrow => full screen window
ctrl + option + cmd + down arrow => minimize
ctrl + option + cmd + right arrow => push window to right half
ctrl + option + cmd + left arrow => push window to left half
right-option + W => push window to top half
right-option + X => push window to bottom half
right-option + Q => push window to top left corner
right-option + E => push window to top right corner
right-option + Z => push window to bottom left corner
right-option + C => push window to bottom right corner
right-option + A => move window to left third
right-option + S => move window to middle third
right-option + D => move window to right third
shift + option + up arrow => nudge window up
shift + option + down arrow => nudge window down
shift + option + right arrow => nudge window right
shift + option + left arrow => nudge window left
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment