Created
December 2, 2020 01:55
-
-
Save erchn/c85f55412cd94d9526984b392878fad0 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"title": "Launch new Chrome or iTerm2 windows via keybindings", | |
"rules": [ | |
{ | |
"description": "caps lock - launches a new iTerm2 window with the default profile", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"mandatory": [ | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell app \"iTerm2\"' -e reopen -e activate -e end" | |
} ], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "left option + 1 - launches a new Google Chrome window", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "1", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell app \"Google Chrome\"' -e 'activate' -e activate -e end" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "left option + 2 - launches or activates Slack", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "2", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell app \"iTerm2\"' -e reopen -e activate -e end" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "left option + 3 - launches or activates Slack", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "3", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell app \"Slack\"' -e 'reopen' -e activate -e end" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "left option + 4 - launches or activates Zoom", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "4", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "osascript -e 'tell app \"zoom.us\"' -e 'reopen' -e activate -e end" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ "description": "command left arrow to command open bracket", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"command" | |
] | |
} | |
}, | |
"to": { | |
"key_code": "open_bracket", | |
"modifiers": { | |
"mandatory": [ | |
"command" | |
] | |
} | |
}, | |
"type": "basic" | |
} | |
] | |
}, | |
{ "description": "command right arrow to command close bracket", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_arrow", | |
"modifiers": { | |
"mandatory": [ | |
"command" | |
] | |
} | |
}, | |
"to": { | |
"key_code": "close_bracket", | |
"modifiers": { | |
"mandatory": [ | |
"command" | |
] | |
} | |
}, | |
"type": "basic" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment