1309 Commits

Author SHA1 Message Date
Mitchell Hashimoto
9b99e41cb2 apprt/gtk-ng: fix config textbuffer memory leak 2025-07-17 13:29:42 -07:00
Mitchell Hashimoto
8556877883 Add valgrind suppression file 2025-07-17 12:52:20 -07:00
Mitchell Hashimoto
b2fe9fd7db apprt/gtk-ng: fix merge conflict 2025-07-17 10:00:05 -07:00
Mitchell Hashimoto
562bd7e458 comments 2025-07-17 09:55:59 -07:00
Mitchell Hashimoto
cac32fc60d apprt/gtk-ng: hook up adw < 1.5 support 2025-07-17 09:55:59 -07:00
Mitchell Hashimoto
039e248ec9 typos 2025-07-17 09:55:59 -07:00
Mitchell Hashimoto
31c5af74c5 apprt/gtk-ng: handle config reloading 2025-07-17 09:55:58 -07:00
Mitchell Hashimoto
0da47903f4 apprt/gtk-ng: hook up all the refs to show the dialog 2025-07-17 09:55:58 -07:00
Mitchell Hashimoto
b253e2efe2 apprt/gtk-ng: proper memory management for config errors dialog 2025-07-17 09:55:58 -07:00
Mitchell Hashimoto
b1aab1e7bf apprt/gtk-ng: remove Ghostty-prefix from Zig-side classes 2025-07-17 09:55:58 -07:00
Mitchell Hashimoto
531d4a480e apprt/gtk-ng: hook up all the bindings for the config errors dialog 2025-07-17 09:55:30 -07:00
Mitchell Hashimoto
c3ba6e252e apprt/gtk-ng: use the GhosttyConfig class to wrap our config 2025-07-17 09:55:30 -07:00
Mitchell Hashimoto
897649a3af apprt/gtk-ng: GhosttyConfigErrors 2025-07-17 09:55:29 -07:00
Mitchell Hashimoto
e76a151b42 apprt/gtk-ng: GhosttyConfig 2025-07-17 09:55:29 -07:00
Tristan Partin
2695361274 apprt/gtk-ng: assert that GTK is uninitialized in setGtkEnv
Signed-off-by: Tristan Partin <tristan@partin.io>
2025-07-16 22:38:37 -06:00
Mitchell Hashimoto
426fa8d8f9 apprt/gtk-ng: move our app initialization all into the App class 2025-07-16 12:20:13 -07:00
Mitchell Hashimoto
3257203b6c apprt/gtk-ng: start basic window 2025-07-16 09:40:34 -07:00
Mitchell Hashimoto
bb96388902 apprt/gtk-ng: cgroup base setup 2025-07-16 09:40:34 -07:00
Mitchell Hashimoto
ce06eb5f64 apprt/gtk-ng: application startup to initialize styles 2025-07-16 09:40:34 -07:00
Mitchell Hashimoto
ecb77fb8bc apprt/gtk-ng: gresource creation, resource registration in Application 2025-07-16 09:40:34 -07:00
Mitchell Hashimoto
9c6cf61cd4 apprt/gtk-ng: GhosttyApplication and boilerplate to run 2025-07-16 09:40:34 -07:00
Mitchell Hashimoto
2f9660c02c apprt/gtk-ng: boilerplate 2025-07-16 09:40:34 -07:00
Jeffrey C. Ollie
dd3853abeb cli/gtk: move IPC/sendIPC to App/performIpc 2025-07-14 14:48:12 -05:00
Jeffrey C. Ollie
f5eb413c31 cli/gtk: clean ups and better error handling in GTK new-window IPC 2025-07-14 14:48:12 -05:00
Jeffrey C. Ollie
7d05f4c0c5 cli/gtk: don't set GHOSTTY_CLASS 2025-07-14 14:48:12 -05:00
Jeffrey C. Ollie
361d03b578 cli/gtk: remove --release and --debug flags, use optional for arguments 2025-07-14 14:48:12 -05:00
Jeffrey C. Ollie
81358c8dca cli/gtk: replace @hasDecl for performAction-style API
Instead of using @hasDecl, use a performAction-stype API. The C
interface for interfacing with macOS (or any other apprt where Ghostty
is embedded) is unfinished.
2025-07-14 14:48:11 -05:00
Jeffrey C. Ollie
72e47cf8bc cli/gtk: move actual IPC code tp apprt 2025-07-14 14:48:11 -05:00
Jeffrey C. Ollie
824185f23e cli/gtk: add -e to +new-window
This adds the `-e` flag to the `+new-window` CLI action. This allows a
command to be passed from the CLI to the running instance of Ghostty.
Nothing is done with that command besides logging its presence.
2025-07-14 14:48:11 -05:00
Jeffrey C. Ollie
340d190bf0 cli/gtk: clarify +new-window documentation and improve instance discovery
- Add a `GHOSTTY_CLASS` environment variables to any command executed by
  Ghostty to make discovering the correct application ID easier.

- Add a flag to force the relelase application ID.

- Ensure that CLI flags to `+new-window` are mutually exclusive.

- Fix documentation about D-Bus activation requirements.
2025-07-14 14:48:11 -05:00
Jeffrey C. Ollie
1abc3ba1da gtk: change child exited verbiage to be clearer and code cleanup 2025-07-11 22:56:22 -05:00
Jeffrey C. Ollie
9ee25e8a69 gtk: use close button in show_child_exited banner 2025-07-11 22:56:22 -05:00
Jeffrey C. Ollie
8cea111329 gtk: add some comments for show_child_exited 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
49243db4b3 gtk: GtkBox not needed for show_child_exited 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
7fd900647e show_child_exited: remove emojis 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
f24ec13963 remove unused css class from gtk child exited widget 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
bf0659f07b use checkmark for icon if child exits normally 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
3d89a68fff fix error set for function return signature 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
28c7083876 gtk show_child_edit: use different text for normal/abnormal exit
Without this, the only indication would be the difference between a red
or a green background which would be problematic for users with limited
vision or color blindness.
2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
5219bc51e5 show child exited: return a boolean if native GUI is shown
If a native GUI is shown by the runtime when a child exits, use the
returned boolean to determine if text should be show in the terminal to
avoid duplicating information.
2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
103772ee8f show child exited: make GTK banner transparent 2025-07-11 22:56:21 -05:00
Jeffrey C. Ollie
033d8c3099 core/gtk: add apprt action to show native GUI warning when child exits
Addresses #7649 for the core and GTK. macOS support will need to be
added later.

This adds an apprt action to show a native GUI warning of some kind when
the child process of a terminal exits.

Also adds a basic GTK implementation of this. In GTK it overlays an
Adwaita banner at the bottom of the window (similar to the banner that
shows up in at the top of windows in debug builds).
2025-07-11 22:56:20 -05:00
Jeffrey C. Ollie
248acbea5b gtk: remove NOTIFY_SOCKET from the inherited environment variables 2025-07-09 13:11:02 -05:00
Jeffrey C. Ollie
c9d0bbefc2 linux: switch systemd user service to type=notify-reload
This allows `systemctl` to send SIGUSR2 to Ghostty to trigger a reload,
which is more convenient than scripting `ps` and `kill` to find the
Ghostty main PID.
2025-07-09 13:11:01 -05:00
Mitchell Hashimoto
86dbfb98d7 Run GTK unit tests in CI, fix broken tests
We only ran `apprt=none` tests in CI, which misses a huge surface area
of unit tests. Thankfully only a couple were broken. This fixes that.
2025-07-09 10:56:30 -07:00
Mitchell Hashimoto
b7ffbf933f macos: open URLs with NSWorkspace APIs instead of open
Fixes #5256

This updates the macOS apprt to implement the `OPEN_URL` apprt action to
use the NSWorkspace APIs instead of the `open` command line utility.

As part of this, we removed the `ghostty_config_open` libghostty API and
instead introduced a new `ghostty_config_open_path` API that returns the
path to open, and then we use the `NSWorkspace` APIs to open it (same
function as the `OPEN_URL` action).
2025-07-06 21:01:01 -07:00
Mitchell Hashimoto
cbcb0b795c Fallback to cross-platform minimal open when apprt is not available 2025-07-06 15:15:48 -07:00
Jeffrey C. Ollie
70a2a0afd5 better ABI check for apprt.Action.CValue 2025-07-06 15:02:48 -07:00
Jeffrey C. Ollie
9583ea1b7a core/gtk: open urls using an apprt action instead of doing it directly
Partial implementation of #5256

This implements the core changes necessary to open urls using an apprt
action rather than doing it directly from the core.

Implements the open_url action in the GTK and GLFW apprts.

Note that this should not be merged until a macOS-savvy developer can add
an implementation of the open_url action for the macOS apprt.
2025-07-06 15:02:48 -07:00
Jeffrey C. Ollie
b752ade112 gtk: don't allow focusing on tab overview or menu buttons
This prevents GTK from focusing on those buttons, which would prevent
focus from returning to the terminal after those buttons had been used.
2025-07-06 01:05:17 -05:00