Skip to content

Instantly share code, notes, and snippets.

@jgpawletko
Last active August 29, 2015 13: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 jgpawletko/9527674 to your computer and use it in GitHub Desktop.
Save jgpawletko/9527674 to your computer and use it in GitHub Desktop.
my Slate config file
#---------------------------------------------------------------------------------------------
# Time-stamp: <2014-06-05 16:10:43 jgp>
#---------------------------------------------------------------------------------------------
#
# Slate (https://github.com/jigish/slate) configuration file
#
# Thanks to:
# https://github.com/jigish
#
# my current config based on:
# http://www.numbertheory.nl/2013/03/16/slate-an-xmonad-like-windowmanager-for-mac-os/
#
# other links:
# https://web.archive.org/web/20131205062111/http://thume.ca/howto/2012/11/19/using-slate/
# http://mauriciogardini.com/post/43348489262/slate-a-mac-os-x-window-manager-for-power-users
# http://chronicle.com/blogs/profhacker/the-slate-window-manager-for-mac-power-users/46203
#---------------------------------------------------------------------------------------------
# TODO
# select, then move top left, then stretch
# Some config options
config nudgePercentOf screenSize
# Options relevant to Window hints
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread 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 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 topleftquarter corner top-left resize:screenSizeX/2;screenSizeY/4
alias toprightquarter corner top-right resize:screenSizeX/2;screenSizeY/4
alias bottomleftquarter corner bottom-left resize:screenSizeX/2;screenSizeY/4
alias bottomrightquarter corner bottom-right resize:screenSizeX/2;screenSizeY/4
alias topquarter move screenOriginX;screenOriginY screenSizeX;screenSizeY/4
alias tophalf move screenOriginX;screenOriginY screenSizeX;screenSizeY/2
alias bottomhalf move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX;screenSizeY/2
alias bottomquarter move screenOriginX;screenOriginY+screenSizeY*3/4 screenSizeX;screenSizeY/4
# Bind window hinting to cmd+e, using the given letters
# bind e:cmd hint ASDFGHJKLQWERTYUIOPCVBN # use whatever keys you want
# Press cmd+g to get a grid, drag on that
# grid to determine the size of an app
# bind g:cmd grid padding:5 0:6,2 1:8,2
# Use the Slate task switcher (beta)
# bind tab:cmd switch
# Send a program to a particular screen
bind pad0:alt,ctrl throw 0 resize
bind pad.:alt,ctrl throw 1 resize
# Use the keys below to put the selected window
bind pad1:ctrl;alt ${bottomleft}
bind pad2:ctrl;alt ${bottomhalf}
bind pad3:ctrl;alt ${bottomright}
bind pad4:ctrl;alt ${lefthalf}
bind pad5:ctrl;alt ${full}
bind pad6:ctrl;alt ${righthalf}
bind pad7:ctrl;alt ${topleft}
bind pad8:ctrl;alt ${tophalf}
bind pad9:ctrl;alt ${topright}
bind pad1:ctrl;alt;shift ${bottomleftquarter}
bind pad2:ctrl;alt;shift ${bottomquarter}
bind pad3:ctrl;alt;shift ${bottomrightquarter}
bind pad7:ctrl;alt;shift ${topleftquarter}
bind pad8:ctrl;alt;shift ${topquarter}
bind pad9:ctrl;alt;shift ${toprightquarter}
# Nudges (N.B. you need signs on both X and Y)
bind left:ctrl;alt nudge -10% +0
bind right:ctrl;alt nudge +10% +0
bind up:ctrl;alt nudge +0 -10%
bind down:ctrl;alt nudge +0 +10%
bind left:ctrl;alt;shift nudge -5% +0
bind right:ctrl;alt;shift nudge +5% +0
bind up:ctrl;alt;shift nudge +0 -5%
bind down:ctrl;alt;shift nudge +0 +5%
# stretches (N.B. you need signs on both X and Y)
bind left:ctrl;cmd resize -10% +0
bind right:ctrl;cmd resize +10% +0
bind up:ctrl;cmd resize +0 -10%
bind down:ctrl;cmd resize +0 +10%
bind left:ctrl;cmd;shift resize -5% +0
bind right:ctrl;cmd;shift resize +5% +0
bind up:ctrl;cmd;shift resize +0 -5%
bind down:ctrl;cmd;shift resize +0 +5%
# Focus Bindings
# Shift focus to the app to the
bind right:cmd focus right
bind left:cmd focus left
bind up:cmd focus up
bind down:cmd focus down
bind up:cmd;alt focus behind
bind down:cmd;alt focus behind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment