Skip to content

Instantly share code, notes, and snippets.

@eniraa
Last active May 10, 2025 21:51
Show Gist options
  • Save eniraa/6d84ec4032e1f57526bdbd4984259070 to your computer and use it in GitHub Desktop.
Save eniraa/6d84ec4032e1f57526bdbd4984259070 to your computer and use it in GitHub Desktop.
AppleScript to launch Zed as a terminal.
on run
set wasRunning to (application "Zed" is running)
tell application "Zed" to activate
delay 0.05
if wasRunning then
tell application "System Events" to keystroke "n" using {command down, shift down}
delay 0.1
tell application "System Events" to keystroke "w" using {command down}
end if
delay 0.1
tell application "System Events" to keystroke "j" using {command down}
delay 0.05
tell application "System Events" to key code 53 using {shift down}
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment