I prefer to run my editor as a separate, dedicated macOS application rather than from an existing terminal session.
It's just Alacritty started with hx command on startup using an AppleScript.
-
Copy the existing Alacritty application bundle (or the provided bundle, if available):
cp -R /Applications/Alacritty.app /Applications/TermHelix.app
-
Copy the HelixEditor application to your
/Applications
directory. -
Edit the application metadata in
/Applications/TermHelix.app/Contents/Info.plist
:- Change
CFBundleName
toTermHelix
- Change
CFBundleIdentifier
to something unique, e.g.se.iwanofski.termhelix
- Change
CFBundleIconFile
tohelix.icns
- Change
-
Copy helix.icns file:
- Copy helix.icns into
/Applications/TermHelix.app/Contents/Resources/
- Copy helix.icns into
-
Refresh the Launch Services cache:
touch /Applications/TermHelix.app
-
Create an AppleScript launcher (using the Script Editor or modifying the existing one in repo):
property termAppPath : "/Applications/TermHelix.app"
property hxPath : "/opt/homebrew/bin/hx"
property windowTitle : "Helix"
property winColumns : 220 -- width in characters
property winLines : 30 -- height in characters
on run
-- No files: just launch Helix
my launchHelix({})
end run
on open theItems
-- Files dropped: open them all
my launchHelix(theItems)
end open
on launchHelix(theItems)
set argString to ""
repeat with anItem in theItems
set fp to POSIX path of anItem
set argString to argString & " " & quoted form of fp
end repeat
-- Build command with window size options
set cmd to "open -a " & quoted form of termAppPath & ¬
" --args --title " & quoted form of windowTitle & ¬
" --option window.dimensions.columns=" & winColumns & ¬
" --option window.dimensions.lines=" & winLines & ¬
" -e " & quoted form of hxPath & argString
do shell script cmd
end launchHelix
-
Export the AppleScript:
- In Script Editor, choose File → Export….
- Select Application as the file format.
- Enable Run-only mode.
- Save it to
/Applications
, e.g./Applications/Helix.app
.
-
Update the launcher’s icon:
- Right-click the new
Helix.app
and select Get Info. - Drag the provided Helix logo PNG into the icon preview in the top-left corner of the Info window.
- Right-click the new