Skip to content

Instantly share code, notes, and snippets.

@mrdrozdov
Created May 24, 2021 14:24
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 mrdrozdov/127fc787a529f572cec7145f63b36c94 to your computer and use it in GitHub Desktop.
Save mrdrozdov/127fc787a529f572cec7145f63b36c94 to your computer and use it in GitHub Desktop.
slate.js
var pushLeft = slate.operation("push", {
"direction" : "left",
"style" : "bar-resize:screenSizeX/2"
});
var pushRight = slate.operation("push", {
"direction" : "right",
"style" : "bar-resize:screenSizeX/2"
});
var pushDown = slate.operation("push", {
"direction" : "down",
"style" : "bar-resize:screenSizeY/2"
});
var pushUp = slate.operation("push", {
"direction" : "up",
"style" : "bar-resize:screenSizeY/2"
});
var fullscreen = slate.operation("push", {
"direction" : "up",
"style" : "bar-resize:screenSizeY"
});
slate.bind("left:cmd,alt", pushLeft);
slate.bind("right:cmd,alt", pushRight);
slate.bind("down:cmd,alt", pushDown);
slate.bind("up:cmd,alt", pushUp);
slate.bind("down:cmd,alt,ctrl", fullscreen);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment