Fixes#139
From the issue:
Looking into this now, I think I figured out the broken logic. When launching
from open, the parent process of Ghostty is launchd which appears to set your
SHELL env var to your configured shell when logging in. That's why a restart
fixes it. However, I believe directory services (the macOS equivalent to
/etc/passwd) is updated in real time.
Ghostty does read directory services but at a lower priority than SHELL.
This logic makes sense for CLI-launched terminals but not desktop-launched.
From a CLI you want the terminal you're launching to probably inherit the shell
from the CLI you launched it from. (Note that using open explicitly forces a
launchd-style launch so it quacks as if it was double-clicked on the desktop).
In conclusion, I believe the correct logic is to invert the priority on SHELL
vs directory services when Ghostty detects it was launched from launchd. We
already have this detection logic in Ghostty because we use it for a number of
other things as well, so this should be easy to fix. I'll work on it later
today.
Fixes#1227Fixes#1206
This moves the logic that respects `window-width` and `window-height` to
the controller window initialization. This is where it should've been
all the time but we previously didn't use a controller architecture so
we did our best to use heuristics in the view to do this.
This location now ensures that this only happens on window
initialization and only if we have one surface.
Nix flake [schema] allows for a top level attribute called `nixConfig`.
This allows a flake to extend a users nix for the specific flake.
This lets us add ghostty's binary cache automatically when using the
repo (nix develop, nix build, ...).
[schema]: https://nixos.wiki/wiki/Flakes#Flake_schema
Rather than immediately converting a color palette index into an RGB
value for a cell color, when a palette color is used track the palette
color directly in the cell state and convert to an RGB value in the
renderer.
This causes palette color changes to take effect immediately instead of
only for newly drawn cells.
Fixes#1198
This adds a fix similar to what we discovered with termio messages: we
attempt to send a surface message but if the queue is full we unlock the
terminal state and try again waiting forever.
In all cases, its safe to unlock the mutex while sending the message, no
scenario we send a surface message requires this lock to be held.