Skip to content

Instantly share code, notes, and snippets.

@prashmohan
Created November 25, 2012 21:13
Show Gist options
  • Save prashmohan/4145375 to your computer and use it in GitHub Desktop.
Save prashmohan/4145375 to your computer and use it in GitHub Desktop.
Slate configuration file
# ======================================
# The HYPER key
# ======================================
alias hyperend shift;alt;cmd;fn
alias hyper shift;alt;cmd;ctrl
# ======================================
# Application aliases
# ======================================
alias browser 'Google Chrome'
alias editor 'Emacs'
# ======================================
# Configs
# ======================================
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout qwerty
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsDuration 10
config windowHintsSpread true
#config windowHintsOrder persist
config nudgePercentOf screenSize
config resizePercentOf screenSize
# ======================================
# Resize Bindings
# ======================================
bind right:ctrl;shift resize +10% +0
bind left:ctrl;shift resize -10% +0
bind up:alt resize +0 -10%
bind down:alt resize +0 +10%
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
# ======================================
# 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:${hyperend} throw right resize
bind left:${hyperend} throw left resize
bind up:${hyperend} throw up resize
bind down:${hyperend} throw down resize
# ======================================
# Window Hints
# ======================================
bind g:${hyper} hint
bind end:${hyperend} 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 leftthird move screenOriginX;screenOriginY screenSizeX/3;screenSizeY
alias rightthird move screenOriginX+2*screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
alias midthird move screenOriginX+screenSizeX/3;screenOriginY screenSizeX/3;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
bind m:cmd;ctrl;alt ${full}
bind left:cmd;ctrl;alt ${lefthalf}
bind right:ctrl;cmd;alt ${righthalf}
bind right:cmd;ctrl ${rightthird}
bind left:cmd;ctrl ${leftthird}
bind up:cmd;ctrl ${midthird}
# ======================================
# App bindings
# ======================================
bind b:${hyper} focus ${browser}
bind m:${hyper} focus ${editor}
bind i:${hyper} focus 'iTerm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment