4231 Commits

Author SHA1 Message Date
Mitchell Hashimoto
ec2bc74a22 Merge pull request #1111 from mitchellh/adjust-width
font: center text when adjust-cell-width is used
2023-12-16 20:58:22 -08:00
Mitchell Hashimoto
481529393b font: center text when adjust-cell-width is used
Fixes #1086
2023-12-16 20:56:57 -08:00
Mitchell Hashimoto
b622df64b2 Merge pull request #1110 from mitchellh/shape
renderer: characters in the Unicode PUA (private use area) are scaled if not followed by whitespace
2023-12-16 20:31:33 -08:00
Mitchell Hashimoto
9178fabc5d renderer: also constrain PUA chars if preceded by PUA 2023-12-16 20:18:14 -08:00
Mitchell Hashimoto
231a2b6369 renderer/opengl: implement fg_constrained 2023-12-16 20:11:37 -08:00
Mitchell Hashimoto
0b658c8217 renderer/metal: constrain PUA glyphs if they aren't next to space 2023-12-16 20:07:25 -08:00
Mitchell Hashimoto
2da5ec2c28 Merge pull request #1108 from cespare/url-boundary-regex
config: improve link matching for URLs ending in . or )
2023-12-16 19:28:02 -08:00
Caleb Spare
ae94af37c0 config: improve link matching for URLs ending in . or )
Fixes #1098
2023-12-16 17:34:38 -08:00
Mitchell Hashimoto
fd80889f9a Merge pull request #1104 from meatcar/gtk-icons-fix
nix: use wrapGAppsHook to package ghostty
2023-12-16 14:23:08 -08:00
Mitchell Hashimoto
d796d1259b nix: only add shellhook on linux 2023-12-16 14:14:53 -08:00
Mitchell Hashimoto
30d3928e0f termio: allocate initial capacity more accurately 2023-12-16 14:04:58 -08:00
Denys Pavlov
212a95866a nix: fix GTK icons for debug builds
Set `XDG_DATA_DIRS` in `nix develop` shell to include default Gnome
icon sets and gsettings schemas.

Sourced from [nixos wiki](https://nixos.wiki/wiki/Development_environment_with_nix-shell#No_GSettings_schemas_are_installed_on_the_system).
2023-12-16 13:15:03 -05:00
Denys Pavlov
82f102224f nix: use wrapGAppsHook4 to package ghostty
`wrapGAppsHook4` is recommended by nixpkgs for packaging GTK4
applications.[1] It ensures `XDG_DATA_DIRS` includes the nescessary
icons and gsettings schemas.
2023-12-16 13:04:54 -05:00
Denys Pavlov
33ebda5633 nix: teach direnv about flake.nix imports
direnv now watches flake.nix dependencies in `nix/`, reloading
the environment on any changes.
2023-12-16 12:58:17 -05:00
Mitchell Hashimoto
e4dc9845ed Merge pull request #979 from vancluever/vancluever-rect-crosshair
Surface: set crosshair, change event processing logic for mouse tracking
2023-12-16 08:08:11 -08:00
Mitchell Hashimoto
add6bfe0df Merge pull request #1106 from mitchellh/macos-zsh
macos: do not load zsh config on the outer zsh launch
2023-12-16 08:00:29 -08:00
Mitchell Hashimoto
a8ef7d73d7 macos: do not load zsh config on the outer zsh launch
Related to #1102, #1074

Because we are now using the built-in zsh on macOS to launch the real
shell the user wants to use (see #1102 for why), this "outer zsh"
process was consuming our shell integration setup.

This commit adds flags so that this zsh instance doesn't load local
zshrc files and therefore doesn't consume our shell integration setup.
2023-12-16 07:54:10 -08:00
Chris Marchesi
6e8ed4e8b3 Surface: set crosshair, change event processing logic for mouse tracking
This work is mainly targeted at adding the crosshair for when
ctrl/super+alt is pressed. We also add this for when mouse tracking is
enabled so that we show the crosshair when ctrl/super+alt+shift is
pressed at the same time.

I've also changed the event processing logic here because the amount of
keys we have to process has greatly increased. Instead of processing
each individual event, we now process the modifier state.

Additionally, some refactoring has been done geared at starting to
re-work the mouse for the core surface into a something stateful. My
hope is that we can continue to unravel some of this from the core
surface so that we can process key inputs, motion events, and anything
else relevant as inputs to transitions for shape display, click
behavior, etc.

This commit now also moves the ctrlOrSuper handlers to respective parts
in the Key hierarchy, while also adding additional helpers for other
modifiers.
2023-12-15 19:23:10 -08:00
Mitchell Hashimoto
8464010903 Merge pull request #1105 from mitchellh/kitty-lock
renderer/opengl: acquire lock to prep kitty images
2023-12-15 14:47:30 -08:00
Mitchell Hashimoto
5b4232b094 renderer/opengl: acquire lock to prep kitty images
Fixes #1101

GTK forces all GLArea drawing to happen on the GUI thread. In this
scenario, `updateFrame` and `drawFrame` could be happening in parallel.
This commit grabs the lock while updating the Kitty image protocol state
since that is used by both functions.

We already have a mutex called "draw_mutex" that we hold while we're
modifying data that could be shared by this separate draw thread. We
should reuse that here.
2023-12-15 14:15:32 -08:00
Mitchell Hashimoto
5051c01514 Merge pull request #1091 from vancluever/vancluever-conformance-tests-stable-strings
build: use dedicated strings for conformance test keys
2023-12-15 12:43:24 -08:00
Mitchell Hashimoto
c534cd0b96 Merge pull request #1094 from gpanders/decrqss
termio: implement DECRQSS
2023-12-15 12:34:08 -08:00
Mitchell Hashimoto
d702e0d19e Merge pull request #1103 from mitchellh/apprt/num-mismatch
apprt: Fix key callback input key assignments
2023-12-15 12:33:36 -08:00
Brian Cain
ed3e436e47 apprt: Fix key callback input key assignments
Prior to this commit, two and three were not properly assigned. This
commit updates that to assign two to two, and three to three.
2023-12-15 11:23:52 -08:00
Mitchell Hashimoto
e36c5203fa Merge pull request #1102 from mitchellh/macos-login
macOS: use login command, "command" now accepts arguments directly
2023-12-15 10:13:52 -08:00
Mitchell Hashimoto
ac3873401c termio/exec: only use sh login flag in flatpak 2023-12-15 10:00:53 -08:00
Mitchell Hashimoto
b19ec39868 config: remove command-arg 2023-12-15 09:59:04 -08:00
Mitchell Hashimoto
c345d3c941 termio/exec: use login(1) on macOS 2023-12-15 09:34:03 -08:00
Gregory Anders
47f8202334 termio: remove some code duplication in DECRQSS handler 2023-12-15 08:35:44 -06:00
Gregory Anders
08967f43e3 termio: use u2 for length 2023-12-15 08:05:32 -06:00
Chris Marchesi
5e7e3be60a build: use dedicated strings for conformance test keys
This uses separate strings for the keys for the conformance tests versus
just deriving them from the sliced path.

This fixed an issue for me where a few of the tests were showing up as
InvalidConformance (notably the "blocks" test), even though, oddly
enough, the key/value entries do appear to be there (e.g. if you iterated
over them). I did notice, though, that we currently sliced the key from
the file entry of the directory iterator, which is closed at the end of
conformanceSteps.
2023-12-14 21:35:04 -08:00
Gregory Anders
bf06c05c09 termio: implement DECRQSS
Only SGR, DECSCUSR, DECSTBM, and DECSLRM are handled, as these are the
only ones that Ghostty supports (as far as I can tell) and are the only
ones that seem actually useful.
2023-12-14 17:26:53 -06:00
Mitchell Hashimoto
05222b3ea8 Merge pull request #1093 from mitchellh/coretext-font-family
font/coretext: use `CTFontCopyFamilyName`
2023-12-14 14:00:19 -08:00
Kyaw
22d631942c font/coretext: use CTFontCopyFamilyName
Use `CTFontCopyFamilyName` instead of `CTFontCopyDisplayName` to get
the font name to match the behavior of how it's done on freetype
backend.
2023-12-15 02:26:47 +06:30
Mitchell Hashimoto
2cda1e0514 Merge pull request #1088 from mitchellh/kitty-mods
macos: proper event when sided mod released with other side pressed
2023-12-13 21:57:30 -08:00
Mitchell Hashimoto
9642dd3275 macos: proper event when sided mod released with other side pressed
Related to https://github.com/mitchellh/ghostty/issues/1082

This fixes two separate issues to follow along with the new spec changes
Kovid pushed to Kitty:

  1. When two modifiers are pressed and one is released, this shows up
     as a proper release event with the correct side. Previously, the
     correct side was shown but as a press event.

  2. When two modifiers are pressed and one is released, the Kitty event
     should not have that specific modifier set. For example, pressing
     left ctrl, then right ctrl, then releasing right ctrl should encode
     as "right ctrl released" but with NO modifiers still present.
2023-12-13 21:50:00 -08:00
Mitchell Hashimoto
9f7e53620b Merge pull request #1070 from mattrobenolt/overlay-color
Configurable unfocused dimming color
2023-12-13 19:10:22 -08:00
Mitchell Hashimoto
220da88a9a config: make unfocused-split-fill default to bg 2023-12-13 19:06:25 -08:00
Mitchell Hashimoto
4e0916d397 config: C API read allows any packed struct that fits in c int 2023-12-13 18:54:41 -08:00
Mitchell Hashimoto
6b94252da6 config: docs 2023-12-13 18:54:36 -08:00
Mitchell Hashimoto
5baab8f4f3 Merge pull request #1075 from rockorager/keypad
fix: keypad key encoding on GTK
2023-12-13 18:48:15 -08:00
Mitchell Hashimoto
89348fd73e include: add new keycodes 2023-12-13 18:46:55 -08:00
Mitchell Hashimoto
c905b08b1e apprt/gtk: slight stylistic change 2023-12-13 18:40:12 -08:00
Mitchell Hashimoto
18664b6fdf Merge pull request #1087 from mitchellh/close-quit
core: quit-after-last-window-closed works properly with "exit"
2023-12-13 16:36:45 -08:00
Mitchell Hashimoto
b021d76edf core: quit-after-last-window-closed works properly with "exit"
Fixes #1085

This moves the logic of exiting when there are no surfaces left fully to
apprt and away from the core.
2023-12-13 16:35:14 -08:00
Mitchell Hashimoto
2732ca9c5c os: passwd also gets username 2023-12-13 15:35:21 -08:00
Mitchell Hashimoto
cc6270f549 Merge pull request #1083 from gpanders/control-key-handling
macos: special case handling of some control keys
2023-12-13 13:50:06 -08:00
Mitchell Hashimoto
fefd4ca04d macos: style changes, make equivalent not an optional 2023-12-13 13:49:39 -08:00
Mitchell Hashimoto
54a5246ead Merge pull request #1084 from mitchellh/kitty-again
input/kitty: do not encode event with mods if press
2023-12-13 13:41:46 -08:00
Mitchell Hashimoto
5a372f6a06 input/kitty: do not encode event with mods if press
Fixes #1082
2023-12-13 13:39:44 -08:00