Skip to content

Instantly share code, notes, and snippets.

@nomatteus
Created January 28, 2019 20:44
Show Gist options
  • Save nomatteus/95d26fa28d4f8ae61fd7c90cd207caed to your computer and use it in GitHub Desktop.
Save nomatteus/95d26fa28d4f8ae61fd7c90cd207caed to your computer and use it in GitHub Desktop.
Slate window manager config. https://github.com/jigish/slate
# Slate is a flexible window management system.
# See docs: https://github.com/jigish/slate
# Also see: http://thume.ca/howto/2012/11/19/using-slate/#configuration
config defaultToCurrentScreen 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 leftthird move screenOriginX;screenOriginY screenSizeX/3*2;screenSizeY
alias rightthird move screenOriginX+screenSizeX/3;screenOriginY screenSizeX/3*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
# HYPER KEY
# -------------------------------------------------------------------
# The "hyper" key is a shortcut for CTRL + ALT + CMD
alias hyper ctrl;alt;cmd
# Make window full screen
bind f:cmd;alt;shift ${full}
# Left/right half
bind left:cmd;alt ${lefthalf}
bind right:cmd;alt ${righthalf}
# Left/right 2/3's
bind left:cmd;alt;shift ${leftthird}
bind right:cmd;alt;shift ${rightthird}
# Move to next/prev screen
bind left:${hyper} throw left resize full
bind right:${hyper} throw right resize full
# Replicate the cmd-shift-v shortcut that nvAlt has, but for FSNotes
bind v:cmd;shift focus 'FSNotes'
######## Default config below, for reference...
# From https://github.com/jigish/slate/blob/master/Slate/default.slate
# Resize Bindings
# bind right:alt resize +10% +0
# bind left:alt 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
# Push Bindings
# bind right:ctrl;cmd push right bar-resize:screenSizeX/3
# bind left:ctrl;cmd push left bar-resize:screenSizeX/3
# bind up:ctrl;cmd push up bar-resize:screenSizeY/2
# bind down:ctrl;cmd push down bar-resize:screenSizeY/2
# 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 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
# Window Hints
# bind esc:cmd hint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment