Skip to content

Instantly share code, notes, and snippets.

@Leask
Created May 14, 2021 02:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leask/3f047c41efaf20b084e31d14d9121a2a to your computer and use it in GitHub Desktop.
Save Leask/3f047c41efaf20b084e31d14d9121a2a to your computer and use it in GitHub Desktop.
TogglERMINAL.workflow // Show or Hide Terminal.app
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