Skip to content

Instantly share code, notes, and snippets.

@mikebell
Last active January 10, 2016 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikebell/fab735b78f6f9e5b47b8 to your computer and use it in GitHub Desktop.
Save mikebell/fab735b78f6f9e5b47b8 to your computer and use it in GitHub Desktop.
// Create Operations
var pushRight = slate.operation("push", {
"direction" : "right",
"style" : "bar-resize:screenSizeX/2"
});
var pushLeft = slate.operation("push", {
"direction" : "left",
"style" : "bar-resize:screenSizeX/2"
});
var fullscreen = slate.operation("move", {
"x" : "screenOriginX",
"y" : "screenOriginY",
"width" : "screenSizeX",
"height" : "screenSizeY"
});
slate.bind("=:ctrl", function(win) {
win.doOperation(fullscreen);
return;
});
slate.bind("]:ctrl", function(win) {
win.doOperation(pushRight);
return;
});
slate.bind("[:ctrl", function(win) {
win.doOperation(pushLeft);
return;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment