1370 Commits

Author SHA1 Message Date
Mitchell Hashimoto
432fec7065 comments 2025-07-18 13:12:09 -07:00
Mitchell Hashimoto
7c77133a83 apprt/gtk-ng: implement size callbacks for surface 2025-07-18 13:07:31 -07:00
Mitchell Hashimoto
f0a0333bc0 apprt/gtk-ng: hook up surface render 2025-07-18 12:43:24 -07:00
Mitchell Hashimoto
2ab5d3cd81 apprt/gtk-ng: implement the quit_timer action to just quit 2025-07-18 11:42:44 -07:00
Mitchell Hashimoto
7c9e913ca9 apprt/gtk-ng: hook up surface initialization 2025-07-18 11:42:44 -07:00
Mitchell Hashimoto
9f2ff0cb9c apprt/gtk-ng: introduce a basic surface 2025-07-18 11:42:44 -07:00
Mitchell Hashimoto
d924593993 apprt/gtk-ng: extract common methods into a mixin (#7981)
Every GObject class we're ever going to make has the same handful of
methods. This adds *just enough* noise to be annoying. This commit
extracts the common ones so far into a central mixin. Since Zig is
removing `usingnamespace` and has no other mixin mechanism, we must
forward the decls, but this is still cleaner imo than what we did
before.

I suspect longer term we can probably abstract more of the `zig-gobject`
boilerplate into a higher level abstraction but I'm not confident doing
that yet across the 4 classes we have so far.

Credit to @pluiedev for pointing this out.
2025-07-18 07:34:47 -07:00
Mitchell Hashimoto
833f7f1142 apprt/gtk-ng: extract common methods into a mixin
Every GObject class we're ever going to make has the same handful of
methods. This adds *just enough* noise to be annoying. This commit
extracts the common ones so far into a central mixin. Since Zig is
removing `usingnamespace` and has no other mixin mechanism, we must
forward the decls, but this is still cleaner imo than what we did
before.

I suspect longer term we can probably abstract more of the `zig-gobject`
boilerplate into a higher level abstraction but I'm not confident doing
that yet across the 4 classes we have so far.
2025-07-18 07:31:29 -07:00
Jeffrey C. Ollie
38f044cd87 gtk-ng: fix missing progress_report action 2025-07-17 22:39:02 -05:00
Jeffrey C. Ollie
2d76c105bf gtk: remove notes about accessibility 2025-07-17 22:36:27 -05:00
Jeffrey C. Ollie
7a60fb2d08 core/gtk: add support for displaying a progress bar with OSC 9;4
Ghostty has had support for a while (since PR #3124) for parsing progress
reports but never did anything with them. This PR adds the core
infrastructure and an implementation for GTK.

On GTK, the progress bar will show up as a thin bar along the top of
the terminal. Under normal circumstances it will use whatever you have
set as your accent color. If the progam sending the progress report
indicates an error, it will change to a reddish color.
2025-07-17 22:36:27 -05:00
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