This reverts commit c139279d479682c17f63d9b57c2d56608d09d16a, reversing
changes made to 4ed21047a734d7c586debe0026e3b6ea90ed1622.
We do want to do this but this broke bindings.
* search for resources dir relative to executing binary on Linux
From Andrew in #241:
This works in all 3 of the possible scenarios I can think of on Linux:
* `zig build` with default prefix into `zig-out`
* `zig build -p ~/local` (my choice when compiling from source)
* ghostty packaged for a linux distribution into /usr/bin and /share
* update README
This was a regression. The previous logic would always show the cursor
if we were using a non-blinking cursor. But, if the terminal state is
explicitly requesting an invisible cursor (mode 25) then we need to hide
the cursor.
I couldn't get icons to work for the flatpak version, so I looked at the
reference here: https://docs.flatpak.org/en/latest/freedesktop-quick-reference.html
That says the path format is `share/icons/hicolor/<resolution>/apps/<icon>`.
That also matches what I have on my Ubuntu machines: icons are, for
example, located in these two locations:
- `/usr/share/icons/hicolor/128x128/apps`
- `~/.local/share/icons/hicolor/128x128/apps`
Note the `/apps`.
This menu got list in #215 and with it we lost the ability to use the
macOS emoji picker via the `Cmd+Ctrl Space` shortcut, for example.
This adds a standard Edit menu back to the main menu.
Previously, this would crash. Once the crash was fixed, it would hang
because we would only show confirmation if the terminal window had
focus.
This introduces some medium complexity logic to work around this:
1. If we are the key window, then show the confirmation dialog. Done.
2. Otherwise, if any other window is a terminal window and is key,
they're going to take it so we do nothing.
3. Otherwise, if we are the first terminal window in the application
windows list, we show it even if we're not focused.
Previously, we'd send renderer screen size updates and termio sigwnch
updates on every single resize event even if the screen size or grid
sizes didn't change. This is super noisy and given how many resize
events macOS sends, its also very expensive.
This commit makes it so that we only update the renderer if the screen
changed. If the screen size didn't change, the grid size couldn't have
changed either.
If the screen size did change, its still possible the grid size didn't
change since Ghostty supports fluid pixel-level resizing. We have to
send the screen size event to the renderer so all the GPU shader vars
are right but we do not have to send a termio event.
So, only if the grid size changed do we then notify the pty that the
terminal dimensions changed. Note that the resize event for ptys does
have a pixel-level x/y but I don't think the granularity is useful
beyond grid changes.