Last active
May 16, 2018 09:11
-
-
Save umara123/28c293f2ada701ba7deceb72fc2cc3cd to your computer and use it in GitHub Desktop.
Revisions
-
umara123 revised this gist
May 16, 2018 . 1 changed file with 18 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,15 @@ var pushRight = slate.operation("push", { "direction" : "right", "style" : "bar-resize:screenSizeX/3" }); var pushRightTab = slate.operation("push", { "direction" : "right", "style" : "bar-resize:screenSizeX/2" }); var pushLeft = slate.operation("push", { "direction" : "left", "style" : "bar-resize:screenSizeX/2" }); var pushLeftTab = slate.operation("push", { "direction" : "left", "style" : "bar-resize:screenSizeX/3" }); @@ -24,10 +32,18 @@ var fullscreen = slate.operation("move", { slate.on("windowOpened", function(event, win) { var appName = win.app().name(); var appTitle = win.title(); slate.log('Slate appName' + ' ' + appName) slate.log('Slate appTitle' + ' ' + appTitle) if (appName.includes("Simulator") && appTitle.includes("iPhone")) { win.doOperation(pushLeft); } else if (appName.includes("Simulator") && appTitle.includes("iPad")) { win.doOperation(pushLeftTab); }else if ((appName.includes("Android") || appName.includes("qemu")) && appTitle.includes("tablet")) { win.doOperation(pushRightTab); } else if (appName.includes("Android") || appName.includes("qemu")) { win.doOperation(pushRight); } }); -
umara123 created this gist
May 15, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ cd /Applications && curl http://www.ninjamonkeysoftware.com/slate/versions/slate-latest.tar.gz | tar -xz cd ~ cat > .slate.js << EOF var pushRight = slate.operation("push", { "direction" : "right", "style" : "bar-resize:screenSizeX/3" }); var pushLeft = slate.operation("push", { "direction" : "left", "style" : "bar-resize:screenSizeX/3" }); var pushTop = slate.operation("push", { "direction" : "top", "style" : "bar-resize:screenSizeY/2" }); var fullscreen = slate.operation("move", { "x" : "screenOriginX", "y" : "screenOriginY", "width" : "screenSizeX", "height" : "screenSizeY" }); slate.on("windowOpened", function(event, win) { var appName = win.app().name(); if (appName.includes("Simulator") || appName.includes("iPhone")) { win.doOperation(pushLeft); } else if (appName.includes("qemu") || appName.includes("Android")) { win.doOperation(pushRight); } }); EOF echo "" >> .bash_profile echo "open -a Slate" >> .bash_profile echo "DONE"