6832 Commits

Author SHA1 Message Date
Mitchell Hashimoto
53d59eb93d Merge pull request #1971 from hauleth/fix/append-to-manpath-instead-of-overriding
fix: instead of overriding MANPATHs set by OS, append to them
2024-07-18 18:53:56 -07:00
Mitchell Hashimoto
66ed6798ed Merge pull request #1970 from qwerasd205/shaper-cache-reset
shaper/coretext: reset font cache on grid change
2024-07-18 18:49:45 -07:00
Mitchell Hashimoto
f4c26dfaf5 shaper/coretext: use pointer address for cache comparison 2024-07-18 18:46:09 -07:00
Mitchell Hashimoto
1100145cf3 tweaks 2024-07-18 15:57:55 -07:00
Łukasz Niemier
255e50124c fix: instead of overriding MANPATHs set by OS, append to them
Quoting `man man`:

>  If MANPATH begins with a colon, it is appended to the default list;

Alternatively we can think about:

> if it ends with a colon, it is prepended to the default list;

To take preference over existing values, but that shouldn't be really a
problem, as there rather isn't much of another projects named `ghostty`.
2024-07-19 00:36:42 +02:00
Qwerasd
12e8d96b1a shaper/coretext: reset font cache on grid change
Not doing this caused issues with spacing of ligatures and
multi-substitutions when changing the font size with cmd +/-
2024-07-18 17:39:57 -04:00
Mitchell Hashimoto
bf2450479e Merge pull request #1969 from vancluever/gtk-mouse-shape-drag
apprt/gtk: set mouse shape on GL area widget instead of overlay
2024-07-18 09:34:12 -07:00
Mitchell Hashimoto
ffb31bbd03 Merge pull request #1967 from jparise/bash-prompt-end
bash: always send "end of command" prompt sequence
2024-07-18 09:34:01 -07:00
Mitchell Hashimoto
7a50d37bc2 Merge pull request #1962 from jparise/screen-clearprompt-continuation
terminal: test clearPrompt with a continuation
2024-07-18 09:30:26 -07:00
Mitchell Hashimoto
b387796cc9 Merge pull request #1965 from jparise/editorconfig
editorconfig: indent styles for shell scripts
2024-07-18 09:28:39 -07:00
Chris Marchesi
d0446a8444 apprt/gtk: set mouse shape on GL area widget instead of overlay
In b7699b9a, mouse shape functionality was moved from the GL area widget
to the overlay that was newly created for the URL target information
that was included as part of #1928. This seems to have the side effect
of causing the pointer shape to revert to the default shape (here, the
basic arrow pointer) when dragging the mouse during selections.

This moves it back to the GL area, which seems to correct this. It
doesn't seem to need to be added to both - everything seems to function
correctly when a link is moused over, and then selection is made down to
the overlay area (not that this scenario is very likely, though).
2024-07-18 08:56:24 -07:00
Remi Gelinas
699fce0ee5 docs: add docstrings 2024-07-18 11:03:23 -04:00
Jon Parise
00fe956b3b bash: always send "end of command" prompt sequence
I noticed that both wezterm[0] and the OSC 133 reference script[1] (upon
which wezterm and our bash integration appear to be based) always send
the "end of prompt" sequence in their precmd functions (except during
their first execution, when no previous command has been executed).

This is a subtle logical difference: `$_ghostty_executing=""` (first
run) versus `$_ghostty_executing="0"` (reentrancy check). I'm not sure
how much a difference it makes except in rare edge case scenarios, but I
think it makes sense to be consistent and always report the end of the
current command.

[0] https://github.com/wez/wezterm/blob/main/assets/shell-integration/wezterm.sh#L479
[1] https://gitlab.freedesktop.org/Per_Bothner/specifications/-/blob/master/proposals/prompts-data/shell-integration.bash
2024-07-18 10:31:41 -04:00
Jon Parise
8218a19421 editorconfig: indent styles for shell scripts
We're consistently using 2-space indentation in our shell scripts with
the exception of bash-prefix.sh, which is a vendored script uses 4-space
indentation (https://github.com/rcaloras/bash-preexec).

Add editorconfig rules to help maintain this consistency going forward.
2024-07-18 09:17:14 -04:00
Jon Parise
a4bc98a031 terminal: differentiate OSC 133 continuation and secondary kinds
OSC 133 defines distinct continuation (c) and secondary (s) prompt
kinds. They're both treated as prompt continuations but have different
semantic meanings: `c` allows the user to "go back" and edit previous
lines, while `s` does not.

We don't (yet) handle this "editable" distinction, but this change makes
our OSC parser slightly more correct.
2024-07-18 09:09:00 -04:00
Mitchell Hashimoto
a2f0dbcecf Merge pull request #1955 from ghostty-org/ibsr
terminal: implement in-band size reports (Mode 2048)
2024-07-17 19:54:24 -07:00
Jon Parise
9369a1a34b terminal: test clearPrompt with a continuation 2024-07-17 20:41:46 -04:00
Remi Gelinas
0197f6d15e fix: handle recursive config files 2024-07-17 17:27:31 -04:00
Remi Gelinas
a546da0417 feat: print every config error message 2024-07-17 17:03:09 -04:00
Remi Gelinas
368868f712 fix: handle relative paths in CLI 2024-07-17 16:51:16 -04:00
Mitchell Hashimoto
c12bed7557 Merge pull request #1960 from o-az/patch-1
fix: remove dollar sign from code snippets
2024-07-17 13:47:35 -07:00
omar
252c0ef927 fix: remove dollar sign from code snippets
currently when copying code snippets one has to manually remove the dollar sign first. Consider:

```sh
$ echo "this can't be copy pasted into terminal because of the initial $"
```

vs.

```sh
echo "this is fine"
```
2024-07-17 14:18:23 -06:00
Mitchell Hashimoto
91d13ae0b0 Merge pull request #1957 from ghostty-org/font-flag
config: font-family CLI flags will clear font families set in files
2024-07-17 12:05:06 -07:00
Remi Gelinas
3350e3c848 refactor: move config file loading into loadFile 2024-07-17 15:02:03 -04:00
Mitchell Hashimoto
6ac13034fe config: font-family CLI flags will clear font families set in files
This is a quality of life UX change. font-family is a repeatable
configuration where each subsequent value will be added as a fallback
font.

This introduces a UX gotcha where if a font was set in a config file,
the CLI args (which are loaded later) would _append_ to the font
families. This has never once been the behavior I've wanted. Previously,
you'd have to do `--font-family=""` which is clunky.

This change makes it so that CLI font-family flags will automatically
clear the families set in the configuration file.
2024-07-17 11:59:15 -07:00
Mitchell Hashimoto
12291d036c Merge pull request #1956 from ghostty-org/gtk-e-flag
config: `-e` CLI flag automatically implies `gtk-single-instance=false`
2024-07-17 11:21:26 -07:00
Mitchell Hashimoto
306e9f8bb6 config: -e CLI flag automatically implies gtk-single-instance=false
`gtk-single-instance` should already be doing desktop-only detection and
in most cases it does. But there are some cases where it isn't and we
haven't quite tracked it down yet.

In any case, when `-e` is used from the CLI, we definitely do not want
to launch in single instance mode because `-e` is typically used in
scripts or for one-off instances. This forces gtk-single-instance to
false.
2024-07-17 11:17:15 -07:00
Mitchell Hashimoto
137ba66211 terminal: implement in-band size reports (Mode 2048)
https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
2024-07-17 10:18:15 -07:00
Remi Gelinas
431c99313c feat(cli): add initial validate-config action 2024-07-17 12:27:12 -04:00
Mitchell Hashimoto
11571a86da Merge pull request #1954 from ghostty-org/base64
SIMD base64 decode for Kitty graphics data
2024-07-16 20:29:48 -07:00
Mitchell Hashimoto
360e4f690f terminal/kitty: change graphics base64 decode to use simdutf 2024-07-16 20:21:09 -07:00
Mitchell Hashimoto
27acd71105 simd: add base64 functions from simdutf 2024-07-16 20:12:45 -07:00
Mitchell Hashimoto
00b1851191 Merge pull request #1952 from kareigu/gtk_fix_inspector_menu_button
Fix GTK terminal inspector menu button
2024-07-16 08:52:27 -07:00
karei
50c562bb47 gtk: fix terminal inspector menu button 2024-07-16 15:17:26 +03:00
Mitchell Hashimoto
fff80b3496 Merge pull request #1950 from ghostty-org/gtk-deco
apprt/gtk: toggle_window_decorations keybinding
2024-07-15 21:29:37 -07:00
Mitchell Hashimoto
2d7baaa7d7 apprt/gtk: toggle_window_decorations keybinding
Fixes #1943
2024-07-15 21:23:52 -07:00
Mitchell Hashimoto
cef4ef49ba Merge pull request #1948 from ghostty-org/termio
Termio Refactor
2024-07-15 15:26:36 -07:00
Mitchell Hashimoto
524f24aaf5 termio: remove unused data 2024-07-15 15:23:39 -07:00
Mitchell Hashimoto
8cd901450a remove unused derived config values 2024-07-15 10:53:01 -07:00
Mitchell Hashimoto
3867e20e72 termio: get rid of manual backend 2024-07-15 10:50:17 -07:00
Mitchell Hashimoto
8a5e43f3f1 termio: update docs 2024-07-15 10:30:00 -07:00
Mitchell Hashimoto
835d622baa termio: writer => mailbox 2024-07-15 10:23:09 -07:00
Mitchell Hashimoto
001a6d2624 termio: reader => backend 2024-07-15 10:14:14 -07:00
Mitchell Hashimoto
dc6dc1d3d2 termio: remove more state 2024-07-15 10:02:02 -07:00
Mitchell Hashimoto
3625e1e58e termio: take reader as option 2024-07-15 09:55:31 -07:00
Mitchell Hashimoto
4a4b9f2411 termio: trying to get Exec to not have access to full Opts 2024-07-15 09:45:58 -07:00
Mitchell Hashimoto
485346c694 termio: more windows fixes 2024-07-14 18:15:19 -07:00
Mitchell Hashimoto
f0d896e11d termio: more windows fixes 2024-07-14 15:17:40 -07:00
Mitchell Hashimoto
b0cd40d1de termio: fix windows build 2024-07-14 15:16:16 -07:00
Mitchell Hashimoto
08ed60ceec termio: ReadData is gone! 2024-07-14 15:15:22 -07:00