Skip to content

Instantly share code, notes, and snippets.

@gddabe
Last active December 29, 2016 15:15
Show Gist options
  • Save gddabe/11399234 to your computer and use it in GitHub Desktop.
Save gddabe/11399234 to your computer and use it in GitHub Desktop.
fix name
// GLOBAL CONFIGURATIONS
// -------------------------------------------------------------------
S.cfga({
"defaultToCurrentScreen": true,
"secondsBetweenRepeat": 0.1,
"checkDefaultsOnLoad": true,
"focusCheckWidthMax": 3000,
"orderScreensLeftToRight": true
});
// POSITION ALIASES
// -------------------------------------------------------------------
var fullscreen = S.op("move", {
"x": "screenOriginX",
"y": "screenOriginY",
"width": "screenSizeX",
"height": "screenSizeY"
});
var left = fullscreen.dup({
"width": "screenSizeX/2"
});
var right = left.dup({
"x": "screenOriginX+(screenSizeX/2)"
});
var tops = fullscreen.dup({
"height": "screenSizeY/2"
});
var bottom = tops.dup({
"y": "screenOriginY+(screenSizeY/2)"
});
var leftTop = left.dup({
"height": "screenSizeY/2"
});
var leftBot = leftTop.dup({
"y": "screenOriginY+screenSizeY/2"
});
var rightTop = right.dup({
"height": "screenSizeY/2"
});
var rightBot = rightTop.dup({
"y": "screenOriginY+screenSizeY/2"
});
// BINDINGS
// -------------------------------------------------------------------
S.bnda({
"h:ctrl;alt;cmd": left,
"l:ctrl;alt;cmd": right,
"j:ctrl;alt;cmd": bottom,
"k:ctrl;alt;cmd": tops,
"u:ctrl;alt;cmd": leftTop,
"i:ctrl;alt;cmd": rightTop,
"n:ctrl;alt;cmd": leftBot,
"m:ctrl;alt;cmd": rightBot,
";:ctrl;alt;cmd": S.op("hint"),
"g:ctrl;alt;cmd": S.op("grid"),
"space:ctrl;alt;cmd": S.op("throw", {
"screen": "next",
"width": "screenSizeX",
"height": "screenSizeY"
}),
"1:`,ctrl;alt;cmd": S.op("snapshot", {
"name": "snap1",
"save": true,
"stack": false
}),
"1:ctrl;alt;cmd": S.op("activate-snapshot", {
"name": "snap1",
"delete": false
}),
"2:`,ctrl;alt;cmd": S.op("snapshot", {
"name": "snap2",
"save": true,
"stack": false
}),
"2:ctrl;alt;cmd": S.op("activate-snapshot", {
"name": "snap2",
"delete": false
}),
"3:`,ctrl;alt;cmd": S.op("snapshot", {
"name": "snap3",
"save": true,
"stack": false
}),
"3:ctrl;alt;cmd": S.op("activate-snapshot", {
"name": "snap3",
"delete": false
})
});
// Log that we're done configuring
S.log("[SLATE] -------------- Finished Loading Config --------------");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment