7658 Commits

Author SHA1 Message Date
Mitchell Hashimoto
3aad8ecfa5 Merge pull request #2267 from ghostty-org/pwinput-msg
termio: use surface messages to trigger password input state
2024-09-18 21:20:16 -07:00
Mitchell Hashimoto
e3d528cf0b termio: use surface messages to trigger password input state 2024-09-18 21:14:05 -07:00
Mitchell Hashimoto
42e7cbc475 termio: typos 2024-09-18 20:59:27 -07:00
Mitchell Hashimoto
66a065dcdd termio: always set termios timer running bool to true on focus
Fixes #2265

See comment in diff for details.
2024-09-18 20:56:40 -07:00
Mitchell Hashimoto
a423a1cee6 Merge pull request #2264 from ghostty-org/push-zqqnqxvutlkx
macos: right-click actions on surface should target surface under click
2024-09-18 14:17:55 -07:00
Mitchell Hashimoto
498804b571 macos: right-click actions on surface should target surface under click
Fixes #2263
2024-09-18 13:43:57 -07:00
Mitchell Hashimoto
7b7bd5e364 Merge pull request #2262 from ghostty-org/pwinput
Detect password input and render lock glyph
2024-09-18 12:17:43 -07:00
Mitchell Hashimoto
1936ef7fee termio: increase termios poller to 200ms 2024-09-18 12:14:55 -07:00
Mitchell Hashimoto
e8bbc987e0 termio: stop the termios poller when not focused 2024-09-18 11:56:07 -07:00
Mitchell Hashimoto
5c469a0b44 renderer: render lock for password input 2024-09-18 11:14:37 -07:00
Mitchell Hashimoto
39627e3221 termio: set pw input state on terminal and wake up renderer 2024-09-18 10:47:26 -07:00
Mitchell Hashimoto
4f6995d727 termio: poll termios for changes 2024-09-18 10:34:07 -07:00
Mitchell Hashimoto
a77ebc1a92 Merge pull request #2261 from Pangoraw/timer-clear
adw: clear stored tab overview timer
2024-09-18 10:24:04 -07:00
Paul Berg
a6cd4b9750 adw: clear stored tab overview timer
This prevents a GTK warning:

```
(process:354789): GLib-CRITICAL **: 19:07:01.853: Source ID 511 was not found when attempting to remove it
```

which happens when trying to clean a timer already used.
2024-09-18 19:11:21 +02:00
Mitchell Hashimoto
618264a16e Merge pull request #2258 from gpanders/push-nkpuzyprzkrp
config: move optional path parsing into RepeatablePath
2024-09-18 09:20:12 -07:00
Mitchell Hashimoto
9b7395b830 Merge pull request #2260 from ghostty-org/adw-focus
Fix: AdwTabOverview loses focus on close
2024-09-18 09:12:40 -07:00
Mitchell Hashimoto
e811ea859d renderer/metal: fix compilation issues 2024-09-18 09:10:18 -07:00
Mitchell Hashimoto
2dd454b399 apprt/gtk: refocus the current tab after adw tab overview closes
Fixes #2256
2024-09-18 07:56:32 -07:00
Mitchell Hashimoto
4a492f24be apprt/gtk: make focusCurrentTab safe to call at any time 2024-09-18 07:41:11 -07:00
Mitchell Hashimoto
9c897e29a4 config: return OOM instead of NoSpaceLeft for Linux fmt 2024-09-18 07:35:40 -07:00
Mitchell Hashimoto
c1346d3f1f Merge pull request #2259 from Pangoraw/tabbar-style
gtk: respect window-theme=ghostty when gtk-titlebar=false
2024-09-18 07:12:50 -07:00
Paul Berg
990bcb9573 gtk: respect window-theme=ghostty when gtk-titlebar=false 2024-09-18 13:52:44 +02:00
Gregory Anders
64abbd0ea6 config: move optional path parsing into RepeatablePath
This commit refactors RepeatablePath to contain a list of tagged unions
containing "optional" and "required" variants. Both variants have a null
terminated file path as their payload, but the tag dictates whether the
path must exist or not. This implemenation is used to force consumers to
handle the optional vs. required distinction.

This also moves the parsing of optional file paths into RepeatablePath's
parseCLI function. This allows the code to be better unit tested. Since
RepeatablePath no longer contains a simple list of RepeatableStrings,
many other of its methods needed to be reimplemented as well.

Because all of this functionality is built into the RepeatablePath type,
other config options which also use RepeatablePath gain the ability to
specify optional paths as well. Right now this is only the
"custom-shaders" option. The code paths in the renderer to load shader
files has been updated accordingly.

In the original optional config file parsing, the leading ? character
was removed when paths were expanded. Thus, when config files were
actually loaded recursively, they appeared to be regular (required)
config files and an error occurred if the file did not exist. **This
issue was not found during testing because the presence of the
"theme" option masks the error**. I am not sure why the presence of
"theme" does this, I did not dig into that.

Now because the "optional" or "required" state of each path is tracked
in the enum tag the "optional" status of the path is preserved after
being expanded to an absolute path.

Finally, this commit fixes a bug where missing "config-file" files were
not included in the +show-config command (i.e. if a user had
`config-file = foo.conf` and `foo.conf` did not exist, then `ghostty
+show-config` would only display `config-file =`). This bug applied to
`custom-shaders` too, where it has also been fixed.
2024-09-17 22:08:59 -05:00
Mitchell Hashimoto
0ac29783b9 config: fix regression for recursive config-files from 5ff0841ee65 2024-09-17 16:51:32 -07:00
Mitchell Hashimoto
b7ac7bf336 README: note how to send crash reports to the project 2024-09-17 13:30:47 -07:00
Mitchell Hashimoto
73ac0f17a3 Merge pull request #2257 from ghostty-org/push-wownzovryyqq
terminal: avoid double free by resetting command to non-managed
2024-09-17 13:19:07 -07:00
Mitchell Hashimoto
15a9c191d3 terminal: avoid double free by resetting command to non-managed
Fixes a reported macOS crash. Test case shows how its possible.
2024-09-17 13:15:44 -07:00
Mitchell Hashimoto
5ff0841ee6 Merge pull request #2243 from gpanders/push-yvplumostzqp
config: interpret leading ? in config-file as an optional file
2024-09-17 13:04:52 -07:00
Mitchell Hashimoto
22cdb6cbc5 Merge pull request #2254 from qwerasd205/sequoia-title-fix
Sequoia titlebar tabs fix
2024-09-17 12:36:03 -07:00
Qwerasd
2852c771b1 macos: fix various titlebar tabs problems in macOS 15.0
- Toolbar overflow indicator showing
- Doubled title on single-tab windows
- Tabs not properly placed in bar on restore of saved window
2024-09-16 22:54:00 -06:00
Mitchell Hashimoto
0109cb5ba4 Merge pull request #2248 from ghostty-org/tagged-union
cli: config structure supports tagged unions
2024-09-16 16:01:04 -07:00
Mitchell Hashimoto
a389987ada cli: config structure supports tagged unions
The syntax of tagged unions is `tag:value`. This matches the tagged
union parsing syntax for keybindings (i.e. `new_split:right`).

I'm adding this now on its own without a user-facing feature because
I can see some places we might use this and I want to separate this out.
There is already a PR open now that can utilize this (#2231).
2024-09-16 15:53:59 -07:00
Mitchell Hashimoto
605bbb8f97 Merge pull request #2251 from tristan957/toast
apprt/gtk: add notebook widget to the main box
2024-09-16 15:12:41 -07:00
Mitchell Hashimoto
fca7ceed03 apprt/gtk: fix non-libadw builds 2024-09-16 15:08:41 -07:00
Tristan Partin
2ad4dcdc01 apprt/gtk: remove redundant adwaita check
We already check if the toast overlay exists before sending a toast.

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-09-16 15:42:38 -05:00
Tristan Partin
4f2c1d1b10 apprt/gtk: use adwaita toasts regardless of gtk-titlebar
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-09-16 15:36:10 -05:00
Tristan Partin
46fb3d8c9f apprt/gtk: add notebook widget to the main box
Mitchell dropped this as part of a cleanup in the PR which added
AdwToastOverlay.

Fixes: https://github.com/ghostty-org/ghostty/issues/2250
Link: https://github.com/ghostty-org/ghostty/pull/2235
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-09-16 15:16:06 -05:00
Mitchell Hashimoto
dfe62cec85 Merge pull request #2235 from tristan957/toast
apprt/gtk: use toast UX from Adwaita if available
2024-09-16 10:22:09 -07:00
Mitchell Hashimoto
c48a1801f6 apprt/gtk: only setup the toast overlay if we have it enabled 2024-09-16 10:18:02 -07:00
Mitchell Hashimoto
2f0b48e8ad apprt/gtk: tweaks 2024-09-16 10:12:16 -07:00
Tristan Partin
d0c6c4f367 apprt/gtk: use toast UX from Adwaita if available
Notify the user with in-app notifications if libadwaita is available.

Co-authored-by: Paul Berg <paul@ber.gp>
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-09-16 11:57:58 -05:00
Mitchell Hashimoto
bc14ac3672 Merge pull request #2247 from Pangoraw/warning-new-position
gtk: prevent invalid call to adw_tab_view_get_selected_page
2024-09-16 09:35:07 -07:00
Paul Berg
89506e5933 gtk: prevent invalid call to adw_tab_view_get_page_position
Creating the first tab would call adw_tab_view_get_page_position with a null page.
2024-09-16 18:10:57 +02:00
Gregory Anders
21e40e9842 config: interpret leading ? in config-file as an optional file
For example, `config-file = ?config.foo` will not report an error if
`config.foo` does not exist.
2024-09-15 09:47:44 -05:00
Mitchell Hashimoto
4241eac890 Merge pull request #2245 from ghostty-org/push-uktsxxotkmuz
config: "-e" implies quit after last window closed
2024-09-13 21:06:36 -07:00
Mitchell Hashimoto
a9217bd9da config: "-e" implies quit after last window closed
Fixes #2220
2024-09-13 20:57:54 -07:00
Mitchell Hashimoto
779b721618 Merge pull request #2163 from jcollie/gtk-desktop-notification-fix
GTK: Fix clicking on desktop notifications
2024-09-13 20:52:18 -07:00
Mitchell Hashimoto
841e12a1eb config: make window-padding-color default to "background"
Unfortunately this is a failed experiment. The idea works in many
scenarios, but there are too many valid cases where it confuses people
or results in a very subjective experience. I'm going to revert this
back to "background" to act like other terminals, but the feature
remains available through config.
2024-09-13 20:51:15 -07:00
Mitchell Hashimoto
941adcdac8 apprt/gtk: rename the other underscore actions to match naming rules 2024-09-13 20:49:31 -07:00
Mitchell Hashimoto
9e73d865fb apprt/gtk: small comments 2024-09-13 20:45:39 -07:00