Skip to content

Instantly share code, notes, and snippets.

@bengourley
Created March 6, 2014 11:23
Show Gist options
  • Save bengourley/9387636 to your computer and use it in GitHub Desktop.
Save bengourley/9387636 to your computer and use it in GitHub Desktop.
/* global slate */
slate.config('defaultToCurrentScreen', true)
slate.config('windowHintsShowIcons', true)
slate.config('windowHintsIgnoreHiddenWindows', false)
var hint = slate.operation('hint')
slate.bind('esc:ctrl', hint)
var fullScreen = slate.operation('push', { direction: 'top', style: 'bar-resize:screenSizeY' })
, toMain = slate.operation('throw', { screen : '0' })
, toSecondary = slate.operation('throw', { screen : '1' })
slate.bind('up:alt,ctrl', function (win) {
win.doOperation(toMain)
win.doOperation(fullScreen)
})
slate.bind('down:alt,ctrl', function (win) {
win.doOperation(toSecondary)
win.doOperation(fullScreen)
})
var right = slate.operation('push', { direction: 'right', style: 'bar-resize:screenSizeX/2' })
, left = slate.operation('push', { direction: 'left', style: 'bar-resize:screenSizeX/2' })
slate.bind('left:alt,ctrl', left)
slate.bind('right:alt,ctrl', right)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment