Skip to content

Instantly share code, notes, and snippets.

@benbriggs
Created February 28, 2019 15:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benbriggs/92569a612baaad9d1f7b63b47e67b5ba to your computer and use it in GitHub Desktop.
Save benbriggs/92569a612baaad9d1f7b63b47e67b5ba to your computer and use it in GitHub Desktop.
the example base slate config
# This is a Slate configuration file: https://github.com/jigish/slate
# For a good overview: http://thume.ca/howto/2012/11/19/using-slate/
#
#
# Highlevel configuration options
#
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
#
# Abstract positions for later use within configuration.
#
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
#
# The following 'bind' lines allow you to hold "CTRL" and "COMMAND"
# and then press a third key that corresponds to 9 sections of a
# square:
#
# u i o
# j k l
# m , .
#
bind u:ctrl;cmd ${topleft}
bind j:ctrl;cmd ${lefthalf}
bind m:ctrl;cmd ${bottomleft}
bind i:ctrl;cmd ${tophalf}
bind k:ctrl;cmd ${full}
bind ,:ctrl;cmd ${bottomhalf}
bind o:ctrl;cmd ${topright}
bind l:ctrl;cmd ${righthalf}
bind .:ctrl;cmd ${bottomright}
# You can normally switch between windows on MacOS by pressing
# COMMAND-TAB. The following Slate configuration provides an
# alternative:
#
# COMMAND + CONTROL + ; will cause Slate to display the letters on the
# home row above window. Logos will appear on these letters, and you
# can press the letter to switch to that window.
#
bind ;:cmd;ctrl hint ASDFGHJKL
#
# These bindings make it so that you can more easily move windows to
# other displays. If you have two displays, you can press CTRL + CMD +
# 2 to cause the current window to be moved, and appear full screen,
# on your second display. If you subsequently press CTRL + CMD + 1,
# the window which was just moved to your second display will come
# back to your first display
#
bind 1:ctrl;cmd throw 0 resize
bind 2:ctrl;cmd throw 1 resize
bind 3:ctrl;cmd throw 2 resize
bind up:ctrl ${full}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment