Created
June 29, 2013 19:39
-
-
Save ashton/5892374 to your computer and use it in GitHub Desktop.
Mine Slate config
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
var hyper_keystroke = ":ctrl,cmd,shift,alt"; | |
var window_keystroke = ":w,ctrl,cmd,shift,alt"; | |
var layout_keystroke = ":l,ctrl,cmd,shift,alt"; | |
/**** | |
Configs | |
****/ | |
slate.config("windowHintsShowIcons", true); | |
slate.config("windowHintsIgnoreHiddenWindows", false); | |
slate.config("defaultToCurrentScreen", true); | |
/**** | |
Operations | |
*****/ | |
var hint = slate.operation("hint", { | |
"characters" : "ASDFHJKL" | |
}); | |
var fullscreen = slate.operation("move", { | |
"x" : "screenOriginX", | |
"y" : "screenOriginY", | |
"width" : "screenSizeX", | |
"height" : "screenSizeY" | |
}); | |
var halfUp = fullscreen.dup({ "height" : "screenSizeY/2" }); | |
var halfDown = halfUp.dup({ "y" : "screenSizeY/2" }); | |
var halfLeft = fullscreen.dup({ "width" : "screenSizeX/2" }); | |
var halfRight = halfLeft.dup({ "x" : "screenSizeX/2" }); | |
var firstQuarter = halfLeft.dup({ "height" : "screenSizeY/2" }); | |
var secondQuarter = firstQuarter.dup({ "x" : "screenSizeX/2" }); | |
var thirdQuarter = secondQuarter.dup({ "y" : "screenSizeY/2" }); | |
var fourthQuarter = firstQuarter.dup({ "y" : "screenSizeY/2" }); | |
/**** | |
Focus Operations | |
****/ | |
var focusSublime = slate.operation("focus", { "app" : "Sublime Text 2" }); | |
/**** | |
Layouts | |
****/ | |
var half_sublime_half_browser = slate.layout("half_sublime_half_browser", { | |
"_after_" : { "operations" : focusSublime }, | |
"Sublime Text 2" : { | |
"operations" : halfLeft, | |
"repeat" : true | |
}, | |
"Google Chrome" : { | |
"operations" : halfRight, | |
"repeat" : true, | |
"ignore-fail" : true | |
} | |
}); | |
/**** | |
Layouts Operations | |
****/ | |
var applyLayout1 = slate.operation("layout", {"name": half_sublime_half_browser}); | |
/**** | |
Bindings | |
slate.bindAll nao tava funcionando tenho que ver dps pq | |
****/ | |
slate.bind("h"+hyper_keystroke, hint); | |
slate.bind("f"+window_keystroke, fullscreen); | |
slate.bind("a"+window_keystroke, halfLeft); | |
slate.bind("l"+window_keystroke, halfRight); | |
slate.bind("t"+window_keystroke, halfUp); | |
slate.bind("b"+window_keystroke, halfDown); | |
slate.bind("q"+window_keystroke, firstQuarter); | |
slate.bind("p"+window_keystroke, secondQuarter); | |
slate.bind("."+window_keystroke, thirdQuarter); | |
slate.bind("z"+window_keystroke, fourthQuarter); | |
slate.bind("1"+layout_keystroke, applyLayout1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment