6062 Commits

Author SHA1 Message Date
Mitchell Hashimoto
22c506b03e terminal: increase CSI max params to 24 to accept Kakoune sequence
See #5930

Kakoune sends a real SGR sequence with 17 parameters. Our previous max
was 16 so we through away the entire sequence. This commit increases the
max rather than fundamentally addressing limitations.

Practically, it took us this long to witness a real world sequence that
exceeded our previous limit. We may need to revisit this in the future,
but this is an easy fix for now.

In the future, as the comment states in this diff, we should probably
look into a rare slow path where we heap allocate to accept up to some
larger size (but still would need a cap to avoid DoS). For now,
increasing to 24 slightly increases our memory usage but shouldn't
result in any real world issues.
2025-02-22 20:43:44 -08:00
Tristan Partin
e7cbb7fd16 gtk: update ResizeOverlay for zig-gobject (#5941)
Also switch to a "DerivedConfig" model so that we aren't referring to a
global copy of the config.
2025-02-22 20:07:20 -06:00
Jeffrey C. Ollie
0af256b57a gtk: fix the alignment of the context menu
This aligns the top left of the context menu with the right-click
location, rather than the top center.
2025-02-22 18:23:30 -06:00
Jeffrey C. Ollie
f1134640c5 gtk: update ResizeOverlay for zig-gobject
Also switch to a "DerivedConfig" model so that we aren't referring to a
global copy of the config.
2025-02-22 17:42:09 -06:00
Jeffrey C. Ollie
5131f8a71c GTK: propagate config updates to the GTK apprt surfaces (#5866)
This will be needed to the convert GTK apprt surfaces to a DerivedConfig
model rather than accessing the global config stored in the app. It's a
no-op for now, but I have a PR in the works to update the resize overlay
that will take advantage of this.
2025-02-22 17:19:13 -06:00
Jeffrey C. Ollie
bde5b963d0 gtk: fix Builder api changes 2025-02-22 16:39:12 -06:00
Maciej Bartczak
5d80db2ef8 code review: fix log format 2025-02-22 16:39:12 -06:00
Jeffrey C. Ollie
51dc1e2e8c gtk: fix typos 2025-02-22 16:33:22 -06:00
Jeffrey C. Ollie
4f3c4037aa gtk: get 'Change Title' working with older distros 2025-02-22 16:33:20 -06:00
Maciej Bartczak
7c19dd5a33 format the blueprint file using blueprint-compiler format 2025-02-22 16:32:52 -06:00
Maciej Bartczak
8758295647 code review:
- move responses definition to the blueprint, use translatable strings
- minor changes in the response callback
2025-02-22 16:32:52 -06:00
Maciej Bartczak
1ee8dfc99c code review:
- remove unnecessary @ptrCast
- set the default focus to the text entry field
2025-02-22 16:32:52 -06:00
Maciej Bartczak
cd287b4161 - remove the unused dialog context struct
- set the current title in the input buffer
- fix formatting
2025-02-22 16:32:50 -06:00
Maciej Bartczak
454a53b3f1 code review:
- remove the menu entry defined in code
2025-02-22 16:32:23 -06:00
Maciej Bartczak
6189f5d09e code review:
- use blueprint for the dialog content
- use zig-gobject bindings
- make the enum values lowercase
2025-02-22 16:31:32 -06:00
Maciej Bartczak
dcd17c6ac4 set the ok widget to be activated by default 2025-02-22 16:30:57 -06:00
Maciej Bartczak
3542778d84 free the terminal title when destroy is run 2025-02-22 16:30:57 -06:00
Maciej Bartczak
95fc5ad1e9 remove outdated comment 2025-02-22 16:30:57 -06:00
Maciej Bartczak
cc9c45de2a fix the edge case when user tries to revert the title to default and hasn't set a title before 2025-02-22 16:30:57 -06:00
Maciej Bartczak
5e9908af27 make the change of the title persistent & allow the user to restore to a default one 2025-02-22 16:30:56 -06:00
Maciej Bartczak
6b75ca40ca Implement a prompt that allows the user to set the title 2025-02-22 16:30:55 -06:00
Jeffrey C. Ollie
3f715c296a gtk: update menus to use popovers and builder ui files (#5781)
Menus (context menus and the window hamburger menu) now use popovers and
are defined using GTK builder UI files. This is a bit more "modern" and
reduces the amount of code to define menus.
2025-02-22 14:54:06 -06:00
Mitchell Hashimoto
e307f1a373 Allow whitespace in ColorList values (#5925)
The following formats are now all valid:

```zig
macos-icon-screen-color = #00FF00,#FF1000,#00FFFF
macos-icon-screen-color = #00FF00, #FF1000, #00FFFF
macos-icon-screen-color = #00FF00 ,#FF1000 ,#00FFFF
macos-icon-screen-color =  #00FF00 , #FF1000  , #00FFFF
```

Fixes #5918
2025-02-22 12:18:54 -08:00
Mitchell Hashimoto
726ac36612 Add support for whitespace in color and palette parsing (#5926)
Resolves #5921
2025-02-22 07:25:18 -08:00
Bryan Lee
1b6b029e0d Add test cases for whitespace handling for ColorList 2025-02-22 22:11:35 +08:00
Bryan Lee
2383e4d90d Add support for whitespace in color and palette parsing 2025-02-22 22:05:05 +08:00
Bryan Lee
7c6375f744 Allow whitespace after commas in ColorList values 2025-02-22 20:53:27 +08:00
Kat
6770ad3736 Clarify configuration of macos-icon-screen-color's gradient. 2025-02-22 17:14:08 +11:00
Mitchell Hashimoto
d532a6e260 Update libxev to use dynamic backend, support Linux configurability
Related to #3224

Previously, Ghostty used a static API for async event handling: io_uring
on Linux, kqueue on macOS. This commit changes the backend to be dynamic
on Linux so that epoll will be used if io_uring isn't available, or if
the user explicitly chooses it.

This introduces a new config `async-backend` (default "auto") which can
be set by the user to change the async backend in use. This is a
best-effort setting: if the user requests io_uring but it isn't
available, Ghostty will fall back to something that is and that choice
is up to us.

Basic benchmarking both in libxev and Ghostty (vtebench) show no
noticeable performance differences introducing the dynamic API, nor
choosing epoll over io_uring.
2025-02-21 15:04:37 -08:00
Jeffrey C. Ollie
2697061e5b gtk: fix comment in Window.updateConfig 2025-02-18 23:28:10 -06:00
Jeffrey C. Ollie
d1fa933006 gtk: forward config updates to GTK apprt surfaces 2025-02-18 23:18:47 -06:00
Jeffrey C. Ollie
2d5a07c795 gtk: fix build on debian 12 2025-02-18 17:10:54 -06:00
Jeffrey C. Ollie
b3f994a9d2 gtk: use builder ui files and popovers for menus 2025-02-18 17:10:51 -06:00
Leah Amelia Chen
8eaa901aec config: update reload ability information for several keys
Several keys are now able to affect existing windows (especially
window-decoration, whose config documentation got a greater overhaul)
2025-02-18 10:09:41 +01:00
Leah Amelia Chen
aa2dbe2919 gtk: apply all window appearance changes in syncAppearance
The GTK side of appearance code is kind of a mess with several different
functions all having the responsibility of interacting with each other
and setting the appropriate window appearance. It should solely be the
responsibility of the `syncAppearance` function to apply appearance
changes, with other callbacks/functions calling it instead: much like
what we already do for the macOS apprt.
2025-02-18 10:09:41 +01:00
Jeffrey C. Ollie
3dbbbdee0b gtk: fix closing window when last tab is closed 2025-02-17 11:15:16 -06:00
rhodes-b
768b0a79cb dont use shift+equal combo 2025-02-17 07:26:32 -08:00
Ken VanDine
76bd002aa4 fix: [snap] Don't set GDK_PIXBUF_MODULE_FILE, it causes the icon loader 2025-02-16 23:18:16 -05:00
Jeffrey C. Ollie
25b93ceb55 gtk: disable shortcuts in tab view 2025-02-16 13:56:15 -06:00
Jeffrey C. Ollie
497a1b6f8f gtk: prevent double free when closing window 2025-02-16 13:56:15 -06:00
Jeffrey C. Ollie
bf7e9603d2 gtk: rename notebook to TabView and switch to gobject 2025-02-16 13:56:15 -06:00
Jeffrey C. Ollie
0ce1342263 gtk: fix building on Debian 12
`std.debug.assert(x)` _is not_ the same as `if (!x) unreachable`
because the function call is not `inline`. Since it's not inline the
Zig compiler will try to compile any code that might otherwise be
unreachable.

Also, added a CI test that compiles Ghostty in a Debian 12 container to
ensure that regressions do not happen.
2025-02-15 16:53:53 -06:00
Albert Dong
d7a82f212a Add setting to hide icon from dock/cmd-tab 2025-02-15 10:45:27 -08:00
Mitchell Hashimoto
aeccbd266a Added snap packaging (#3931)
Added snap packaging, fixes #3153

If whoever registered the name in the snap store could add me as a
collaborator, I can handle getting it released in the store, setup
automated builds, and request the necessary classic permissions in the
store.
2025-02-15 09:24:36 -08:00
Thom Dickson
ac9f8ba9b1 wip: allow directional split movement 2025-02-15 10:14:21 -06:00
Mitchell Hashimoto
818bc779b3 apprt/gtk: unset snap env vars 2025-02-15 07:22:21 -08:00
Ken VanDine
d3623393a6 More environment handling to ensure reliability across distros 2025-02-15 07:06:40 -08:00
Ken VanDine
ff5c1001c6 Per PR review feedback, this is the more "ziggy" way of doing the check for environment variable. 2025-02-15 07:06:40 -08:00
Ken VanDine
cb5379ab1d Unset environment varies set by the snap 2025-02-15 07:06:40 -08:00
Jeffrey C. Ollie
2d0940f6ae gtk: require libadwaita (#5749)
This commit removes support for building without libadwaita. (Y'all knew
that I just had this sitting in my back pocket). This will need some
serious review to ensure that we haven't lost any functionality.
2025-02-15 09:04:11 -06:00