10138 Commits

Author SHA1 Message Date
David Mo
af2d710000 rename setToDefault to init 2025-02-25 10:15:58 -05:00
Jeffrey C. Ollie
3d08b1c4aa gtk: cast to application window 2025-02-25 08:19:52 -06:00
David Mo
22d99f2533 add test for setToDefault 2025-02-24 23:39:01 -05:00
David Mo
8fadb54e65 set default keybinds when parsing empty keybind config 2025-02-24 23:31:49 -05:00
David Mo
0321aec68f create default keybinds function 2025-02-24 23:27:49 -05:00
Jeffrey C. Ollie
d284146621 gtk: convert window actions to use zig-gobject 2025-02-24 22:07:16 -06:00
Mitchell Hashimoto
92340f8fb0 fix(macos): prevent performing newTab shortcut on QuickTerminalWindow… (#5955)
Fixes #5939
2025-02-24 15:32:39 -08:00
McNight
b4349d3226 fix(macos): make showNoNewTabAlert method private #5939 2025-02-25 00:18:02 +01:00
McNight
1254c6b981 fix(macos): address MR feedback #5939 2025-02-25 00:17:01 +01:00
Mitchell Hashimoto
ce8bfe45ed Docs change: Note instead of simple text and Removing two times showing info. (#5920)
In docs option reference, for macos-icon info. It is showing two times
similar thing. And Note looks good instead of just text because it wont
work without `custom-style`. So a Big Note is a good highlight.
2025-02-24 09:41:26 -08:00
Jeffrey C. Ollie
e1e1539e4f kitty: delete stray log line (#5969) 2025-02-24 11:30:22 -06:00
Jeffrey C. Ollie
9bcf554139 gtk: instruct users to install blueprint-compiler (#5970)
There's been *far* too many people who aren't aware of the new
dependency, and that is partly our fault: a "FileNotFound" error is
quite obtuse, unless you religiously follow every PR and every commit
made to the repository. Instead of shepherding everyone who runs into
this manually, we should offer better signposting.
2025-02-24 11:25:56 -06:00
Leah Amelia Chen
1dc375dd0e gtk: instruct users to install blueprint-compiler
There's been *far* too many people who aren't aware of the new dependency,
and that is partly our fault: a "FileNotFound" error is quite obtuse,
unless you religiously follow every PR and every commit made to the
repository. Instead of shepherding everyone who runs into this manually,
we should offer better signposting.
2025-02-24 18:10:18 +01:00
Jeffrey C. Ollie
f4f36a9a98 kitty: delete stray log line 2025-02-24 11:05:37 -06:00
Mitchell Hashimoto
71ae51b4b3 kitty images: add delete by range operations (#5957)
Fixes #5937

Implement [deleting Kitty image
ranges](https://sw.kovidgoyal.net/kitty/graphics-protocol/#deleting-images).
2025-02-24 07:14:11 -08:00
Jeffrey C. Ollie
61f41e5c01 nix: include libxml2 in nativeBuildInputs for xmllint (#5959) 2025-02-23 15:56:08 -06:00
Jeffrey C. Ollie
2ef042978d nix: include libxml2 in nativeBuildInputs for xmllint 2025-02-23 15:17:18 -06:00
Leah Amelia Chen
a52c603f16 gtk: ensure that the content scale is always positive (#5954) 2025-02-23 21:27:09 +01:00
Jeffrey C. Ollie
da10269d3f gtk: handle other nonsensical values returned by gtk_widget_get_scale_factor 2025-02-23 13:18:00 -06:00
Jeffrey C. Ollie
ac7029256a gtk: better document what to do if gtk-xft-dpi <= 0 2025-02-23 13:04:47 -06:00
Jeffrey C. Ollie
995959dce4 kitty images: add delete by range operations
Fixes #5937

Implement [deleting Kitty image ranges](https://sw.kovidgoyal.net/kitty/graphics-protocol/#deleting-images).
2025-02-23 12:57:24 -06:00
McNight
aa4aaa200f fix(macos): prevent performing newTab shortcut on QuickTerminalWindow #5939 2025-02-23 19:34:27 +01:00
Jeffrey C. Ollie
bc2acdd060 gtk: ensure that the content scale is always positive
Fixes #5927

This doesn't fix the underlying reason that GTK sometimes reports
content scales as negative. If GTK reports a negative scale, we ignore
that and use 1.0 for the scale.
2025-02-23 11:02:59 -06:00
Mitchell Hashimoto
2f63f840de terminal: increase CSI max params to 24 to accept Kakoune sequence (#5949)
See #5930

Kakoune sends a real SGR sequence with 17 parameters. Our previous max
was 16 so we threw 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-23 07:12:38 -08:00
Tristan Partin
eaeb6a620f gtk: switch menus to use blueprints instead of raw builder ui (#5944) 2025-02-22 23:30:56 -06:00
Tristan Partin
65c65b9c97 gtk: fix menu separator colors (again) (#5945) 2025-02-22 23:30:30 -06:00
Mitchell Hashimoto
dad2cf887b add macos default config path to manpages (#5942)
This should resolve #5938.

I tested this locally using `zig build -D=emit-docs=true` and confirmed
that the mdgen process provided the new manpages in
`zig-out/share/man/man*`, respectively.

Let me know if this needs any changes, I tried to keep this as similar
as possible to the existing manpages (both format and content).
2025-02-22 20:53:34 -08:00
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
Jeffrey C. Ollie
427da79a02 gtk: fix menu separator colors (again) 2025-02-22 20:23:16 -06:00
Jeffrey C. Ollie
a8b6b96fbd gtk: switch menus to use blueprints instead of raw builder ui 2025-02-22 20:21:41 -06: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
bdf0f27d1a gtk: fix the alignment of the context menu (#5943)
This aligns the top left of the context menu with the right-click
location, rather than the top center.
2025-02-22 18:37:41 -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
taylrfnt
398add17f1 actually change it in both places 2025-02-22 18:00:37 -06:00
taylrfnt
eec150d4cd mention default loc precendence over XDG 2025-02-22 17:58:05 -06:00
taylrfnt
573fe7348b add macos default config path to manpages 2025-02-22 17:46: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
867982a2ff Gtk: change title prompt (#5905)
This PR implements the title change functionality for the GTK app and
closes https://github.com/ghostty-org/ghostty/issues/5769

Demo:


https://github.com/user-attachments/assets/cad611b3-b7bf-40ac-8d0f-11d2095fe525

For now I came up with a basic UI that i believe is sufficient, but I'm
open to feedback and happy to iterate on it further.

https://github.com/ghostty-org/ghostty/issues/5769#issuecomment-2660341107
- Regarding Mitchell's comment I checked Gnome Console and I could not
find a similar feature.
2025-02-22 17:00:40 -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
32a62ff862 snap: add libxml2-utils (for xmllint) to snap 2025-02-22 16:33:22 -06:00
Jeffrey C. Ollie
d4bcac0150 snap: add blueprint-compiler to snap 2025-02-22 16:33:22 -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