Skip to content
Browse files

Renamed files for better consistency, added slate configurarion.

  • Loading branch information...
1 parent e128ef1 commit bf3cc2c4807c95f686abd4d93ef3df8de8caa63c @am committed Apr 4, 2013
View
0 oh-my-zsh/alias.zsh → .oh-my-zsh/alias.zsh
File renamed without changes.
View
0 oh-my-zsh/plugins/rhc/rhc.plugin.zsh → .oh-my-zsh/plugins/rhc/rhc.plugin.zsh
File renamed without changes.
View
222 .slate.js
@@ -0,0 +1,222 @@
+// Configs
+// adapted from https://github.com/jigish/dotfiles/blob/master/slate.js
+
+S.cfga({
+ "defaultToCurrentScreen" : true,
+ "secondsBetweenRepeat" : 0.1,
+ "checkDefaultsOnLoad" : true,
+ "focusCheckWidthMax" : 3000
+});
+
+// Monitors
+var monHome = "2560x1440";
+var monWorkL = "1920x1080";
+var monWorkR = "1680x1050";
+
+// Operations
+var lapChat = S.op("corner", {
+ "screen" : monHome,
+ "direction" : "top-left",
+ "width" : "screenSizeX/9",
+ "height" : "screenSizeY"
+});
+var lapMain = lapChat.dup({ "direction" : "top-right", "width" : "8*screenSizeX/9" });
+var tboltFull = S.op("move", {
+ "screen" : monWorkL,
+ "x" : "screenOriginX",
+ "y" : "screenOriginY",
+ "width" : "screenSizeX",
+ "height" : "screenSizeY"
+});
+var tboltTop = tboltFull.dup({ "height" : "screenSizeY/2" });
+var tboltTopLeft = tboltTop.dup({ "width" : "screenSizeX/2" });
+var tboltTopRight = tboltTopLeft.dup({ "x" : "screenOriginX+screenSizeX/2" });
+var tboltBottom = tboltTop.dup({ "y" : "screenOriginY+screenSizeY/2" });
+var tboltBottomLeft = tboltBottom.dup({ "width" : "screenSizeX/3" });
+var tboltBottomMid = tboltBottomLeft.dup({ "x" : "screenOriginX+screenSizeX/3" });
+var tboltBottomRight = tboltBottomLeft.dup({ "x" : "screenOriginX+2*screenSizeX/3" });
+var tboltLeft = tboltTopLeft.dup({ "height" : "screenSizeY" });
+var tboltRight = tboltTopRight.dup({ "height" : "screenSizeY" });
+var hpTopLeft = tboltTopLeft.dup({ "screen" : monWorkR });
+var hpBottomLeft = hpTopLeft.dup({ "y" : "screenOriginY+screenSizeY/2" });
+var hpRight = tboltRight.dup({ "screen" : monWorkR });
+
+// common layout hashes
+var lapMainHash = {
+ "operations" : [lapMain],
+ "ignore-fail" : true,
+ "repeat" : true
+};
+var adiumHash = {
+ "operations" : [lapChat, lapMain],
+ "ignore-fail" : true,
+ "title-order" : ["Contacts"],
+ "repeat-last" : true
+};
+var tboltTopHash = {
+ "operations" : [tboltTop],
+ "repeat" : true
+};
+var mvimHash = {
+ "operations" : [tboltTopLeft, tboltTopRight],
+ "repeat" : true
+};
+var iTermHash = {
+ "operations" : [tboltBottomLeft, tboltBottomMid, tboltBottomRight, lapMain],
+ "sort-title" : true,
+ "repeat-last" : true
+};
+var genBrowserHash = function(regex) {
+ return {
+ "operations" : [function(windowObject) {
+ var title = windowObject.title();
+ if (title !== undefined && title.match(regex)) {
+ windowObject.doOperation(hpRight);
+ } else {
+ windowObject.doOperation(lapMain);
+ }
+ }],
+ "ignore-fail" : true,
+ "repeat" : true
+ };
+}
+
+// 2 monitor layout
+var twoMonitorLayout = S.lay("twoMonitor", {
+ "Adium" : adiumHash,
+ "MacVim" : mvimHash,
+ "iTerm" : iTermHash,
+ "Google Chrome" : lapMainHash,
+ "Xcode" : {
+ "operations" : [tboltTop, lapMain],
+ "main-first" : true,
+ "repeat-last" : true
+ },
+ "Flex Builder" : tboltTopHash,
+ "GitX" : lapMainHash,
+ "Ooyala Player Debug Console" : lapMainHash,
+ "Firefox" : lapMainHash,
+ "Safari" : lapMainHash,
+ "Eclipse" : tboltTopHash,
+ "Spotify" : lapMainHash
+});
+
+// 1 monitor layout
+var oneMonitorLayout = S.lay("oneMonitor", {
+ "Adium" : adiumHash,
+ "MacVim" : lapMainHash,
+ "iTerm" : lapMainHash,
+ "Google Chrome" : lapMainHash,
+ "Xcode" : lapMainHash,
+ "Flex Builder" : lapMainHash,
+ "GitX" : lapMainHash,
+ "Ooyala Player Debug Console" : lapMainHash,
+ "Firefox" : lapMainHash,
+ "Safari" : lapMainHash,
+ "Eclipse" : lapMainHash,
+ "Spotify" : lapMainHash
+});
+
+// Defaults
+S.def([monWorkL, monWorkL], twoMonitorLayout);
+S.def([monHome], oneMonitorLayout);
+
+// Layout Operations
+// var threeMonitor = S.op("layout", { "name" : threeMonitorLayout });
+var twoMonitor = S.op("layout", { "name" : twoMonitorLayout });
+var oneMonitor = S.op("layout", { "name" : oneMonitorLayout });
+var universalLayout = function() {
+ // Should probably make sure the resolutions match but w/e
+ if (S.screenCount() === 2) {
+ twoMonitor.run();
+ } else if (S.screenCount() === 1) {
+ oneMonitor.run();
+ }
+};
+
+// Batch bind everything. Less typing.
+S.bnda({
+ // Layout Bindings
+ "padEnter:ctrl" : universalLayout,
+ "space:ctrl" : universalLayout,
+
+ // Basic Location Bindings
+ "pad0:ctrl" : lapChat,
+ "[:ctrl" : lapChat,
+ "pad.:ctrl" : lapMain,
+ "]:ctrl" : lapMain,
+ "pad1:ctrl" : tboltBottomLeft,
+ "pad2:ctrl" : tboltBottomMid,
+ "pad3:ctrl" : tboltBottomRight,
+ "pad4:ctrl" : tboltLeft,
+ "pad5:ctrl" : tboltFull,
+ "pad6:ctrl" : tboltRight,
+ "pad7:ctrl" : tboltTopLeft,
+ "pad8:ctrl" : tboltTop,
+ "pad9:ctrl" : tboltTopRight,
+ "pad=:ctrl" : tboltTop,
+ "pad/:ctrl" : tboltBottom,
+ "pad*:ctrl" : hpBottomLeft,
+ "pad-:ctrl" : hpTopLeft,
+ "pad+:ctrl" : hpRight,
+
+ // Resize Bindings
+ // NOTE: some of these may *not* work if you have not removed the expose/spaces/mission control bindings
+ "right:ctrl" : S.op("resize", { "width" : "+10%", "height" : "+0" }),
+ "left:ctrl" : S.op("resize", { "width" : "-10%", "height" : "+0" }),
+ "up:ctrl" : S.op("resize", { "width" : "+0", "height" : "-10%" }),
+ "down:ctrl" : S.op("resize", { "width" : "+0", "height" : "+10%" }),
+ "right:alt" : S.op("resize", { "width" : "-10%", "height" : "+0", "anchor" : "bottom-right" }),
+ "left:alt" : S.op("resize", { "width" : "+10%", "height" : "+0", "anchor" : "bottom-right" }),
+ "up:alt" : S.op("resize", { "width" : "+0", "height" : "+10%", "anchor" : "bottom-right" }),
+ "down:alt" : S.op("resize", { "width" : "+0", "height" : "-10%", "anchor" : "bottom-right" }),
+
+ // Push Bindings
+ // NOTE: some of these may *not* work if you have not removed the expose/spaces/mission control bindings
+ "right:ctrl;shift" : S.op("push", { "direction" : "right", "style" : "bar-resize:screenSizeX/3" }),
+ "left:ctrl;shift" : S.op("push", { "direction" : "left", "style" : "bar-resize:screenSizeX/3" }),
+ "up:ctrl;shift" : S.op("push", { "direction" : "up", "style" : "bar-resize:screenSizeY/2" }),
+ "down:ctrl;shift" : S.op("push", { "direction" : "down", "style" : "bar-resize:screenSizeY/2" }),
+
+ // Nudge Bindings
+ // NOTE: some of these may *not* work if you have not removed the expose/spaces/mission control bindings
+ "right:ctrl;alt" : S.op("nudge", { "x" : "+10%", "y" : "+0" }),
+ "left:ctrl;alt" : S.op("nudge", { "x" : "-10%", "y" : "+0" }),
+ "up:ctrl;alt" : S.op("nudge", { "x" : "+0", "y" : "-10%" }),
+ "down:ctrl;alt" : S.op("nudge", { "x" : "+0", "y" : "+10%" }),
+
+ // Throw Bindings
+ // NOTE: some of these may *not* work if you have not removed the expose/spaces/mission control bindings
+ "pad1:ctrl;alt" : S.op("throw", { "screen" : "2", "width" : "screenSizeX", "height" : "screenSizeY" }),
+ "pad2:ctrl;alt" : S.op("throw", { "screen" : "1", "width" : "screenSizeX", "height" : "screenSizeY" }),
+ "pad3:ctrl;alt" : S.op("throw", { "screen" : "0", "width" : "screenSizeX", "height" : "screenSizeY" }),
+ "right:ctrl;alt;cmd" : S.op("throw", { "screen" : "right", "width" : "screenSizeX", "height" : "screenSizeY" }),
+ "left:ctrl;alt;cmd" : S.op("throw", { "screen" : "left", "width" : "screenSizeX", "height" : "screenSizeY" }),
+ "up:ctrl;alt;cmd" : S.op("throw", { "screen" : "up", "width" : "screenSizeX", "height" : "screenSizeY" }),
+ "down:ctrl;alt;cmd" : S.op("throw", { "screen" : "down", "width" : "screenSizeX", "height" : "screenSizeY" }),
+
+ // Focus Bindings
+ // NOTE: some of these may *not* work if you have not removed the expose/spaces/mission control bindings
+ "right:cmd" : S.op("focus", { "direction" : "right" }),
+ "left:cmd" : S.op("focus", { "direction" : "left" }),
+ "up:cmd" : S.op("focus", { "direction" : "up" }),
+ "down:cmd" : S.op("focus", { "direction" : "down" }),
+ "up:cmd;alt" : S.op("focus", { "direction" : "behind" }),
+ "down:cmd;alt" : S.op("focus", { "direction" : "behind" }),
+
+ // Window Hints
+ "esc:cmd" : S.op("hint"),
+
+ // Switch currently doesn't work well so I'm commenting it out until I fix it.
+ //"tab:cmd" : S.op("switch"),
+
+ // Grid
+ "esc:ctrl" : S.op("grid")
+});
+
+// Test Cases
+S.src(".slate.test", true);
+S.src(".slate.test.js", true);
+
+// Log that we're done configuring
+S.log("[SLATE] -------------- Finished Loading Config --------------");
View
0 zshrc → .zshrc
File renamed without changes.

0 comments on commit bf3cc2c

Please sign in to comment.
Something went wrong with that request. Please try again.