9022 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e8811ac6fb Move app quit to apprt action
This changes quit signaling from a boolean return from core app `tick()`
to an apprt action. This simplifies the API and conceptually makes more
sense to me now.

This wasn't done just for that; this change was also needed so that
macOS can quit cleanly while fixing #4540 since we may no longer trigger
menu items. I wanted to split this out into a separate commit/PR because
it adds complexity making the diff harder to read.
2025-01-04 07:18:53 -08:00
Alexandre Antonio Juca
0599f73fac chore: use KiB notation for representing memory size 2025-01-04 09:02:25 +01:00
dkmar
69e4428d80 fix typo: CSI header 2025-01-03 23:34:39 -08:00
Alexandre Antonio Juca
0e63dc18ff Merge branch 'feature/display-memory-size-in-bytes-and-kb' of github.com:AlexJuca/ghostty into feature/display-memory-size-in-bytes-and-kb 2025-01-03 23:42:21 +01:00
Alexandre Antonio Juca
f14371e909 Merge branch 'main' of github.com:AlexJuca/ghostty into feature/display-memory-size-in-bytes-and-kb 2025-01-03 23:37:34 +01:00
Alexandre Antonio Juca
78cdc7d0de Merge branch 'main' of https://github.com/AlexJuca/ghostty into feature/display-memory-size-in-bytes-and-kb 2025-01-03 23:34:52 +01:00
Mitchell Hashimoto
1baf8928a0 don't error when gtk4 could not be found via pkg-config (#4546)
running `zig build --help` was crashing for some people, I narrowed it
down to gtk4 not being installed however that shouldn't make the help
message not nor should it block glfw builds
2025-01-03 14:28:11 -08:00
Jan200101
6fd901fd3d don't error when gtk4 could not be found via pkg-config 2025-01-03 23:12:11 +01:00
Jan200101
0493b79caf don't make library building logic public 2025-01-03 22:42:29 +01:00
Jan200101
1dc9157727 always link system freetype2 using pkg-config 2025-01-03 22:42:01 +01:00
Jan200101
72e0fb14fe don't build freetype2 when system integration is enabled 2025-01-03 22:41:15 +01:00
Mitchell Hashimoto
fa30a04f2a Docs: update goto_split documentation (#4536)
In #4388, documentation was added for goto_split but in #3427 this
documentation was made outdated but not updated. This makes the
documentation up to date and brings the ordering in line with new_split
2025-01-03 12:54:57 -08:00
Mitchell Hashimoto
2f6e7d6ecd gtk: add class names to the rest of the windows (#4533)
This sets up for theming the other windows in the future.
2025-01-03 12:51:13 -08:00
Mitchell Hashimoto
a014eee968 don't build oniguruma when system integration is enabled (#4534)
follow-up to #4520

all the same stuff for the previous two

the tests for this only run for the native target and was added for the
iOS build (3360a008cd137b428631fc8052f64d672a660240), I've made a second
version of this commit to remove the native check if thats more desired
(d247a22de036140297942701090e0eafb3d1a72d)

ghostty and all tests appear to run on my system both with and without
system integration
2025-01-03 12:44:43 -08:00
Caleb Norton
2610f5b4e2 Docs: update goto_split documentation
In #4388, documentation was added for goto_split but in #3427 this
documentation was made outdated but not updated. This makes the
documentation up to date and brings the ordering in line with new_split
2025-01-03 14:32:39 -06:00
Jan200101
dc90ef776e don't build oniguruma when system integration is enabled 2025-01-03 21:27:22 +01:00
Jeffrey C. Ollie
063868b311 gtk: add class names to the rest of the windows 2025-01-03 14:08:00 -06:00
Qwerasd
25a112469c font(coretext): add config to adjust strength of font-thicken.
This is achieved by rendering to an alpha-only context rather than a
normal single-channel context, and adjusting the brightness at which
coretext thinks it's drawing the glyph, which affects how it applies
font smoothing (which is what `font-thicken` enables).
2025-01-03 14:19:19 -05:00
Mitchell Hashimoto
ab9b14215c input: legacy encoding falls back to mapping of logical key for ctrlseq (#4528)
Fixes #4518

If our UTF8 encoding is not recognized, we fall back to the ASCII
mapping of the logical key for the control sequence. This allows
cyrillic control characters to work.

I also verified that non-cyrllic (US) and alternate layouts (Dvorak)
work as expected still.
2025-01-03 11:09:09 -08:00
Mitchell Hashimoto
74386be017 don't build fontconfig when system integration is enabled (#4520)
same as #4205 but for fontconfig

it follows the same pattern with one addition:
the module needs a known target to be able to link a system library
I don't think this will affect anything 

ghostty and all tests appear to run on my system both with and without
system integration
2025-01-03 11:01:31 -08:00
Mitchell Hashimoto
1bf8b262ea os: directory functions should prefer cached home if available (#4527)
This fixes tests as well if env vars are set.
2025-01-03 11:01:03 -08:00
Peter Cock
6459e5c8ca Fixing a few typos in the source code comments (#4529) 2025-01-03 11:00:45 -08:00
Mitchell Hashimoto
45d005ce65 input: legacy encoding falls back to mapping of logical key for ctrlseq
Fixes #4518

If our UTF8 encoding is not recognized, we fall back to the ASCII
mapping of the logical key for the control sequence. This allows
cyrillic control characters to work.

I also verified that non-cyrllic (US) and alternate layouts (Dvorak)
work as expected still.
2025-01-03 10:53:54 -08:00
Mitchell Hashimoto
e03c428728 os: directory functions should prefer cached home if available
This fixes tests as well if env vars are set.
2025-01-03 10:39:03 -08:00
Jan200101
9d286de834 don't build fontconfig when system integration is enabled 2025-01-03 18:39:11 +01:00
Mitchell Hashimoto
7eb35d7275 Fix: Correct version strings for simdutf and cimgui to match vendored files (#4468)
The cimgui version listed does not match the upstream commit or the
vendored cimgui files
Checking the upstream `git log` the commit corresponds to `commit
e391fe2e66eb1c96b1624ae8444dc64c23146ef4 (tag: v1.90.6-docking)` however
the `build.zig.zon` is outdated.
The vendored cimgui files also contain the header
```cpp
// This file is automatically generated by generator.lua from
// https://github.com/cimgui/cimgui based on imgui.h file version "1.90.6" 19060
// from Dear ImGui https://github.com/ocornut/imgui with imgui_internal.h api
// docking branch
```

I wasn't too clear with what the comment meant:
```
// This should be kept in sync with the submodule in the cimgui source
// code to be safe that they're compatible.
```
and assumed it was referring to the vendored cimgui files, added a
comment pointing out where to find the cimgui source mentioned.
2025-01-03 09:13:52 -08:00
acehinnnqru
b0404867b7 fix: macos incorrect quick terminal position 2025-01-03 22:44:26 +08:00
Alexandre Antonio Juca
e1bc6477b1 Merge branch 'main' of https://github.com/AlexJuca/ghostty into feature/display-memory-size-in-bytes-and-kb 2025-01-03 12:49:35 +01:00
Alexandre Antonio Juca
6b4e6d2fa5 feat: Display memory usage and and limit in both bytes and Kb for improved readability 2025-01-03 12:48:52 +01:00
Damien Mehala
8a3aae2caf code review
- Change show_message_box from struct to string.
- Add tests:
  - Blank message
  - Spaces only message
  - No trailing semicolon OSC 9;2
2025-01-03 12:01:50 +01:00
Bryan Lee
9fa404c390 Ensure all search results are visible in theme list
When searching in the theme list (e.g., searching for "Snazzy"), some matching themes might be hidden due to incorrect window position handling.

This fix ensures all matching themes are visible by adjusting the window position logic.
2025-01-03 16:24:53 +08:00
azhn
65a0fa4f35 Fix: Update pkg/simdutf/build.zig.zon to match vendored version 2025-01-03 18:22:24 +11:00
azhn
29f040716c Fix cimgui version string to match pkg/cimgui/vendor/ and the upstream version 2025-01-03 17:47:50 +11:00
Mitchell Hashimoto
e2f9eb6a6f keybindings: improve sort to include key value 1,2,3,4... (#4399)
Current sort used by `+list-keybinds` doesn't include the value of the
key:
```
ctrl  + shift + v                      paste_from_clipboard
ctrl  + shift + a                      select_all
...
ctrl  + shift + q                      quit
ctrl  + shift + n                      new_window
...
alt   + five                           goto_tab:5
alt   + eight                          goto_tab:8
...
alt   + six                            goto_tab:6
alt   + seven                          goto_tab:7
```
adding the key value improves the sort order

```
ctrl  + shift + a                      select_all
ctrl  + shift + c                      copy_to_clipboard
...
ctrl  + shift + n                      new_window
ctrl  + shift + o                      new_split:right
ctrl  + shift + q                      quit
...
alt   + one                            goto_tab:1
alt   + two                            goto_tab:2
alt   + three                          goto_tab:3
...
alt   + eight                          goto_tab:8
alt   + nine                           last_tab
alt   + f4                             close_window
2025-01-02 19:43:19 -08:00
Mitchell Hashimoto
f2d255d423 Correct typos and update typos.toml (#4456)
I noticed that the version of `typos` in nixpkgs is still at
[1.28.4](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ty/typos/package.nix#L12)
(as of [2 weeks
ago](https://github.com/crate-ci/typos/releases/tag/v1.28.4)), while the
latest version is
[1.29.3](https://github.com/crate-ci/typos/releases/tag/v1.29.3). For
tools like this where the dictionary is constantly being updated, we
might want to consider using `uses: crate-ci/typos@master` directly in
our CI workflow instead of the version from nixpkgs.

I understand the current setup using `devShell.nix` helps maintain
consistency between local development and CI environments. However, I
found some typos that can be detected by the new version of typos, but
were missed by the old version of typos on nixpkgs.

<img width="690" alt="image"
src="https://github.com/user-attachments/assets/d9e7f45a-8980-4acd-a093-a1e45521a28d"
/>

## Proposal:

1. Use `crate-ci/typos` action in CI while keeping nixpkgs version for
local development (catching more typos in CI but introducing some
inconsistency)
2025-01-02 19:29:26 -08:00
Mitchell Hashimoto
bec46fc2fc Revert "gtk: equalize on double clicking the split handle (#3557)"
This reverts commit 09470ede55c26e042a3c9805a8175e972b7cc89b, reversing
changes made to 6139cb00cf6a50df2d47989dfb91b97286dd7879.
2025-01-02 19:17:34 -08:00
Mitchell Hashimoto
bc5cbf3e87 kittygfx: Ensure temporary files are named per spec (#4451)
Temporary files used with Kitty graphics must have
"tty-graphics-protocol" somewhere in their full path.


https://sw.kovidgoyal.net/kitty/graphics-protocol/#the-transmission-medium
2025-01-02 19:13:19 -08:00
Bryan Lee
ac524b6c34 Correct typos and update typos.toml 2025-01-03 09:55:21 +08:00
David Leadbeater
4cb2fd4f79 Add negative test for temporary filename and fix other tests 2025-01-03 12:09:49 +11:00
Mitchell Hashimoto
a10b45fb1f core: detect what desktop environment the user is using (#4343) 2025-01-02 16:44:16 -08:00
Jeffrey C. Ollie
3c93f00d04 cli: only print out DE when using the GTK apprt 2025-01-02 18:29:33 -06:00
Jeffrey C. Ollie
c89df01e13 core: prohibit checking for the desktop environment on linux during comptime 2025-01-02 18:29:33 -06:00
Jeffrey C. Ollie
5c39d09053 core: detect what desktop environment the user is using 2025-01-02 18:29:31 -06:00
Mitchell Hashimoto
cde8b7e810 chore: fix typos (#4407)
Fixes:

- te -> the
- require you restart -> require you to restart
- neovim -> Neovim
2025-01-02 16:15:42 -08:00
David Leadbeater
c9dfcd2781 kittygfx: Ensure temporary files are named per spec
Temporary files used with Kitty graphics must have
"tty-graphics-protocol" somewhere in their full path.

https://sw.kovidgoyal.net/kitty/graphics-protocol/#the-transmission-medium
2025-01-03 11:15:03 +11:00
Mitchell Hashimoto
7e1b7bb8b3 performable: prefix (#4345)
closes #4328
closes #3970

makes this possible now
```
keybind = performable:ctrl+c=copy_to_clipboard # copy if theres a selection else send sigint
keybind = ctrl+v=paste_from_clipboard
```
2025-01-02 16:11:24 -08:00
Mitchell Hashimoto
bcd4b3a680 config: improve adw-toast docs 2025-01-02 16:07:58 -08:00
Mitchell Hashimoto
d42e67bdad gtk: fix non-notebook separator colors (#4421)
Before: 
![Screenshot From 2025-01-02
12-25-55](https://github.com/user-attachments/assets/62c3f15b-e717-499b-963f-c72ec8988f25)
After:
![Screenshot From 2025-01-02
12-28-02](https://github.com/user-attachments/assets/9e04b249-2414-4cae-8ea2-94c86bba5be6)
2025-01-02 16:04:54 -08:00
Mitchell Hashimoto
e6399c947a update our default bindings that are performable 2025-01-02 15:54:09 -08:00
Jeffrey C. Ollie
a0de1be65f gtk: fix non-notebook separator colors 2025-01-02 17:49:15 -06:00