alacritty terminal adapter - #53
Open
mduvarci12 wants to merge 1 commit into
Open
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new terminal backend for Alacritty, following the
launch-only adapter contract already used by
windows-terminal.sh.Alacritty has no AppleScript dictionary and no built-in way to return a stable,
queryable window/tab id, so this adapter can open a terminal surface per
role but cannot reliably track or reopen it afterward. Concretely:
terminal_backend_can_open_sessions→return 0(it can open sessions)terminal_backend_tracks_windows→return 1(no stable id to track)This means SwarmForge opens one Alacritty window per configured role and skips
the watchdog for those windows, exactly like the existing Windows Terminal
adapter. Closing the first (cleanup) window still works normally, since that
path doesn't depend on window tracking.
Usage
What's implemented
terminal_backend_label— returns"Alacritty"terminal_backend_can_open_sessions—return 0terminal_backend_tracks_windows—return 1(launch-only)terminal_open_session— opens a new Alacritty window viaopen -na Alacrittythat attaches directly to the assigned tmux socket/session
terminal_window_exists/terminal_close_window— no-ops consistent withthe launch-only contract (nothing SwarmForge can reliably track or close)
Testing
Tested manually on macOS (Sonoma) with Alacritty installed via Homebrew:
SWARMFORGE_TERMINAL=alacritty ./swarmopens one Alacritty window per roleLimitations / follow-ups
same limitation as the Windows Terminal adapter.
System Eventswindowmatching (by title), but this felt more fragile than useful for a first pass —
happy to discuss if maintainers want that instead.