Created
July 20, 2022 18:17
-
-
Save rbreaves/878f8b75a24addd50f5212566036395b to your computer and use it in GitHub Desktop.
Allow macOS to toggle Terminal window on hotkey
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
set appName to "Terminal" | |
tell application "System Events" | |
if visible of application process appName is true then | |
set visible of application process appName to false | |
else | |
set visible of application process appName to true | |
set frontmost of application process appName to true | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Automator -> New Document
Quick Action -> Workflow receives: no input - on: any application -> Add Applescript, paste above code (& replace existing template code) -> Save as Toggle Terminal
Open Settings -> Keyboard -> Shortcuts -> Services -> Set hotkey combo for Toggle Terminal (suggested Ctrl+Shift+~)