10546 Commits

Author SHA1 Message Date
fn ⌃ ⌥
071531c5c5 Add "Scroll to Selection" command 2025-05-06 16:26:22 -07:00
Mitchell Hashimoto
eb7368699b macOS: move window title handling fully to AppKit, fix command palette losing title (#7283)
Fixes #7236
Supersedes #7249

This removes all of our `focusedValue`-based tracking of the surface
title and moves it completely to the window controller. The window
controller now sets up event listeners (via Combine) when the focused
surface changes and updates the window title accordingly.

There is some complicated logic here to handle when we lose focus to
something other than a surface. In this case, we want our title to be
the last focused surface so long as it exists.

The prior `focusedValue`-based code was a relic of when Ghostty was a
full SwiftUI app. Now that we have AppKit in the mix (and have for a
couple years), we shouldn't bolt on fixes to that cruft if we can help
it.
2025-05-06 15:13:04 -07:00
Mitchell Hashimoto
2caa8a3fe1 macOS: move window title handling fully to AppKit
Fixes #7236
Supersedes #7249

This removes all of our `focusedValue`-based tracking of the surface
title and moves it completely to the window controller. The window
controller now sets up event listeners (via Combine) when the focused
surface changes and updates the window title accordingly.

There is some complicated logic here to handle when we lose focus to
something other than a surface. In this case, we want our title to be
the last focused surface so long as it exists.
2025-05-06 14:57:19 -07:00
Jeffrey C. Ollie
27cdd6d79c gtk: require blueprint-compiler 0.16 for building (#6827)
Changes:

1. Require `blueprint-compiler` 0.16.0 (or newer) for building from a
git checkout. With #6822 distributions that can't meet that requirement
can use generated source tarballs to build.
2. Remove all `.ui` files as they are unnecessary.
3. Simplify the `Builder` interface since raw `.ui` files are no longer
used.
4. Removed build-time check of raw `.ui` files.
2025-05-06 16:06:53 -05:00
Mitchell Hashimoto
5f8a0dc4a0 termio, flatpak: support spawning terminals in cwd (#6915)
Implements path access testing for Flatpak via test spawning. This is
required since Flatpak reserves certain paths from being accessible
regardless of permissions.

Opened mostly as an RFC, this approach seems to work without any
noticeable performance impact.

Ref:
https://docs.flatpak.org/en/latest/sandbox-permissions.html#reserved-paths
2025-05-06 13:59:48 -07:00
Mitchell Hashimoto
732500b418 feat: implement toggleMaximize for macOS (#7191)
Resolve #7030
2025-05-06 13:43:57 -07:00
Leorize
b6f120a749 termio, flatpak: support spawning terminals in cwd
Implements path access testing for Flatpak via test spawning. This is
required since Flatpak reserves certain paths from being accessible
regardless of permissions.

Ref: https://docs.flatpak.org/en/latest/sandbox-permissions.html#reserved-paths
2025-05-06 13:42:14 -07:00
Mitchell Hashimoto
e5765dfa79 macOS: save/restore firstResponder on non-native fullscreen (#7279)
Fixes #6999
Supersedes #7201 

It appears that at some point one of the operations causes focus to move
away for non-native fullscreen. We previously relied on the delegate
method to restore this but a better approach appears to handle this
directly in the fullscreen implementations. This fixes the linked issue.

I still think long term all the `Ghostty.moveFocus` stuff is a code
smell and we should be auditing all that code to see if we can eliminate
it. But this is a step in the right direction, and removes one of those
uses.
2025-05-06 13:32:33 -07:00
Mitchell Hashimoto
e2a0f439c6 macOS: save/restore firstResponder on non-native fullscreen
Fixes #6999

It appears that at some point one of the operations causes focus to move
away for non-native fullscreen. We previously relied on the delegate
method to restore this but a better approach appears to handle this
directly in the fullscreen implementations. This fixes the linked issue.

I still think long term all the `Ghostty.moveFocus` stuff is a code
smell and we should be auditing all that code to see if we can
eliminate it. But this is a step in the right direction, and removes one
of those uses.
2025-05-06 12:59:31 -07:00
Mitchell Hashimoto
d0a8cb671b macOS: handle scenario cgWindowId is nil (#7277)
Fixes #7114
Supercedes #7271

This fixes a crash that could occur with non-native fullscreen and
`fullscreen = true` set at once.

The "windowNumber" can be `<= 0` if the window "doesn't have a window
device." I don't fully know all the scenarios this is true but it is
true when the window is not visible, at least.
2025-05-06 10:50:14 -07:00
Mitchell Hashimoto
9b78917246 macOS: handle scenario cgWindowId is nil
Fixes #7114
Supercedes #7271

This fixes a crash that could occur with non-native fullscreen and
`fullscreen = true` set at once.

The "windowNumber" can be `<= 0` if the window "doesn't have a
window device." I don't fully know all the scenarios this is true but it
is true when the window is not visible, at least.
2025-05-06 10:33:56 -07:00
Mitchell Hashimoto
a4bd6efcbf ci: add flatpak JSON for iterm2 theme updates (#7275)
I forgot to add the path in the GitHub action.
2025-05-06 09:51:08 -07:00
Mitchell Hashimoto
9221d392de ci: add flatpak JSON for iterm2 theme updates
I forgot to add the path in the GitHub action.
2025-05-06 07:20:56 -07:00
Mitchell Hashimoto
3c405a591a update flatpak cache 2025-05-06 07:19:40 -07:00
Mitchell Hashimoto
702c3f58d9 font/freetype: introduce mutexes to ensure thread safety of Library and Face (#7238)
tl;dr: FT_New_Face and FT_Done_Face require the Library to be locked for
thread safety, and FT_Load_Glyph and FT_Render_Glyph and friends need
the face to be locked for thread safety, since we're sharing faces
across threads.

For details see comments and FreeType docs @
-
https://freetype.org/freetype2/docs/reference/ft2-library_setup.html#ft_library
-
https://freetype.org/freetype2/docs/reference/ft2-face_creation.html#ft_face

---

This might resolve the issue discussed in #7016 but I wasn't able to
reliably reproduce it in a way I could debug, so someone who was
experiencing it should probably test this PR.

Additionally I can still semi-reliably produce a crash with the GTK
apprt by setting an `all:` keybind to adjust font sizes and changing the
font size rapidly with many surfaces open with emojis on them.
Unfortunately I can't really tell what the root cause is because the
debug info is broken in QEMU.

However, I do think this is a good idea for us to be thread safe with
this stuff even if it isn't related to that problem.
2025-05-06 07:18:11 -07:00
Mitchell Hashimoto
f73f7c805d Fix removed GDK_DEBUG gl-no-fractional (#7233)
`gl-no-fractional` is removed from GTK v4.17.5
2025-05-06 07:17:28 -07:00
Mitchell Hashimoto
050e40a29d Implement dark/light theme filtering in theme preview (#7248)
This pr closes https://github.com/ghostty-org/ghostty/issues/7235

Demo:


https://github.com/user-attachments/assets/88366ac7-fcdb-49e9-bed7-8deb0eebeb9e
2025-05-06 07:16:46 -07:00
Mitchell Hashimoto
7ce828253a bash: explicitly request a login shell (#7253)
Prior to #7044, on macOS, our shell integrated command line would be
executed under `exec -l`, which caused bash to be started as a login
shell. Now that we're using direct command execution, add `--login` to
our bash command's arguments on macOS to get that same behavior.
2025-05-06 07:16:09 -07:00
Mitchell Hashimoto
e2b5bfb5b0 gtk: fix comment about adwaita version (#7274) 2025-05-06 07:04:32 -07:00
Mitchell Hashimoto
f13d74bcf0 improvements to the Issue Triage Discussion template (#7266)
After some time with the initial template and Discussions being created,
there are some improvements we should make to the Issue Triage template.

Most of these changes were discussed in #7012 and among helpers in the
Discord.

~~I've marked this as a Draft for now as I work with the helpers to
confirm how we want to approach a few of the outstanding changes, mostly
minor updates.~~

As always, you can test these out by [opening an Issue Triage Discussion
post on my
fork](https://github.com/taylrfnt/ghostty/discussions/new?category=issue-triage).
2025-05-06 06:57:36 -07:00
Mitchell Hashimoto
b346f06a51 Update iTerm2 colorschemes (#7268)
Upstream revision:
1e4957e650
2025-05-06 06:56:49 -07:00
Jeffrey C. Ollie
1bf686d324 gtk: fix comment about adwaita version 2025-05-06 08:44:52 -05:00
taylrfnt
ac11ebbb4a update applied label to proper name
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-05 21:37:49 -05:00
taylrfnt
ad0d426bba consistent spacing with tip & important highlights
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-05 21:36:38 -05:00
taylrfnt
d0b9242f49 replace dashes with code block backticks for additional config
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-05 21:34:33 -05:00
taylrfnt
f9c1b6b7cf fixup markdown in additional config field
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-05 19:28:31 -05:00
taylrfnt
ad16f984cf remove smart quotes in favor of ascii
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-05 19:27:08 -05:00
taylrfnt
f84367880b Properly enclose code block backticks
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-05 19:23:40 -05:00
Jon Parise
37974dba06 bash: explicitly request a login shell
Prior to #7044, on macOS, our shell integrated command line would be
executed under `exec -l`, which caused bash to be started as a login
shell. Now that we're using direct command execution, add `--login` to
our bash command's arguments on macOS to get that same behavior.
2025-05-05 10:26:37 -04:00
taylrfnt
11db0ed8ae re-apply formatting & overwrite, not append 2025-05-04 12:17:29 -05:00
taylrfnt
8dfa6beb15 add acknowledgement for previewing format before submitting
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-04 12:04:09 -05:00
taylrfnt
431116c9d8 do not ask users for a summary 2025-05-04 12:01:22 -05:00
taylrfnt
46d3de26fc remove renderers prone to jailbreak 2025-05-04 11:59:57 -05:00
taylrfnt
233ef4f782 more updates to expected behavior placeholder
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-04 11:58:50 -05:00
taylrfnt
050375cbb6 make minimum configuration more explicit
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-03 21:56:08 -05:00
taylrfnt
cc95475ae9 update placeholder text
remove the 'example:' prefixes and make them sound less like it's AI-generated
2025-05-03 21:48:59 -05:00
taylrfnt
1f9a4e6794 more direct naming of minimal configuration
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-03 21:38:19 -05:00
taylrfnt
0bf168c834 terminal inspector no longer proper noun 2025-05-03 21:38:19 -05:00
taylrfnt
6ffb6207e7 split out expected & actual behavior fields 2025-05-03 21:38:19 -05:00
taylrfnt
9c2f8d8ad3 cleanup the input issue hint
Co-authored-by: trag1c <dev@jakubr.me>
2025-05-03 21:38:19 -05:00
taylrfnt
51b6925322 add Linux log hint 2025-05-03 21:38:19 -05:00
taylrfnt
41e3c8830f change VT to terminal emulation
Co-authored-by: Leah Amelia Chen <hi@pluie.me>
2025-05-03 21:37:50 -05:00
taylrfnt
71f52fd198 re-order ghostty logs field 2025-05-03 20:53:00 -05:00
taylrfnt
4d27fc18eb use log stream command instead of link to discussion
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-03 20:50:04 -05:00
mitchellh
abf5f18598 deps: Update iTerm2 color schemes 2025-05-04 00:14:51 +00:00
Mitchell Hashimoto
b6f338065e ci: workaround broken lxd start with snap builder (#7267)
https://discourse.ubuntu.com/t/lxd-doesn-t-start-snap-lxd-device-directory-nonexistent/59785
https://github.com/canonical/lxd-pkg-snap/pull/789

This is required until Namespace or further upstream fixes are made.
2025-05-03 15:05:33 -07:00
Mitchell Hashimoto
e174599533 ci: workaround broken lxd start with snap builder
https://discourse.ubuntu.com/t/lxd-doesn-t-start-snap-lxd-device-directory-nonexistent/59785
https://github.com/canonical/lxd-pkg-snap/pull/789

This is required until Namespace or further upstream fixes are made.
2025-05-03 13:20:00 -07:00
taylrfnt
60e1a73c04 update log textarea render to display inputs in codeblock 2025-05-03 14:45:53 -05:00
taylrfnt
10dcf1dfe9 fix most of the feedback from 7012 2025-05-03 14:40:34 -05:00
Mitchell Hashimoto
040cdba707 flatpak: update GNOME runtime to 48 (#7261)
Notable dependencies updates:

- GTK 4.16.13 -> 4.18.4
- Libadwaita 1.6.6 -> 1.7.2
2025-05-03 06:57:33 -07:00