This makes a few major changes:
- cursor style on terminal is single source of stylistic truth
- cursor style is split between style and style request
- cursor blinking is handled by the renderer thread
- cursor style/visibility is no longer stored as persistent state on
renderers
- cursor style computation is extracted to be shared by all renderers
- mode 12 "cursor_blinking" is now source of truth on whether blinking
is enabled or not
- CSI q and mode 12 are synced like xterm
I know not everybody uses ZLS (or LSPs in general) but I think it's very
useful and it's very handy to have it in the `flake.nix` to keep it up
to date with the `zig` version.
As with a lot of my PRs in this project, please consider the following a
disclaimer: I have 0 clue what I'm doing here and if there's a better
way to do what I'm trying to do, let me know!
Inspired by #413.
This modifies the .desktop files so that it's possible to right-click on
the Ghostty icon in a dock and get the "New window" action.
Apparently this is how you implement that in GTK applications. In order
for us to also get "New tab", we'd have to implement a CLI flag, I
think.
Fixes#400
This ensures the hollow box is shown even if the cursor is not in a
blinking state when unfocus happens. We still hide the cursor even on
unfocus if the terminal mode explictly asks for a hidden cursor.
This is based on our conversation on Discord and adds a setting for GTK
that allows disabling the GTK single-instance mode.
If this is off, it's possible to start multiple applications from the
same release binary.
Tested like this:
```
$ zig build -Dapp-runtime=gtk -Doptimize=ReleaseFast && ./zig-out/bin/ghostty --gtk-single-instance=false
[... starts new application ...]
```
and
```
$ zig build -Dapp-runtime=gtk -Doptimize=ReleaseFast && ./zig-out/bin/ghostty --gtk-single-instance=true
info: ghostty version=0.1.0-main+42a22893
info: runtime=apprt.Runtime.gtk
info: font_backend=font.main.Backend.fontconfig_freetype
info: dependency harfbuzz=8.0.0
info: dependency fontconfig=21400
info: renderer=renderer.OpenGL
info: libxev backend=main.Backend.io_uring
info(os): LANG is not valid according to libc, will use en_US.UTF-8
info: reading configuration file path=/home/mrnugget/.config/ghostty/config
info(config): default shell source=env value=/usr/bin/zsh
(process:49045): GLib-GIO-WARNING **: 13:55:56.116: Your application did not unregister from D-Bus before destruction. Consider using g_application_run().
[exits]
```
This is part of #319 by fixing it for GTK and introducing the
configuration option.
This adds `window-decoration = false` as a possible configuration
option. If set to `false`, then no window decorations are used.
Fixes#290
Previously, our io_uring loops were exiting on EINTR. EINTR is sent for
various reasons but particularly when a process is stopped such as for
sleeping. We should not exit these loops.
Longer term we should be more resilient to detecting that our renderer
and/or IO thread as died and behave in some better way but this
addresses a major issue in the mean time.