Skip to content

Instantly share code, notes, and snippets.

@zdw
Created April 10, 2013 14:45
Show Gist options
  • Save zdw/5355257 to your computer and use it in GitHub Desktop.
Save zdw/5355257 to your computer and use it in GitHub Desktop.
Example .slate config file for https://github.com/jigish/slate
# Config
config windowHintsFontSize 100
config windowHintsIgnoreHiddenWindows false
config windowHintsShowIcons true
config windowHintsSpread true
#config windowHintsTopLeftX (windowSizeX/2)-(windowHintsWidth/2)
#config windowHintsTopLeftY (windowSizeY/2)-(windowHintsHeight/2)
config nudgePercentOf screenSize
config resizePercentOf screenSize
config checkDefaultsOnLoad true
# General aliases
alias sox screenOriginX
alias soy screenOriginY
alias ssx screenSizeX
alias hssx screenSizeX/2
alias tssx screenSizeX/3
alias qssx screenSizeX/4
alias fssx screenSizeX/5
alias ssy screenSizeY
alias hssy screenSizeY/2
alias tssy screenSizeY/3
alias qssy screenSizeY/4
alias fssy screenSizeY/5
# Position aliases
alias fullscreen ${sox};${soy} ${ssx};${ssy}
alias leftThreeQuarters ${sox};${soy} (3*${qssx});${ssy}
alias leftTwoThirds ${sox};${soy} (2*${tssx});${ssy}
alias leftThreeFifths ${sox};${soy} (3*${fssx});${ssy}
alias leftHalf ${sox};${soy} ${hssx};${ssy}
alias leftTwoFifths ${sox};${soy} (2*${fssx});${ssy}
alias leftThird ${sox};${soy} ${tssx};${ssy}
alias leftQuarter ${sox};${soy} ${qssx};${ssy}
alias topHalf ${sox};${soy} ${ssx};${hssy}
alias bottomHalf ${sox};${soy}+${hssy} ${ssx};${hssy}
alias bottomThird ${sox};${soy}+(2*${tssy}) ${ssx};${tssy}
alias bottomFourth ${sox};${soy}+(2*${tssy}) ${ssx};${tssy}
alias rightThreeQuarters ${sox}+${qssx};${soy} $(3*${qssx});${ssy}
alias rightTwoThirds ${sox}+${tssx};${soy} ${ssx}-${tssx};${ssy}
alias rightThreeFifths ${sox}+(2*${fssx});${soy} (3*${fssx});${ssy}
alias rightHalf ${sox}+${hssx};${soy} ${hssx};${ssy}
alias rightTwoFifths ${sox}+(3*${fssx});${soy} (2*${fssx});${ssy}
alias rightThird ${sox}+${ssx}-${tssx};${soy} ${tssx};${ssy}
alias topLeftQuarter ${sox};${soy} ${hssx};${ssy}
alias topRightQuarter ${sox}+${hssx};${soy} ${hssx};${hssy}
alias bottomLeftQuarter ${sox};${soy}+${hssy} ${hssx};${hssy}
alias bottomRightQuarter ${sox}+${hssx};${soy}+${hssy} ${hssx};${hssy}
alias topRightTwoThirdsRightThreeFifths ${sox}+(2*${fssx});${soy} (3*${fssx});(2*${tssy})
alias bottomRightThirdRightThreeFifths ${sox}+(2*${fssx});${soy}+(2*${tssy}) (3*${fssx});${tssy}
alias topLeftTwoThirdsLeftTwoFifths ${sox};${soy} (2*${fssx});(2*${tssy})
alias bottomLeftThirdLeftTwoFifths ${sox};${soy}+(2*${tssy}) (2*${fssx});${tssy}
# Bindings
bind r:cmd;ctrl relaunch
bind f:cmd;ctrl move ${fullscreen}
bind u:cmd;ctrl move ${leftHalf}
bind j:cmd;ctrl move ${rightHalf}
bind i:cmd;ctrl move ${leftThird}
bind k:cmd;ctrl move ${rightTwoThirds}
bind o:cmd;ctrl move ${leftTwoFifths}
bind l:cmd;ctrl move ${rightThreeFifths}
bind w:cmd;ctrl move ${topLeftTwoThirdsLeftTwoFifths}
bind e:cmd;ctrl move ${topRightTwoThirdsRightThreeFifths}
bind s:cmd;ctrl move ${bottomLeftThirdLeftTwoFifths}
bind d:cmd;ctrl move ${bottomRightThirdRightThreeFifths}
bind ;:cmd;ctrl throw previous
bind /:cmd;ctrl hint ASDFGHJKLQWERTYUIOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment