Created
September 18, 2015 16:20
-
-
Save alexanderGugel/7c56ca3b81706233a6f4 to your computer and use it in GitHub Desktop.
.slate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slate.configAll({ | |
'defaultToCurrentScreen': true, | |
'checkDefaultsOnLoad': true | |
}); | |
var layout = { | |
maximize: S.op('move', { | |
'x' : 'screenOriginX', | |
'y' : 'screenOriginY', | |
'width' : 'screenSizeX', | |
'height' : 'screenSizeY' | |
}), | |
pushRight: S.op('push', { | |
'direction' : 'right', | |
'style' : 'bar-resize:screenSizeX/2' | |
}), | |
pushLeft: S.op('push', { | |
'direction' : 'left', | |
'style' : 'bar-resize:screenSizeX/2' | |
}), | |
pushTop: slate.operation("push", { | |
"direction" : "top", | |
"style" : "bar-resize:screenSizeY/2" | |
}), | |
pushBottom: slate.operation("push", { | |
"direction" : "bottom", | |
"style" : "bar-resize:screenSizeY/2" | |
}) | |
}; | |
var operations = { | |
throw0: S.op('throw', { | |
'screen': '0', | |
'width': 'screenSizeX', | |
'height': 'screenSizeY' | |
}), | |
throw1: S.op('throw', { | |
'screen' : '1', | |
'width' : 'screenSizeX', | |
'height' : 'screenSizeY' | |
}) | |
}; | |
slate.bindAll({ | |
// Directionals | |
'up:ctrl,alt,cmd,shift': layout.maximize, | |
'up:ctrl,cmd,alt': layout.pushTop, | |
'down:ctrl,cmd,alt': layout.pushBottom, | |
'right:ctrl,cmd,alt': layout.pushRight, | |
'left:ctrl,cmd,alt': layout.pushLeft, | |
'[:ctrl,cmd,alt': operations.throw0, | |
']:ctrl,cmd,alt': operations.throw1 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment