8769 Commits

Author SHA1 Message Date
Mitchell Hashimoto
bec9483892 Adding default.nix for flake-compat (#4279)
This way non-flake users can access packages with niv or npins easily,
and as flake-compat is already a dependency, this is just a "glue".
Copy-pasted from
[here](ff81ac966b (usage)).

An example with npins would be:
`npins add github ghostty-org ghostty`

and then in the config:
```nix
{pkgs, ...}: let
    sources = import ./npins;
    ghostty = import sources.ghostty;
in {
    environment.systemPackages = [ ghostty.packages.${pkgs.system}.default ];
}
```
2025-01-01 13:01:14 -08:00
Mitchell Hashimoto
028eeb442c Fix typo in freetype-load-flags documentation (#4291) 2025-01-01 13:00:54 -08:00
Mitchell Hashimoto
f1ab7bf0f6 Don't install 1024x1024 icons for Flatpak (#4313)
Per the Flatpak spec
(https://docs.flatpak.org/en/latest/conventions.html#application-icons)
the maximum icon size is 512x512. Trying to build a Flatpak with an icon
larger than this will fail.

To solve this, installing the icon is skipped when building with
-Dflatpak=true.
2025-01-01 12:58:26 -08:00
Yorick Peterse
96fd18f994 Don't install 1024x1024 icons for Flatpak
Per the Flatpak spec (https://docs.flatpak.org/en/latest/conventions.html#application-icons)
the maximum icon size is 512x512. Trying to build a Flatpak with an icon
larger than this will fail.

To solve this, installing the icon is skipped when building with
-Dflatpak=true.
2025-01-01 20:43:52 +01:00
Maciej Bartczak
cdf51b1304 Try to create parent directory when writing default config 2025-01-01 18:28:26 +01:00
Sebastian Lövdahl
120fffa42c Fix typo in freetype-load-flags documentation 2025-01-01 19:07:23 +02:00
arthsmn
180db3c77b Adding default.nix for flake-compat 2025-01-01 12:36:32 -03:00
moritz-john
b1a197ef57 Fix: typo in comment
Fix: 'becauseonce' -> 'because once'
2025-01-01 09:46:06 +01:00
Mitchell Hashimoto
60611b8a4a Set the paste preview text in GTK4 to monospace (#4227)
A simple change to make the text preview in the paste confirmation
dialog monospace; this feels like something that most users would want,
or at least very few users would dislike.

We just call `gtk_text_view_set_monospace` and let GTK use whatever
default monospace font it wants to use. Theoretically we could probably
tell it to use whatever font the user has configured, but this should be
sufficient for most users.
2024-12-31 15:54:43 -08:00
Mitchell Hashimoto
e9e82d94ac PACKAGING: Note GLFW is not for distribution 2024-12-31 14:34:26 -08:00
Daniel Fox
41719aa48c Set the paste preview to monospace 2024-12-31 14:26:03 -08:00
Mitchell Hashimoto
1d71196de3 up version to 1.0.2 for development 2024-12-31 14:12:00 -08:00
Mitchell Hashimoto
3f7c3afaf9 ci: source tarball files must not be quoted v1.0.1 2024-12-31 12:47:50 -08:00
Mitchell Hashimoto
a857d56fb6 ci: proper blob file setup for source tarballs on release 2024-12-31 12:43:33 -08:00
Mitchell Hashimoto
df0620afe9 Fix SGR direct-color parsing issue (#4216)
Fix for a little parsing issue I took note of
[here](https://github.com/ghostty-org/ghostty/issues/2125#issuecomment-2466537683).

The disparity in behavior between `ghostty@main` and `xterm` can be seen
with this reproduction script:
```sh
printf "\e[0m\nForeground:\n";
printf "\e[38:2:0:255:0mGreen\n";
printf "\e[38;2;0;255;0mGreen\n";
printf "\e[38:2:0:255:0:255mMagenta\n";
printf "\e[38;2;0;255;0;255mGreen\n";

printf "\e[0m\nBackground:\n";
printf "\e[48:2:0:255:0mGreen\n";
printf "\e[48;2;0;255;0mGreen\n";
printf "\e[48:2:0:255:0:255mMagenta\n";
printf "\e[48;2;0;255;0;255mGreen\n";

printf "\e[0m\nUnderline:\n";
printf "\e[58:2:0:255:0m\e[4mGreen\n";
printf "\e[58;2;0;255;0m\e[4mGreen\n";
printf "\e[58:2:0:255:0:255m\e[4mMagenta\n";
printf "\e[58;2;0;255;0;255m\e[4mGreen\n";

printf "\e[0m\n";
```

### Outputs:
|`xterm`|`ghostty@main`|this PR|
|-|-|-|
|<img width="85" alt="image"
src="https://github.com/user-attachments/assets/a0aacff2-2103-4fff-9160-5e663d8a70a2"
/>|<img width="110" alt="image"
src="https://github.com/user-attachments/assets/0ad12e67-3f2c-46f3-b0ee-9230032d188a"
/>|<img width="110" alt="image"
src="https://github.com/user-attachments/assets/7477e3cf-7d27-419e-986b-8df581e52398"
/>|
2024-12-31 12:13:05 -08:00
Qwerasd
4543cdeac8 fix(terminal): correct SGR direct color parsing 2024-12-31 15:05:25 -05:00
Qwerasd
5ba8fee38a test/terminal: add failing sgr direct color parsing test
Behavior checked against xterm
2024-12-31 14:57:54 -05:00
Mitchell Hashimoto
47cf5cbb40 core: fix windows compile regression from #4021 (#4212) 2024-12-31 11:16:10 -08:00
Jeffrey C. Ollie
cf34ffa28e core: fix windows compile regression from #4021 2024-12-31 12:56:18 -06:00
Mitchell Hashimoto
eaa872216b write_*_file actions default to mode 0600 (#4201)
This commit changes the default filemode for the write actions so that
it is only readable and writable by the user running Ghostty.
2024-12-31 07:20:28 -08:00
Mitchell Hashimoto
d59a57e133 write_*_file actions default to mode 0600
This commit changes the default filemode for the write actions so that
it is only readable and writable by the user running Ghostty.
2024-12-31 07:16:43 -08:00
Mitchell Hashimoto
a30b2eda39 Handle short boolean flags in zsh/fish completions (#4039)
Closes: https://github.com/ghostty-org/ghostty/issues/2992
2024-12-31 06:45:44 -08:00
Jan200101
6a8b31571b reuse strip option for libraries 2024-12-31 12:09:11 +01:00
Jan200101
061a730dd3 move strip switch behind option 2024-12-31 12:06:45 +01:00
Maciej Bartczak
85ed9b626e explicitly handle bool values 2024-12-31 09:36:23 +01:00
Mitchell Hashimoto
ecfca17ad6 Update iTerm2 colorschemes (#4152)
Upstream revision:
e030599a6a
2024-12-30 21:40:28 -08:00
mitchellh
12a333dfb4 deps: Update iTerm2 color schemes 2024-12-31 05:40:18 +00:00
Mitchell Hashimoto
783a06689e config: fix segfault if font-family is reset via the CLI (#4151)
Fixes #4149
2024-12-30 21:37:23 -08:00
Mitchell Hashimoto
789e2024a5 config: fix segfault if font-family is reset via the CLI
Fixes #4149
2024-12-30 21:30:48 -08:00
Mitchell Hashimoto
d7c5017cd2 surface: don't issue mode 2031 DSR reports when colors are changed by a VT sequence (#3994)
#3965
2024-12-30 21:10:32 -08:00
Mitchell Hashimoto
413964774c input: parse triggers with codepoints that map to keys as translated (#4147)
Fixes #4146

This makes it so that keys such as `cmd+1` and `cmd+one` are identical.
2024-12-30 21:09:13 -08:00
Mitchell Hashimoto
aa81c16ba1 input: parse triggers with codepoints that map to keys as translated
Fixes #4146

This makes it so that keys such as `cmd+1` and `cmd+one` are identical.
2024-12-30 21:06:43 -08:00
Mitchell Hashimoto
fa4d4a38c1 gtk: make sure that window-decoration is honored on all paths (#4130)
Fix a regression from #4110 .
2024-12-30 19:22:26 -08:00
Jeffrey C. Ollie
f97f7e8a70 gtk: also add css window-decorated class when toggling window decorations 2024-12-30 19:40:13 -06:00
Mitchell Hashimoto
478fe3917c feat(config): generate default template when config file is not found (#3460)
Closes #3203
2024-12-30 14:32:05 -08:00
Leah Amelia Chen
98d77788f4 feat(config): generate default template when config file is not found
Closes #3203
2024-12-30 14:28:38 -08:00
Jeffrey C. Ollie
220d40e99a gtk: make sure that window-decoration is honored on all paths 2024-12-30 16:10:14 -06:00
Mitchell Hashimoto
d512f56005 macOS: weak self for event monitor to avoid retain cycle for controllers (#4128)
Fixes #3219

We were holding a reference cycle to the base terminal controller. This
was preventing the window from ever being fully deallocated.
2024-12-30 13:49:36 -08:00
Mitchell Hashimoto
dd41a9447d macOS: weak self for event monitor to avoid retain cycle for controllers
Fixes #3219

We were holding a reference cycle to the base terminal controller. This
was preventing the window from ever being fully deallocated.
2024-12-30 13:45:14 -08:00
Mitchell Hashimoto
d54817607c gtk: don't use gtk_window_set_titlebar if adwaita is enabled but it's older than 1.4.0 (#4110)
Fix #4097
2024-12-30 13:02:48 -08:00
Jeffrey C. Ollie
ffe1b7a872 gtk: don't use gtk_window_set_titlebar if adwaita is enabled but it's older than 1.4.0 2024-12-30 14:44:56 -06:00
Mitchell Hashimoto
0da8801dc9 Fix clipboard confirmation window typo (#4124)
uh just fixes a typo of appliclication instead of application for an
osc_52_read request
2024-12-30 12:41:40 -08:00
Mitchell Hashimoto
9204bb888f os: don't return stack memory (#4122)
A regression from
adcaff7137
2024-12-30 12:24:19 -08:00
kaizo
bdeb93fe87 Fix clipboard confirmation window typo 2024-12-30 15:23:16 -05:00
Mitchell Hashimoto
e9edd21bed os: don't return stack memory
A regression from adcaff7137ef
2024-12-30 12:21:28 -08:00
Mitchell Hashimoto
ef542c6e63 Enable bitmap font usage under CoreText (#4115)
macOS bitmap-only fonts are a poorly documented format, which are often
distributed as `.dfont` or `.dfon` files. They use a 'bhed' table in
place of the usual 'head', but the table format is byte-identical, so
enabling the use of bitmap-only fonts only requires us to properly fetch
this table while calculating metrics.

ref: https://fontforge.org/docs/techref/bitmaponlysfnt.html

Reverts #3550 for obvious reasons, and may close issue #2168 because
this should now mean that bitmap fonts are properly supported under both
font backends due to #3837 - unless `otb` fonts are still not properly
supported under FreeType (they are not supported under CoreText because
CoreText does not know how to handle them).

I tested this change with the `.dfont` distribution of
[Cozette](https://github.com/slavfox/Cozette) v1.25.2 and saw no visual
issues.
2024-12-30 12:05:57 -08:00
Mitchell Hashimoto
41df2d9805 font/freetype: hardcode DPI in test to avoid variation between OS 2024-12-30 12:01:46 -08:00
Mitchell Hashimoto
d20446e4de feat: support for short hex colors in config (#4112)
closes #4111
2024-12-30 11:59:08 -08:00
acsetter
a6eec4cbe2 feat: support for short hex colors in config 2024-12-30 11:55:49 -08:00
Qwerasd
7a4215abd7 font/coretext: properly resolve metrics for bitmap-only fonts
macOS bitmap-only fonts are a poorly documented format, which are often
distributed as `.dfont` or `.dfon` files. They use a 'bhed' table in
place of the usual 'head', but the table format is byte-identical, so
enabling the use of bitmap-only fonts only requires us to properly fetch
this table while calculating metrics.

ref: https://fontforge.org/docs/techref/bitmaponlysfnt.html
2024-12-30 14:44:46 -05:00