Created
August 12, 2014 03:47
-
-
Save anonymous/6dd96345f4a805dc7497 to your computer and use it in GitHub Desktop.
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
// Key combinations | |
var hyper = ['ctrl','alt','cmd','shift']; | |
var mash = ['ctrl','alt','cmd']; | |
// Screen placement movement | |
api.bind('h', mash, function() { to_left(1, 2); }); // left | |
api.bind('l', mash, function() { to_right(1, 2); }); // right | |
api.bind('k', mash, function() { to_top(1, 2); }); // up | |
api.bind('j', mash, function() { to_bottom(1, 2); }); // down | |
api.bind('.', mash, function() { to_bottom_right(1, 2); }); // bottom-right | |
api.bind('n', mash, function() { to_bottom_left(1, 2); }); // bottom-left | |
api.bind('p', mash, function() { to_top_right(1, 2); }); // top-right | |
api.bind('y', mash, function() { to_top_left(1, 2); }); // top-left | |
// Monitor movement | |
api.bind('left', mash, left_one_monitor); | |
api.bind('right', mash, right_one_monitor); | |
// Full screen | |
api.bind('space', hyper, full_screen); | |
api.bind('space', mash, full_screen); | |
api.bind('i', mash, full_screen); | |
// I also like to shift the focus from window to window: | |
// Focus | |
api.bind('h', hyper, function() {focus(LEFT);}); | |
api.bind('l', hyper, function() {focus(RIGHT);}); | |
api.bind('k', hyper, function() {focus(UP);}); | |
api.bind('j', hyper, function() {focus(DOWN);}); | |
// Finally, I also have my own hotkeys for application launching: | |
// Launcher | |
api.bind('e', ['cmd'], function() {App.focusOrStart('path finder');}); | |
api.bind('f9', ['cmd'], function() {App.focusOrStart('emacs');}); | |
api.bind('f10', ['cmd'], function() {App.focusOrStart('iterm');}); | |
api.bind('f11', ['shift', 'cmd'], function() {App.focusOrStart('google chrome canary');}); | |
api.bind('f11', ['cmd'], function() {App.focusOrStart('google chrome');}); | |
api.bind('f12', ['cmd'], function() {App.focusOrStart('notes');}); | |
api.bind('f', ['ctrl', 'shift', 'cmd'], function() {App.focusOrStart('evernote');}); | |
// Feel free to use and or adopt. And oh really, do give Phoenix a try if you’re looking | |
// for a better way to handle windows on a Mac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment