Last active
February 13, 2016 21:00
-
-
Save remarkablemark/c8b1bd62612a2d199426 to your computer and use it in GitHub Desktop.
My Slate configuration.
This file contains hidden or 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
'use strict'; | |
/** | |
* Fullscreen (CTRL + F) | |
*/ | |
slate.bind('f:ctrl', function(window) { | |
window.doOperation(move({ | |
x: 'screenOriginX', | |
y: 'screenOriginY', | |
width: 'screenSizeX', | |
height: 'screenSizeY' | |
})); | |
}); | |
/** | |
* Halfscreen Left-Aligned (ALT + Left) | |
*/ | |
slate.bind('left:alt', function(window) { | |
window.doOperation(move({ | |
x: '0', | |
y: 'screenOriginY', | |
width: 'screenSizeX / 2', | |
height: 'screenSizeY' | |
})); | |
}); | |
/** | |
* Halfscreen Right-Aligned (ALT + Right) | |
*/ | |
slate.bind('right:alt', function(window) { | |
window.doOperation(move({ | |
x: 'screenSizeX / 2', | |
y: 'screenOriginY', | |
width: 'screenSizeX / 2', | |
height: 'screenSizeY' | |
})); | |
}); | |
/** | |
* Constructs Slate operation for moving the window. | |
* | |
* @param {Object} options - The operation options. | |
* @return {Object} The Operation object. | |
*/ | |
function move(options) { | |
return slate.operation('move', options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment