6440 Commits

Author SHA1 Message Date
Mitchell Hashimoto
0abb6b9efa apprt/gtk: when dragging tab out, grab focus 2024-06-03 14:40:19 -07:00
Mitchell Hashimoto
86322db991 terminal: point coord y needs to be a larger int
See comment.
2024-06-03 14:25:37 -07:00
Mitchell Hashimoto
237343f478 Merge pull request #1818 from ghostty-org/legacy
input: CSIu should send full codepoint
2024-06-02 14:39:17 -07:00
Mitchell Hashimoto
1fae17d1ef input: CSIu should send full codepoint
Related to #1802

CSIu format sends a unicode codepoint but we were just sending the first
byte of the utf8 sequence, which is very much not right. This fixes that
by parsing the utf-8.

It isn't defined what to do if the utf-8 sequence is invalid or has
multiple codepoints so we just skip CSIu encoding in that case.
2024-06-02 14:38:13 -07:00
Mitchell Hashimoto
1551c27578 input: Kitty alternate should be reported even if no shifted text (#1817)
Reproduction: HU layout Ctrl+ő

On release, we were previously not sending an alt text (we were sending
it properly on press). Kitty sends it also on release and the spec makes
it clear we should send it on release. This was just due to some faulty
logic; added a test and fixed that.
2024-06-02 14:36:08 -07:00
Mitchell Hashimoto
14417d2592 Allow keybinding arbitrary unicode codepoints (#1814)
Fixes #1802 

This allows `keybind` configurations to map to any Unicode codepoint. This enables keybindings for which we don't have a registered keycode or for custom keyboard firmwares that may produce arbitrary text (but the Ghostty support is limited to a single codepoint).

The `keybind` syntax is unchanged. If a bound character doesn't map to a known logical key that Ghostty knows about, we map it to a Unicode codepoint. The unicode codepoint is compared against the _unshifted codepoint_ from the apprt key event. 

Note that this binding is to a single _codepoint_. We don't support arbitrary sequences of characters or multi-code point graphemes for keybindings due to the complexity in memory management that would introduce.

This also provides a good fallback for scenarios where it might make sense to educate Ghostty about a key code or fix a bug in our keyboard input system, but the unicode data is correct. In that scenario, unicode key binds should allow key binds to still work while we investigate the input issues.

Example:

```
shift+ö=text:hello
```

This now works as expected on a US hardware keyboard with the Hungarian keyboard layout.
2024-06-02 10:53:36 -07:00
Mitchell Hashimoto
f63927a7c4 Merge pull request #1812 from jparise/ghostty-org
Update functional URLs for ghostty-org
2024-06-01 15:32:43 -07:00
Jon Parise
2a66d37e48 Update functional URLs for ghostty-org 2024-06-01 16:44:09 -04:00
Mitchell Hashimoto
502423dabf update README 2024-06-01 09:46:14 -07:00
Mitchell Hashimoto
c7d37dad4b update release job 2024-05-31 14:02:54 -07:00
Mitchell Hashimoto
8a5f2e18ab update READMEs to new repo URL 2024-05-31 13:36:07 -07:00
Mitchell Hashimoto
8c8e0946b4 Merge pull request #1811 from gpanders/open-no-wait-linux
os/open: do not wait for commands which do not terminate
2024-05-31 11:54:27 -07:00
Gregory Anders
695bc307ba os/open: do not wait for commands which do not terminate
Some opener commands (like macOS's open) finish immediately after
running, while others (xdg-open) do not, staying alive until the
application that was opened itself terminates.

For now, we explicitly state whether or not we should wait for a
command. Eventually we may want to do something more generic (e.g. wait
for some predetermined amount of time and if the process does not
complete, give up without collecting stderr).
2024-05-31 12:25:17 -05:00
Mitchell Hashimoto
2ca1a7aeed Merge pull request #1810 from il-k/elvish-integration
fix(shell-integration/elvish): fix mistakes
2024-05-31 08:06:02 -07:00
ilk
e5411284dd fix(elvish-integration): fix mistakes
fix some missing imports and (shamefully) faulty logic.
2024-05-31 12:20:12 +03:00
Mitchell Hashimoto
b50f34de3a Merge pull request #1809 from mitchellh/any-preso
font: when presentation isn't found, always fallback to any
2024-05-30 15:14:06 -07:00
Mitchell Hashimoto
80c0ba8758 font: when presentation isn't found, always fallback to any
Fixes #1808

When resolving a codepoint, we first attempt to find the default
presentation (if an explicit one is not given), but we were not falling
back to "any" in case that presentation was not found.
2024-05-30 14:22:42 -07:00
Mitchell Hashimoto
523f9e32cc Merge pull request #1803 from mitchellh/mixed-font
Handle mixed-color fonts
2024-05-29 08:11:33 -07:00
Mitchell Hashimoto
3a4294a567 Merge pull request #1807 from cryptocode/cc-scrollback_include_active
scrollback: Include active area when writing scrollback to file
2024-05-29 08:01:45 -07:00
cryptocode
0b6081d427 scrollback: Include active area when writing scrollback to file
Writing scrollback to file is, among other usecases, an interrim solution for searching.
Status quo is to only write history pages, and not the active area. This PR proposes that
the scrollback write includes the active area, which I think is more useful. For example,
you can then do less +G <super+shift+j> if you have long log output and then page and
reverse-search through all of it. It's a bit surprising if the active area is missing.
2024-05-29 15:19:45 +02:00
Mitchell Hashimoto
d978d05d7e font/coretext: glyphIndex must return u32 for noop shaper 2024-05-28 21:05:32 -07:00
Mitchell Hashimoto
f6e708c0fb font/coretext: cleanup unused comments 2024-05-28 20:58:06 -07:00
Mitchell Hashimoto
9a628d8a8e font: remove unused structs 2024-05-28 20:56:47 -07:00
Mitchell Hashimoto
6a8dc12ae1 font: remove deferred face todo, note why 2024-05-28 20:54:05 -07:00
Mitchell Hashimoto
a205e1e2c1 pkg/freetype: use c_ulong which isn't 64-bit on windows 2024-05-28 20:49:21 -07:00
Mitchell Hashimoto
adaeffb2b5 font/freetype: CBDT/CBLC tables imply color 2024-05-28 20:40:46 -07:00
Mitchell Hashimoto
4daa49fe27 font/freetype: update to new presentation APIs 2024-05-28 20:25:49 -07:00
Mitchell Hashimoto
326659c522 font: handle presentation at glyph layer 2024-05-28 20:09:05 -07:00
Mitchell Hashimoto
dc6b1b0b7a font/coretext: hasColor/isColored 2024-05-28 13:20:37 -07:00
Mitchell Hashimoto
d22c645a02 font/coretext: determine glyph colorization 2024-05-28 13:04:55 -07:00
Mitchell Hashimoto
8920f45fd8 font/freetype: API to load font table 2024-05-28 09:48:01 -07:00
Mitchell Hashimoto
9f885ff64f font/opentype: add SVG table parser, membership check 2024-05-27 21:35:33 -07:00
Mitchell Hashimoto
1a7cde9e3e font/coretext: can read font tables 2024-05-27 20:23:10 -07:00
Mitchell Hashimoto
83dbcaad7a Merge pull request #1774 from il-k/elvish-integration-auto
feat(shell-integration): add automatic integration for Elvish
2024-05-27 16:19:26 -07:00
Mitchell Hashimoto
66a9b1b99f rename env var 2024-05-27 16:18:51 -07:00
Mitchell Hashimoto
982e4c9570 prettier 2024-05-27 16:16:43 -07:00
ilk
2863d2c148 refactor(shell-integration): refactor to make cases alphabetical
also fix: build errors
also fix: name mismatch (GHOSTTY_FISH_XDG_DIR -> GHOSTTY_INTEGRATION_DIR)
also refactor elvish file to evade unobvious returns
2024-05-27 16:15:13 -07:00
ilk
7377ca8917 refactor(shell-integration): refactor to make cases alphabetical
also refactors elvish file to evade unobvious returns
and tries to fix some build errors
2024-05-27 16:15:12 -07:00
ilk
1fa830cc73 feat(shell-integration): add automatic integration for Elvish
Fish automatic integration taken as an example.
Just like fish, Elvish checks `XDG_DATA_DIRS` for its modules.
Thus, Fish integration in zig is reused, and integration in
Elvish now removes `GHOSTTY_FISH_XDG_DIR` environment variable
on launch.
2024-05-27 16:15:01 -07:00
Mitchell Hashimoto
1032cdb68f Merge pull request #1772 from il-k/elvish-integration
feat(shell-integration): add integration for Elvish
2024-05-27 16:11:23 -07:00
Mitchell Hashimoto
17e7ff1de3 shell-integration: add README about Elvish 2024-05-27 16:11:08 -07:00
Mitchell Hashimoto
ded7c0abac Merge pull request #1760 from jcollie/notification-suppression
Rate limit desktop notifications
2024-05-26 20:50:19 -07:00
Mitchell Hashimoto
98b05ffd09 core: nitpick some var names 2024-05-26 20:49:00 -07:00
Mitchell Hashimoto
6ea739f08c Merge pull request #1799 from mitchellh/mixed-font
font: treated fonts with mixed color/non-color glyphs as text
2024-05-26 15:24:54 -07:00
Mitchell Hashimoto
9f4d4d3c61 font: treated fonts with mixed color/non-color glyphs as text
Related to #1768 but doesn't fix it properly.

This is a temporary hack to avoid some issues with fonts that have mixed
color/non-color glyphs. If there are mixed presentations and the font
does not have emoji codepoints, then we assume it is text. This fixes
the typical scenarios.

This is not a long term solution. A proper long term solution is to
detect this scenario and on a per-glyph basis handle colorization (or
the lack thereof) correctly. It looks like to do this we'll have to
parse some font tables which is considerably more work so I wanted to do
this first.
2024-05-26 10:17:20 -07:00
Mitchell Hashimoto
6a8db0526a Merge pull request #1797 from PeterCardenas/font-nitpick
make strikethrough calculation more clear
2024-05-26 12:28:30 -04:00
Mitchell Hashimoto
e427312282 modify var name 2024-05-26 09:28:16 -07:00
Mitchell Hashimoto
8e849df493 Merge pull request #1798 from Jan200101/PR/rel-path
build: prevent breakage with relative paths
2024-05-26 12:06:33 -04:00
Jan200101
11a9dd9dad build: prevent breakage with relative paths
`root()` returns `@src().file` which isn't guaranteed to be an absolute path
2024-05-26 17:46:26 +02:00
Peter Cardenas
e56acef775 🧹 make strikethrough calculation slightly clearer
followup to https://github.com/mitchellh/ghostty/pull/1796
the sources of the strikethrough calculation are made more explicit
here: the ascent and the subtraction of the leading
2024-05-26 01:44:26 -07:00