7651 Commits

Author SHA1 Message Date
Mitchell Hashimoto
ea46cb19e6 macos: use a different bundle identifier for debug builds
This is necessary to avoid conflicts with application data such
as permissions and preferences.
2024-09-29 16:16:55 -07:00
Mitchell Hashimoto
f434c2cb71 Merge pull request #2327 from ghostty-org/quickterm
macOS: Quick Terminal focus improvements
2024-09-29 15:44:57 -07:00
Mitchell Hashimoto
19012cb6f5 macos: quick terminal restores focus to previous application 2024-09-29 15:33:12 -07:00
Mitchell Hashimoto
c70e0b2634 macos: use orderOut which handles all of our focus logic for us 2024-09-29 15:06:54 -07:00
Mitchell Hashimoto
c8a40a7791 macos: quick terminal close focuses next window on same screen/space
Previously, we'd find the next Ghostty window anywhere. Now we find the
one on the same screen/space to avoid moving the focus to a different screen.
2024-09-29 14:56:03 -07:00
Mitchell Hashimoto
83505bb4c0 macos: ensure quick terminal becomes key and focused after animation in 2024-09-29 10:44:16 -07:00
Mitchell Hashimoto
99a1dbdf46 Merge pull request #2322 from Syphdias/fix_2271
Split GDK environment variables
2024-09-29 09:48:56 -07:00
Mitchell Hashimoto
b9545ec2f9 Merge pull request #2325 from ghostty-org/oob
Fix OOB write on curly underline, add bounds checking in runtime safety modes
2024-09-29 09:45:07 -07:00
Mitchell Hashimoto
bbacee66d0 font/sprite: fix out of bounds right on curly underline
Fixes #2321
2024-09-29 09:39:32 -07:00
Mitchell Hashimoto
f67a647a12 font/sprite: bounds checking for pixel writes on Pixman 2024-09-29 09:38:38 -07:00
Mitchell Hashimoto
e47e7a8b8b macos: quick terminal always brings Ghostty to the front 2024-09-29 09:31:56 -07:00
Christian Kugler
f9d3f64978 Merge branch 'main' into fix_2271 2024-09-29 14:15:56 +02:00
Christian Kugler
f309d4191e Use helper function to set correct env variables
GTK4 version 4.16 split the environment variable `GDK_DEBUG` into `GDK_DEBUG`
and `GDK_DISABLE`. This is being done by using the helper function `atLeast` to
handle certain versions accordingly.

`GSK_RENDERER` also only needs to be set in later GTK versions (>=1.14.0).
2024-09-29 14:04:13 +02:00
Mitchell Hashimoto
c2fe2ccc71 Merge pull request #2319 from jcollie/nix-stdenv-unstable
nix: use stdenv from unstable to build the package
2024-09-28 21:25:59 -07:00
Mitchell Hashimoto
4796583a51 Merge pull request #2320 from ghostty-org/slideterm
macOS: Quick Terminal ("Quake-style" terminal)
2024-09-28 21:20:00 -07:00
Mitchell Hashimoto
4f9d49b380 macos: handle multiple monitors properly 2024-09-28 20:52:22 -07:00
Mitchell Hashimoto
bcdbb5899b macos: only define quick terminal configs for AppKit 2024-09-28 19:14:27 -07:00
Mitchell Hashimoto
76a2041cbf macos: make quick terminal animation 0.2 instead of 0.3 2024-09-28 19:11:40 -07:00
Mitchell Hashimoto
1d727320b4 macos: if initializing new surface tree, move focus to it 2024-09-28 19:11:16 -07:00
Mitchell Hashimoto
1f3c3dde10 input: note fullscreen isn't supported by quick terminal 2024-09-28 18:51:47 -07:00
Mitchell Hashimoto
61dd395251 macos: show alert if new tab is attempted from quick term 2024-09-28 18:46:52 -07:00
Mitchell Hashimoto
11d5ec7dc1 config: support quick terminal position 2024-09-28 18:42:25 -07:00
Jeffrey C. Ollie
6cbced7078 nix: use stdenv from unstable to build the package 2024-09-28 20:05:56 -05:00
Mitchell Hashimoto
13eb8ac6e2 macos: ability to interrupt animation, track it in menu 2024-09-28 15:29:57 -07:00
Mitchell Hashimoto
1570ef01a7 rename slide to quick terminal 2024-09-28 15:20:35 -07:00
Mitchell Hashimoto
e3b340c6d3 macos: set initial terminal dimensions 2024-09-28 15:08:27 -07:00
Mitchell Hashimoto
2e2e6d71c5 Merge pull request #2315 from jcollie/nix-devshell-remove-tracy
nix: remove tracy from the devshell
2024-09-28 14:55:43 -07:00
Jeffrey C. Ollie
0a3ca77296 nix: remove tracy from flake.nix 2024-09-28 12:56:39 -05:00
Mitchell Hashimoto
1977e220f5 macos: slide terminal exit and close window don't kill the window 2024-09-28 10:51:40 -07:00
Mitchell Hashimoto
50fb7331af macos: base class for terminal controller 2024-09-28 10:41:51 -07:00
Mitchell Hashimoto
86e98c8403 Merge pull request #2313 from rockorager/sgr-21
sgr: add support for legacy double underline
2024-09-28 10:34:54 -07:00
Mitchell Hashimoto
ac3b0fe3c6 Merge pull request #2317 from jcollie/list-themes-window-too-narrow
cli: fix integer overflow in `+list-themes` if window is too narrow
2024-09-28 10:34:23 -07:00
Jeffrey C. Ollie
9f543ceac2 cli: fix integer overflow in +list-themes if window is too narrow
Reproduction is to resize the window to it's minimum width and then
run `ghostty +list-themes`. Ghostty will crash because Zig for loops
don't like having a range where the end is smaller than the start.
2024-09-28 12:12:00 -05:00
Jeffrey C. Ollie
cadca8ca45 nix: remove tracy from the devshell 2024-09-27 23:18:42 -05:00
Tim Culverhouse
93643d1741 sgr: add support for legacy double underline
SGR 21 is defined to be a double underline. This behavior is common
among many terminals, notably xterm.

References: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_
2024-09-27 22:22:22 -05:00
Mitchell Hashimoto
870a1dae3d Merge pull request #2311 from jcollie/nix-zig-cache-update
nix: work around ziglang/zig#20976 and fix nix package builds
2024-09-27 19:28:28 -07:00
Jeffrey C. Ollie
21a7e40510 nix: move fetch-zig-cache script into nix/build-support 2024-09-27 20:40:03 -05:00
Mitchell Hashimoto
99e5e59491 macos: hook up the action for the slide terminal 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
7806366eec core: fix up toggle_slide_terminal action for rebase 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
bdc2c02f23 macos: when sliding out the terminal, cycle focus 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
cadb960ef9 core: slide terminal keybinding action 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
d18e1c879b macos: restrict resizing based on sliding terminal position 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
63456d28a5 macos: make sliding logic a bit more extensible 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
bdd0070ffd macos: render a terminal in the slide window 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
93b2fe60f8 macos: start work on SlideTerminal, slides in window from top 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
576453cfde apprt/gtk: set null url if url is empty
Fixes #2306
2024-09-27 18:34:08 -07:00
Jeffrey C. Ollie
a9b04037b4 nix: don't require the ZIG_LOCAL_CACHE_DIR to be set
NixOS does not set this during Nix package builds. Probably Nix's
caching got in the way of detecting this on my system.
2024-09-27 19:19:51 -05:00
Mitchell Hashimoto
4f30a83c66 Merge pull request #2312 from ghostty-org/mouse-extend
core: only extend selection on mouse if click interval is exceeded
2024-09-27 14:24:27 -07:00
Mitchell Hashimoto
6d68db3bdc core: only extend selection on mouse if click interval is exceeded
Previously, once we had one click registered, shift+click would always
go into selection extend mode. This is not the behavior we want, since
we want shift+double/triple click to work in alternate screens.

This commit changes the behavior so that we only extend the selection
after the multi-click interval has passed.

I see a lot of opportunity to improve this whole callback much more but
I don't want to risk introducing new bugs since this is a hard to test
area, so I'm going to leave it for now.
2024-09-27 14:21:27 -07:00
Jeffrey C. Ollie
39733ac3e5 nix: work around ziglang/zig#20976 and fix nix package builds
Because Zig does not fetch recursive dependencies when you run `zig build
--fetch` (see https://github.com/ziglang/zig/issues/20976) we need to do some
extra work to fetch everything that we actually need to build without Internet
access (such as when building a Nix package).

An example of this happening:

```
error: builder for '/nix/store/cx8qcwrhjmjxik2547fw99v5j6np5san-ghostty-0.1.0.drv' failed with exit code 1;
      la/build/tmp.xgHOheUF7V/p/12208cfdda4d5fdbc81b0c44b82e4d6dba2d4a86bff644a153e026fdfc80f8469133/build.zig.zon:7:20: error: unable to discover remote git server capabilities: TemporaryNameServerFailure
      >             .url = "git+https://github.com/zigimg/zigimg#3a667bdb3d7f0955a5a51c8468eac83210c1439e",
      >                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      > /build/tmp.xgHOheUF7V/p/12208cfdda4d5fdbc81b0c44b82e4d6dba2d4a86bff644a153e026fdfc80f8469133/build.zig.zon:16:20: error: unable to discover remote git server capabilities: TemporaryNameServerFailure
      >             .url = "git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a900ad773618b",
      >                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      >
      For full logs, run 'nix log /nix/store/cx8qcwrhjmjxik2547fw99v5j6np5san-ghostty-0.1.0.drv'.
```

To update this script, add any failing URLs with a line like this:

```
  zig fetch <url>
```

Periodically old URLs may need to be cleaned out.

Hopefully when the Zig issue is fixed this script can be eliminated in favor
of a plain `zig build --fetch`.
2024-09-27 15:49:02 -05:00