4046 Commits

Author SHA1 Message Date
Chris Marchesi
07e16eb7c1 nix: update zigCacheHash
Just a bump to zigCacheHash to address dependency updates.
2023-11-20 23:50:31 -08:00
Mitchell Hashimoto
bed49e59b3 Merge pull request #925 from vancluever/vancluever-nix-releasefast
nix: use `-Doptimize=ReleaseFast`
2023-11-20 21:39:03 -08:00
Mitchell Hashimoto
9d7864ff6c Merge pull request #926 from mitchellh/kitty-bug
renderer: handle Kitty images where z < 0 for all placements
2023-11-20 21:38:52 -08:00
Mitchell Hashimoto
cf8a0bdaec renderer: handle Kitty images where z < 0 for all placements 2023-11-20 21:34:17 -08:00
Chris Marchesi
fa9a6eb88d nix: use -Doptimize=ReleaseFast
I figured out how to override the hook default build flags so that we
can set -Doptimize=ReleaseFast. :)

There's a long conversation that's gone on about this in nixpkgs, but
it's fairly well summed up here:
https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653

I'd imagine we will want to adopt whatever is eventually done - after
this, we can remove the override and rely on more first-class
configuration, or logic in build.zig.
2023-11-20 21:20:38 -08:00
Mitchell Hashimoto
86f8bd20db Merge pull request #924 from mitchellh/disco-clear
font: fallback fonts need to deinit their unused deferred faces
2023-11-20 21:06:58 -08:00
Mitchell Hashimoto
89fe07271e font: fallback fonts need to deinit their unused deferred faces
Fixes #885

Interestingly, this isn't that big of a leak for whatever reason on
macOS. But on Linux with fontconfig this is a MASSIVE memory leak.
2023-11-20 21:05:01 -08:00
Mitchell Hashimoto
bb8e5b9f76 terminal: handle width=3 by pretending width=2 for now 2023-11-20 20:41:58 -08:00
Mitchell Hashimoto
0430758b60 Merge pull request #923 from vancluever/vancluever-config-gtk-titlebar
apprt/gtk: let GTK titlebar be toggleable
2023-11-20 20:29:47 -08:00
Chris Marchesi
39e3fca210 apprt/gtk: let GTK titlebar be toggleable
This adds the gtk-titlebar option, which allows you to toggle the GTK
titlebar on (default) and off.

Under some circumstances (e.g. tiling WMs with titlebars enabled), one
may wish to disable the GTK titlebar/CSD for aesthetic reasons. This
allows you to do that.

Fixes #920.
2023-11-20 20:07:11 -08:00
Mitchell Hashimoto
3c98c6375a terminal: handle width==3 glyphs by just pretending they're width 2 2023-11-20 19:55:06 -08:00
Mitchell Hashimoto
d4e149a26b Merge pull request #922 from mitchellh/update-deps
Update some deps for non-mutated var
2023-11-20 19:53:45 -08:00
Mitchell Hashimoto
d7d6537574 update zig-objc 2023-11-20 19:32:07 -08:00
Mitchell Hashimoto
b65518dd2b update libxev 2023-11-20 19:27:22 -08:00
Mitchell Hashimoto
5bb430e03f Merge pull request #921 from mitchellh/zwj
font: shaper should not look up U+200D for consistent fonts
2023-11-20 19:21:16 -08:00
Mitchell Hashimoto
42c4f52711 font: shaper should not look up U+200D for consistent fonts
Related to #914

U+200D is the zero-width joiner character used for multi-codepoint
Emojis. When faced with a multi-codepoint grapheme, the font shaper must
find a font that provides _all codepoints_ consistently. However, U+200D
isn't meant to be provided by any font. As a result, the font shaper
search ends up iterating over every font looking for a match.
2023-11-20 19:12:37 -08:00
Mitchell Hashimoto
4bde931b64 Merge pull request #919 from mitchellh/gtk-ime
apprt/gtk: support IME popups such as Asian language input
2023-11-20 19:01:23 -08:00
Mitchell Hashimoto
f2c1e18647 apprt/gtk: support IME popups such as Asian language input
Fixes #882

This hooks up all the GTK.IMContext things properly so that we support
switching input methods, popups, etc. This should improve our support
for asian languages, emoji input, etc.
2023-11-20 18:08:23 -08:00
Mitchell Hashimoto
7fba402499 Merge pull request #918 from mitchellh/gtk-f10
apprt/gtk: disable GTK capturing F10
2023-11-20 14:16:56 -08:00
Mitchell Hashimoto
67119e6433 apprt/gtk: disable GTK capturing F10
Fixes #894
2023-11-20 14:16:13 -08:00
Mitchell Hashimoto
63625808c8 Merge pull request #916 from mitchellh/update-zig
update zig
2023-11-20 14:07:59 -08:00
Mitchell Hashimoto
6abaff25e4 Merge pull request #917 from mitchellh/resize-cursor
terminal: resize less cols attempts to preserve cursor y
2023-11-20 14:05:51 -08:00
Mitchell Hashimoto
db7262a8dd terminal: resize less cols attempts to preserve cursor y
Fixes #906

Previously, when the cursor isn't at the bottom and you resized to less
cols, the cursor would jump to the bottom of the viewport. But if you
resized to more columns it didn't do this. This was jarring. This commit
attempts to keep the cursor at the same place.
2023-11-20 14:00:14 -08:00
Mitchell Hashimoto
4b6dfd0042 update zig 2023-11-20 12:28:18 -08:00
Mitchell Hashimoto
9cc7a362e3 Merge pull request #915 from mitchellh/opengl-kitty
renderer/opengl: Kitty Images
2023-11-20 12:01:41 -08:00
Mitchell Hashimoto
9988dedb80 renderr/opengl: stylistic 2023-11-20 09:45:38 -08:00
Mitchell Hashimoto
d1de53ed22 renderer/opengl: correct shader params 2023-11-19 22:52:40 -08:00
Mitchell Hashimoto
a5d71723d5 renderer/opengl: do not need to convert 2023-11-19 22:49:30 -08:00
Mitchell Hashimoto
2a10af90a3 renderer/opengl: draw images 2023-11-19 22:43:39 -08:00
Mitchell Hashimoto
64cacce1cf renderer/opengl: setup image uniforms 2023-11-19 22:33:06 -08:00
Mitchell Hashimoto
76c76ce85e renderer/opengl: upload kitty image textures 2023-11-19 22:08:07 -08:00
Mitchell Hashimoto
553d81afd1 terminal: enable kitty graphics commands on OpenGL 2023-11-19 21:39:30 -08:00
Mitchell Hashimoto
63cb186ca9 Merge pull request #913 from mitchellh/scroll-and-clear
terminal: add "scroll and clear" (ESC [ 22 J) and associated logic
2023-11-19 21:18:39 -08:00
Mitchell Hashimoto
a325ab5712 terminal: remove invalid test 2023-11-19 21:13:22 -08:00
Mitchell Hashimoto
7066fb7bbb terminal: ESC [ 2 J does a scroll and clear if viewport is at a prompt 2023-11-19 21:07:16 -08:00
Mitchell Hashimoto
b5cad7184d terminal: ED handles invalid values 2023-11-19 20:47:04 -08:00
Mitchell Hashimoto
39c2549b1a terminal: add ESC [ 22 J (scroll and clear) 2023-11-19 20:45:57 -08:00
Mitchell Hashimoto
b220179c3a terminal: add "clear" screen scroll mode 2023-11-19 20:39:57 -08:00
Mitchell Hashimoto
542f605d54 terminal: add explicit errorset to scroll screen 2023-11-19 20:39:40 -08:00
Mitchell Hashimoto
a8579c1d5d Merge pull request #912 from vancluever/vancluever-nix-fix-package-build
nix: fix package build
2023-11-19 16:57:19 -08:00
Chris Marchesi
2671215211 nix: fix package build
This fixes the Nix *package* build (read: not devShell, which is not
touched) so that it builds, and also conforms to what is generally seen
for a Zig project in nixpkgs.

The highlights:

* We use a Zig 0.12 derivation that I constructed from the Zig 0.11
  derivation, in addition to LLVM 17 updates found in
  NixOS/nixpkgs#258614. This specifically includes the patches that
  address ziglang/zig#15898, and also allows us to take advantage of the
  build hooks included in the Zig toolchain there.

* We pre-download the cache using "zig build --fetch" and a fixed-output
  derivation. This is similar to how the Go builders work in nixpkgs and
  I could see Zig ultimately going in a similar path, given that the
  fetcher part of the build system seems to be shaping up to having a Go
  module system-style DX (mind you, this is a naive opinion right now).

* Finally, cleaned up the derivation so that there's no special fixups
  happening outside of what is defined in the basic nixpkgs workflow.
  This is similar to other Zig projects I looked at (notably River) that
  seem to just include their dependencies in buildInputs and call it a
  day.

One specific change that is worth noting is that this changes the build
mode from ReleaseFast to ReleaseSafe - this is the current default
within the Zig build hook in nixpkgs. If we need ReleaseFast, we'll have
to override this.
2023-11-19 14:21:34 -08:00
Mitchell Hashimoto
1c2c468b7c Merge pull request #911 from mitchellh/ctrl-tab
macos: alternate solution to ignoring "always" userTabbingPreference
2023-11-18 21:14:17 -08:00
Mitchell Hashimoto
7d9eaddeb3 macos: alternate solution to ignoring "always" userTabbingPreference
Related to #642
Fixes #910

See #642 for why we want to ignore the "always" userTabbingPreference.
To do that, we'd set tabbingMode to "disallow" because we manually (in
code) handled it all.

Unfortunately, setting the tabbingMode to "disallow" introduce #910. I
still believe this is a macOS bug at heart, so I'm going to submit an
Apple Feedback item for it. However, I've found a workaround which I
also feel is the better solution, implemented here.

Instead of setting tabbingMode to "disallow" I now detect if we're in
the scenario where the user has their system tabbing preference set to
"always". In that case, we detect if the new window has been
automatically put into a tab group by macOS, and if so we remove it.

This all happens in the `windowDidLoad` controller callback. At this
phase, our Ghostty-managed windows should NEVER be in a tab group,
because "new tab" adds them to a tab _after_. So we can be certain that
if we're already in a tab group it was from the macOS system setting.

This happens to fix #910.
2023-11-18 21:09:08 -08:00
Mitchell Hashimoto
eb694574ab config: select all should default to ctrl+shift+a on linux 2023-11-18 11:17:02 -08:00
Mitchell Hashimoto
2a002bad5e Merge pull request #908 from gpanders/surface-close
macos: ensure all surfaces are closed when a window is closed
2023-11-18 08:32:13 -08:00
Gregory Anders
be7be538af macos: ensure all surfaces are closed when a window is closed 2023-11-18 08:40:40 -06:00
Mitchell Hashimoto
080789957a Merge pull request #903 from mitchellh/macos-update
Custom Shaders (Metal and OpenGL)
2023-11-17 22:06:38 -08:00
Mitchell Hashimoto
eaf847381a config: clarify runtime reloading of shader stuff 2023-11-17 22:00:33 -08:00
Mitchell Hashimoto
f2513e0825 Merge pull request #876 from gpanders/notifications
Add support for desktop notifications
2023-11-17 21:57:09 -08:00
Mitchell Hashimoto
e55cb274ba config: custom-shader-animation 2023-11-17 21:51:07 -08:00