4145 Commits

Author SHA1 Message Date
Chris Marchesi
c3b44020f4 nix: add GitHub Actions workflow
This adds a nix workflow that does the following:

* Checks to see if the Zig cache fixed derivation needs its hash
  updated. It does this by downloading a new cache, calculating the
  hash, and comparing it against what has already been set. If the hash
  is different, the workflow fails.
* Runs a Nix build if the hash is OK, testing the build of
  packages.ghostty (using "nix build .")

The cache workflow we use in the build job comes from:
  https://github.com/DeterminateSystems/magic-nix-cache-action/

Fixes #937.
2023-11-24 17:07:55 -08:00
Tim Culverhouse
07e6cf900f key-encode: only set associated text when there is printable text
Associated text should only be sent to the terminal when printable text
is generated from the keypress. Prevent sending associated text when any
modifier is pressed, except for Shift, NumLock, and Capslock

This brings Ghostty inline with the output of Kitty.
2023-11-24 14:27:37 -06:00
Mitchell Hashimoto
115e8130ba Merge pull request #955 from mitchellh/text_action
Text action: input any text you want
2023-11-24 10:37:12 -08:00
Mitchell Hashimoto
6fc0d2d4a8 input: allocate for text bindings 2023-11-24 10:36:43 -08:00
Mitchell Hashimoto
0e2970bdeb config: add string parse, tests 2023-11-24 10:26:55 -08:00
Mitchell Hashimoto
2e02083eef Revert "parse string literal at load time"
This reverts commit 9c3e2b4ddd546e5f0c9d60c25a22bc5ab0be1283.
2023-11-24 10:06:34 -08:00
Guillaume Wenzek
9c3e2b4ddd parse string literal at load time 2023-11-24 18:15:47 +01:00
Guillaume Wenzek
223accb4c8 add "text" action 2023-11-24 17:53:46 +01:00
Mitchell Hashimoto
07166fc9d2 Merge pull request #954 from mitchellh/kitty-jp
input: kitty encoding should ignore committed preedit state
2023-11-24 08:02:16 -08:00
Mitchell Hashimoto
a67d90710c input: kitty encoding should ignore committed preedit state
Fixes #952
2023-11-24 07:58:31 -08:00
Mitchell Hashimoto
bf30c38945 Merge pull request #950 from mitchellh/osc1
terminal: implement OSC 1 (change icon) and ignore it
2023-11-23 14:59:26 -08:00
Mitchell Hashimoto
8b09764614 terminal: implement OSC 1 (change icon) and ignore it
Fixes #948

We want to parse it so we can log at a lower level than warn but we
don't want to support this because it isn't very well defined.
2023-11-23 14:58:34 -08:00
Mitchell Hashimoto
21ee31a338 Merge pull request #949 from mitchellh/mouse-cursor-key-sel
core: clear selection on mouse cursor keys
2023-11-23 14:52:56 -08:00
Mitchell Hashimoto
78420119df core: clear selection on mouse cursor keys
Fixes #939
2023-11-23 14:46:09 -08:00
Mitchell Hashimoto
ed34d24936 Merge pull request #947 from mitchellh/macos-entitlements
macos: add entitlements for basically everything so macos asks
2023-11-23 09:01:44 -08:00
Mitchell Hashimoto
499073b540 macos: add entitlements for basically everything so macos asks
Fixes #946

The terminal needs entitlements for pretty much everything because
programs running within the terminal may require these and they're
inherited (unfortunately).
2023-11-23 09:00:20 -08:00
Mitchell Hashimoto
f3140e1cf8 Merge pull request #945 from mitchellh/binding-event
core: do not send repeat/release events if the press consumed a binding
2023-11-23 08:50:37 -08:00
Mitchell Hashimoto
b34e0f6ec7 core: do not send repeat/release events if the press consumed a binding
Fixes #943
2023-11-23 08:40:52 -08:00
Mitchell Hashimoto
b01264d6b7 Merge pull request #944 from vancluever/vancluever-font-face-powerline
font/sprite: add Powerline face
2023-11-23 08:12:13 -08:00
Chris Marchesi
e0d458004f font/sprite: add Powerline face
This adds the Powerline face to our set of built-in faces, which
represents glyphs that are used to draw Powerline-style shell prompts
and status lines.

Since these are used similar to box-drawing characters, alignment is
important, and this gives us the most control in preventing related
artifacts.

This initial commit is scaffolding and support for the various solid
triangles - additional glyphs will come in other commits.

Fixes #675.
2023-11-23 01:29:12 -08:00
Mitchell Hashimoto
4be994c58a update README 2023-11-22 22:27:14 -08:00
Mitchell Hashimoto
dead82bcf1 update README to cover themes 2023-11-22 22:25:58 -08:00
Mitchell Hashimoto
5acaf3279d apprt/gtk: use new resources dir 2023-11-22 22:10:16 -08:00
Mitchell Hashimoto
c7a1e074dd don't use package manager for iterm2 themes yet 2023-11-22 22:08:27 -08:00
Mitchell Hashimoto
f25a136ea5 cli: +list-themes 2023-11-22 21:50:16 -08:00
Mitchell Hashimoto
84e71c8c1f config: update themes docs 2023-11-22 21:38:05 -08:00
Mitchell Hashimoto
a6457c2c1c macos: copy themes 2023-11-22 21:37:59 -08:00
Mitchell Hashimoto
4dfbb79f8c config: load themes 2023-11-22 21:34:26 -08:00
Mitchell Hashimoto
45a4be6873 core: move resources dir to main global state 2023-11-22 21:12:01 -08:00
Mitchell Hashimoto
0dc5516ac6 config: add "theme" config, track inputs 2023-11-22 21:08:39 -08:00
Mitchell Hashimoto
7a91a23e40 build: add iterm2 themes repository, install into resources dir 2023-11-22 21:08:26 -08:00
Mitchell Hashimoto
9ee1c939fd Merge pull request #940 from mitchellh/macos-tab-reorder
macos: relabel tabs when they're reordered with the mouse
2023-11-22 11:44:35 -08:00
Mitchell Hashimoto
7036676ec0 macos: relabel tabs when they're reordered with the mouse
Prior to this commit, the shortcut shown on the tab would not be updated
until a focus change occurred. There is no event for this so the way we
do it is by listening for the tab view frame to change, comparing the
window state, and then updating labels.
2023-11-22 11:43:04 -08:00
Mitchell Hashimoto
ec3b570b3e terminal: know about autorepeat mode
Ignore it because xterm does
2023-11-21 18:48:05 -08:00
Mitchell Hashimoto
34cfe0abab xterm audit: DECOM (origin mode) 2023-11-21 18:32:00 -08:00
Mitchell Hashimoto
de25ba231e Merge pull request #936 from mitchellh/gtk-cursor
apprt/gtk: set default cursor to be "text" (ibeam)
2023-11-21 17:13:20 -08:00
Mitchell Hashimoto
2ce3db7dc2 apprt/gtk: set default cursor to be "text" (ibeam)
Fixes #933

On startup, we'd set the cursor to "text" but we wouldn't store that as
our cursor so when the mouse was unhidden, we'd go back to "default".
This PR changes it so that on surface startup we set and store the
"text" cursor so as the cursor hides/shows it reverts to the proper
value.
2023-11-21 17:10:44 -08:00
Mitchell Hashimoto
1df88ae4aa Merge pull request #935 from mitchellh/kitty-gl-convert
renderer/opengl: convert Kitty images from RGB to RGBA
2023-11-21 16:57:50 -08:00
Mitchell Hashimoto
9198069f14 Merge pull request #934 from vancluever/vancluever-nix-update-zigcachehash-and-add-note
nix: update zigCacheHash, mention that building pkg requires src
2023-11-21 16:57:37 -08:00
Mitchell Hashimoto
247b92ce07 renderer/opengl: convert Kitty images from RGB to RGBA
Fixes #932

We have to do this for Metal as well (this code is copied from Metal)
since Metal doesnt even allow RGB textures. I couldn't figure out a way
to get the A value to be "255" (byte), it seems to always be set to 1
which gets normalized to 1/255, so lets just manually convert.
2023-11-21 16:56:02 -08:00
Chris Marchesi
01663c8b29 nix: update zigCacheHash, mention that building pkg requires src
This updates the zigCacheHash and just adds a note mentioning that using
the package will require you to rebuild LLVM 17 and Zig, and directs
people to use the devShell until this is resolved.

This is likely good advice for most people until such time that both are
in nixpkgs (or at least LLVM 17 as it's by far the bigger culprit here).
2023-11-21 15:59:24 -08:00
Mitchell Hashimoto
b022816275 Merge pull request #930 from mitchellh/term-scroll
terminal: fix cursor pos when resizing more rows not at bottom
2023-11-21 11:32:07 -08:00
Mitchell Hashimoto
44e28e43d3 terminal: fix cursor pos when resizing more rows not at bottom
Fixes #906

This changes our resize behavior when increasing row height.

If the cursor was originally at the bottom of the viewport, existing
scrollback (if it exists) will be "pulled down" from the top,
effectively keeping the cursor at the bottom. This is the behavior
today, prior to this commit.

If the cursor is not at the bottom of the viewport, scrollback will NOT
be "pulled down" and instead blank lines will be added _below_. This is
new behavior.
2023-11-21 11:27:02 -08:00
Mitchell Hashimoto
7fbcc46106 Merge pull request #929 from mitchellh/kitty-alt
terminal: switching alt/primary screen invalidates Kitty image state
2023-11-21 08:40:51 -08:00
Mitchell Hashimoto
fd84178cc7 terminal: switching alt/primary screen invalidates Kitty image state 2023-11-21 08:37:41 -08:00
Mitchell Hashimoto
9cafd17e86 update ziglyph 2023-11-21 08:34:13 -08:00
Mitchell Hashimoto
962d966dec Merge pull request #927 from vancluever/vancluever-nix-update-cache-hash
nix: update zigCacheHash
2023-11-21 08:30:55 -08:00
Mitchell Hashimoto
9492d7e966 Merge pull request #928 from rockorager/osc4-fix
osc: fix OSC4 response
2023-11-21 08:18:30 -08:00
Tim Culverhouse
469c88c0c6 osc: fix OSC4 response
When reporting colors via OSC4, the index must also be reported.
2023-11-21 10:00:14 -06:00
Chris Marchesi
07e16eb7c1 nix: update zigCacheHash
Just a bump to zigCacheHash to address dependency updates.
2023-11-20 23:50:31 -08:00