Created
May 14, 2021 02:44
-
-
Save Leask/3f047c41efaf20b084e31d14d9121a2a to your computer and use it in GitHub Desktop.
TogglERMINAL.workflow // Show or Hide Terminal.app
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
set strTime to date string of (current date) & " " & time string of (current date) | |
tell application "System Events" | |
set curApp to name of first application process whose frontmost is true | |
if curApp is "Terminal" then | |
set visible of application process "Terminal" to false | |
display notification strTime with title "Flora" subtitle "🎮 Terminal is hidden." sound name "Submarine" | |
else | |
tell application "Terminal" to activate | |
display notification strTime with title "Flora" subtitle "💻 Terminal is shown." sound name "Blow" | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment