Macã§èµ·åä¸ã®ã¢ããªãåãæ¿ããã®ã«ã⌘+Tabã ãã ã¨ããããèµ·åãã¦ããã¨ãã«é¸æããããã«é£æããã®ãé¢åã ãé »ç¹ã«ä½¿ããã®ã¯ä¸çºã§åãæ¿ããããã«ããããã¨ããã®ããã£ã¦ã
ä»ã¾ã§ãã£ã¨ãããQuicksilverã®HotKeyæ©è½ãå©ç¨ãã¦
ã¿ããã«å·¦æã®æä½ã ãã§åãæ¿ããããããã«ãã¦ããã
ã¨ããã§æè¿ãSlateã¨ããã®ãé¢ç½ããã¨ãã話ãææã§èããã®ã§è©¦ãã«å
¥ãã¦ã¿ãã
GitHub - jigish/slate: A window management application (replacement for Divvy/SizeUp/ShiftIt)
DivvyãSizeUpã¨ãã£ãã¦ã£ã³ãã¦æä½ç³»ãã¼ã«ã¨ãã¦ä½¿ãããã®ã®ããã ãã©(両æ¹ã¤ãã£ããã¨ãªãããç¥ããªã)ã
~/.slate
ã«è¨å®ãã¡ã¤ã«ãæ¸ããã¨ã§æ§ã
ãªæä½ãè¦å®ãã¦ãã¼ãã¤ã³ãè¨å®ã§ããããã¦è¯ããããã«~/.slate.js
ã«JavaScriptã³ã¼ãã§è¨å®ãæ¸ããã¨ãã§ãããã¨ããã®ãé¢ç½ããslate
ãããã¯S
ã¨Underscore.jsãglobal objectã¨ãã¦ä½¿ããã¨ãã§ãã¦ããããã使ã£ã¦è²ã
ã§ããã
JavaScript Configs · jigish/slate Wiki · GitHub
S.bind('q:ctrl,cmd', function (win) { win.doOperation(S.operation('focus', { app: 'iTerm' })); });
ã¨æ¸ããã¨ã§⌘+Ctrl+Qã§iTermã«focusããããã¨ãã£ããã¨ãåºæ¥ãã
ããããããªãJSã§æ¸ãå¿
è¦ããªãã®ã ãã©ãããã¯èµ·åãã¦ããªãã¨ãã«ä½ãèµ·ãããªãã®ã§ãããæå®ããappãç«ã¡ä¸ãã£ã¦ããªãå ´åã¯shellã³ãã³ãçµç±ã§/usr/bin/open
ã使ã£ã¦èµ·åãããä¸ã§focusãããããã«ãããæ¡ä»¶åå²ã¯ããã°ã©ãã³ã°è¨èªã§æ¸ããããã®ã§å¬ããã
S.bind('q:ctrl,cmd', function (win) { var apps = []; S.eachApp(function (app) { apps.push(app.name()); }); if (! _.find(apps, function (name) { return name === 'iTerm'; })) { win.doOperation( S.operation('shell', { command: '/usr/bin/open -a iTerm', waithFoeExit: true }) ); } win.doOperation(S.operation('focus', { app: 'iTerm' })); });
S.eachApp()
ã§èµ·åä¸ã®appãåæã§ããã®ã§ããã®ä¸ã«focusãããappã®ååããããå¦ãã調ã¹ã¦è¦ã¤ãããªãã£ããopenã
ãã¨ã¯å
±éã§åããããªãã¨ãã§ããããã«é¢æ°ãå®ç¾©ãã¦ãã£ã¦ã
var launch_and_focus = function (target) { return function (win) { var apps = []; S.eachApp(function (app) { apps.push(app.name()); }); if (! _.find(apps, function (name) { return name === target; })) { win.doOperation( S.operation('shell', { command: "/usr/bin/open -a " + target, waithFoeExit: true }) ); } win.doOperation(S.operation('focus', { app: target })); }; }; S.bind('q:ctrl,cmd', launch_and_focus('iTerm')); S.bind('w:ctrl,cmd', launch_and_focus('Emacs')); S.bind('e:ctrl,cmd', launch_and_focus('Google Chrome')); S.bind('r:ctrl,cmd', launch_and_focus('Safari')); S.bind('t:ctrl,cmd', launch_and_focus('Twitter'));
ã¨ããæãã§ããããHotKeyã§ã®åãæ¿ããå®ç¾©ãã¦ãããã
â¦ã¨ãããããªãã¨ãä¸è¨è¨äºã«æ¸ãã¦ããã¾ãã¦å¤§å¤åèã«ãªãã¾ããã
Slateでアプリ切り替えをする設定 - ミントフレーバー緑茶
ã§ãããã"Google Chrome"ã®ã¨ãã«openã³ãã³ããåããªããç¡æ¡ä»¶ã§ã¹ãã¼ã¹ã§åºåã£ã¦ã³ãã³ãã«å¼æ°ã¨ãã¦æ¸¡ããã¦ãã¾ãããããã¯ã©ã¼ããã¦ããã¡ãã®ããã ã£ãã®ã§ä¸å¿pull reqéã£ã¦ã¿ããã
ãªãããã¾ã«å¤ãªã¨ã©ã¼ãåºã¦ãããããªããã©ãã»ã¼åé¡ãªãå¿«é©ã«ä½¿ãã¦ãããã®ã§Quicksilverã¯åæ¥ãã¦launcherã¨ãã¦ã¯Alfredã使ãããã«ãã¦ã¿ãã
Slateèªä½ã¯ã¦ã£ã³ãã¦ã®ç§»åã¨ããµã¤ãºå¤æ´ã¨ãæè»ã«è²ã
ã§ããã¯ããªã®ã§ããå°ãè²ã
è¨å®ãã¦è©¦ãã¦ã¿ããããªããã¡è¨å®ã¨ãããã°æãã¦ãã ããâ¦