Created
January 15, 2016 10:41
-
-
Save baseonmars/f1a5a495892d8df40422 to your computer and use it in GitHub Desktop.
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
var margin = 5; | |
S.cfga({ | |
"defaultToCurrentScreen" : true, | |
"secondsBetweenRepeat" : 0.1, | |
"checkDefaultsOnLoad" : true, | |
"focusCheckWidthMax" : 3000 | |
}); | |
// Create Operations | |
var topLeft = S.operation("move", { | |
"x" : "screenOriginX+" + margin, | |
"y" : "screenOriginY+" + margin, | |
"width" : "screenSizeX/2-" + margin * 1.5, | |
"height" : "screenSizeY/2-" + margin * 1.5 | |
}); | |
var topRight = S.operation("move", { | |
"x" : "screenOriginX+screenSizeX/2+" + margin / 2, | |
"y" : "screenOriginY+" + margin, | |
"width" : "screenSizeX/2-" + margin * 1.5, | |
"height" : "screenSizeY/2-" + margin * 1.5 | |
}); | |
var bottomRight = S.operation("move", { | |
"x" : "screenOriginX+screenSizeX/2+" + margin / 2, | |
"y" : "screenOriginY+screenSizeY/2+" + margin / 2, | |
"width" : "screenSizeX/2-" + margin * 1.5, | |
"height" : "screenSizeY/2-" + margin * 1.5 | |
}); | |
var bottomLeft = S.operation("move", { | |
"x" : "screenOriginX+" + margin, | |
"y" : "screenOriginY+screenSizeY/2+" + margin / 2, | |
"width" : "screenSizeX/2-" + margin * 1.5, | |
"height" : "screenSizeY/2-" + margin * 1.5 | |
}); | |
var pushRight = S.operation("move", { | |
"x" : "screenOriginX+screenSizeX/2+" + margin / 2, | |
"y" : "screenOriginY+" + margin, | |
"width" : "screenSizeX/2-" + margin * 1.5, | |
"height" : "screenSizeY-" + margin * 2 | |
}); | |
var pushLeft = S.operation("move", { | |
"x" : "screenOriginX+" + margin, | |
"y" : "screenOriginY+" + margin, | |
"width" : "screenSizeX/2-" + margin * 1.5, | |
"height" : "screenSizeY-" + margin * 2 | |
}); | |
var pushTop = S.operation("move", { | |
"x" : "screenOriginX+" + margin, | |
"y" : "screenOriginY+" + margin, | |
"width" : "screenSizeX-" + margin * 2, | |
"height" : "screenSizeY/2-" + margin * 1.5 | |
}); | |
var pushBottom = S.operation("move", { | |
"x" : "screenOriginX+" + margin, | |
"y" : "screenOriginY+screenSizeY/2+" + margin / 2, | |
"width" : "screenSizeX-" + margin * 2, | |
"height" : "screenSizeY/2-" + margin * 1.5 | |
}); | |
var fullscreen = S.operation("move", { | |
"x" : "screenOriginX", | |
"y" : "screenOriginY", | |
"width" : "screenSizeX", | |
"height" : "screenSizeY" | |
}); | |
var centered = S.operation("move", { | |
"x": "screenOriginX+150", | |
"y": "screenOriginY+80", | |
"width": "screenSizeX-300", | |
"height": "screenSizeY-180" | |
}); | |
var grid = S.operation("grid", { | |
"padding": margin, | |
"1280x800": "16,9" | |
}); | |
S.bind("down:shift;alt;ctrl", bottomLeft); | |
S.bind("right:shift;alt;ctrl", bottomRight); | |
S.bind("left:shift;alt;ctrl", topLeft); | |
S.bind("up:shift;alt;ctrl", topRight); | |
S.bind("left:ctrl;alt;cmd", pushLeft); | |
S.bind("right:ctrl;alt;cmd", pushRight); | |
S.bind("down:ctrl;alt;cmd", pushBottom); | |
S.bind("up:ctrl;alt;cmd", pushTop); | |
S.bind("c:ctrl;alt;cmd", centered); | |
S.bind("m:ctrl;alt;cmd", fullscreen); | |
S.bind("g:ctrl;alt;cmd", grid); | |
S.bnda({ | |
"right:cmd;alt;shift": S.op("nudge", { "x": "+3%", "y": "+0" }), | |
"left:cmd;alt;shift": S.op("nudge", { "x": "-3%", "y": "+0" }), | |
"up:cmd;alt;shift": S.op("nudge", { "x": "+0", "y": "-3%" }), | |
"down:cmd;alt;shift": S.op("nudge", { "x": "+0", "y": "+3%" }), | |
/*"right:ctrl;alt" : S.op("resize", { "width" : "+3%", "height" : "+0" }), | |
"left:ctrl;alt" : S.op("resize", { "width" : "-3%", "height" : "+0" }), | |
"up:ctrl;alt" : S.op("resize", { "width" : "+0", "height" : "-3%" }), | |
"down:ctrl;alt" : S.op("resize", { "width" : "+0", "height" : "+3%" })*/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment