6281 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e66d11ac69 Merge pull request #1830 from ghostty-org/xdg-title
xdg-terminal-exec invocations set title based on command
2024-06-06 14:53:31 -07:00
Mitchell Hashimoto
be598be6de config: xdg-terminal-exec parsing should ignore the initial "-e" 2024-06-06 14:50:04 -07:00
Mitchell Hashimoto
1093ccecb4 xdg-terminal-exec invocations set title based on command
Fixes #1724

See background in #1724. The general idea is that for Ghostty
invocations via xdg-terminal-exec, we set the initial title to the
command automatically so that window managers can modify the styling.

We only do this for xdg-terminal-exec because that protocol/spec is
specifically for the scenario that the terminal is being used to launch
a command from the desktop environment.
2024-06-06 10:01:32 -07:00
Mitchell Hashimoto
56871c3828 Merge pull request #1828 from ghostty-org/cgroup
Linux: Launch each terminal surface into its own cgroup
2024-06-06 09:28:38 -07:00
Mitchell Hashimoto
096ed254df Merge pull request #1827 from Jan200101/PR/inspector-unicode
inspector: fallback to unicode if key event is invalid
2024-06-05 18:23:30 -07:00
Mitchell Hashimoto
dda6a22ea9 apprt/gtk: cgroup hierarchy only affects surfaces 2024-06-05 10:42:43 -07:00
Mitchell Hashimoto
cc6d8bfbfd config: clarify some config 2024-06-05 10:29:01 -07:00
Mitchell Hashimoto
99d567274b config: add cgroup memory limit config 2024-06-05 10:27:53 -07:00
Mitchell Hashimoto
3b41b89c23 apprt/gtk: config to hard fail on cgroup init 2024-06-05 09:47:48 -07:00
Mitchell Hashimoto
ad5d44af10 config: control cgroup isolation 2024-06-05 09:43:57 -07:00
Mitchell Hashimoto
7d9da34259 termio/exec: move subprocess into cgroup 2024-06-05 09:30:21 -07:00
Mitchell Hashimoto
a63c8d0913 termio: plumb a lot more to get ready to move into cgroup 2024-06-05 09:25:36 -07:00
Mitchell Hashimoto
9f1572918f bikeshed style 2024-06-05 09:11:44 -07:00
Jan200101
4220a3bd3a inspector: fallback to unicode when key event is invalid
This prevents non-ascii characters like Ö from being displayed as invalid
2024-06-05 09:10:24 +02:00
Mitchell Hashimoto
dc51b8269c plumb the linux cgroup through to termio 2024-06-04 21:37:34 -07:00
Mitchell Hashimoto
1285b4f243 apprt/gtk: store transient cgroup 2024-06-04 21:10:42 -07:00
Mitchell Hashimoto
01bfce0981 os: cgroup can set memory limits 2024-06-04 21:02:25 -07:00
Mitchell Hashimoto
d351e80158 os: cgroup create/move 2024-06-04 20:22:17 -07:00
Mitchell Hashimoto
bbe525c964 os: API to configure cgroup controllers 2024-06-04 19:36:48 -07:00
Mitchell Hashimoto
b5c4d2f60d os: rename linux => cgroup 2024-06-04 19:28:12 -07:00
Mitchell Hashimoto
c0b061edd9 os: API for listing cgroup controllers 2024-06-04 19:23:18 -07:00
Mitchell Hashimoto
409c958b7e apprt/gtk: cgroup initialization 2024-06-04 18:59:44 -07:00
Mitchell Hashimoto
0a5f3fa0a4 os: add linux API for getting cgroup by pid 2024-06-04 15:15:11 -07:00
Mitchell Hashimoto
955246d6a0 Merge pull request #1825 from Pangoraw/gtk_nb_switch
gtk: update tab's window upon switching notebook
2024-06-04 08:59:16 -07:00
Paul Berg
2d9aad9806 gtk: update tab's window upon switching notebook 2024-06-04 09:19:15 +02:00
Mitchell Hashimoto
a502089582 renderer/opengl: don't append assume capacity
Fixes #1815
2024-06-03 20:55:11 -07:00
Mitchell Hashimoto
0b971f6760 Merge pull request #1824 from ghostty-org/iterm2
update color themes to a34aeb1f505707a35102fe95984d4bea4a85eb3e
2024-06-03 19:28:59 -07:00
Mitchell Hashimoto
4b277f1bca update color themes to a34aeb1f505707a35102fe95984d4bea4a85eb3e 2024-06-03 19:24:56 -07:00
Mitchell Hashimoto
fdd30725e5 Merge pull request #1823 from jparise/explicit-bash
shell-integration: bash must be explicitly enabled
2024-06-03 18:43:53 -07:00
Mitchell Hashimoto
cd7da9eb4b inspector: fix encoding of pty-encoded key event 2024-06-03 18:40:52 -07:00
Jon Parise
7d7fa46b0c shell-integration: bash must be explicitly enabled
For now, bash integration must be explicitly enabled (by setting
`shell-integration = bash`). Our automatic shell integration requires
bash version 4 or later, and systems like macOS continue to ship bash
version 3 by default. This approach avoids the cost of performing a
runtime version check.
2024-06-03 20:34:29 -04:00
Mitchell Hashimoto
29b3f9d528 gtk: set tab group so that tabs can be dropped onto other windows
Related to #1122
2024-06-03 16:21:50 -07:00
Mitchell Hashimoto
4bcc8b998c Merge pull request #1822 from ghostty-org/gtk-wrap
gtk: goto_split:previous/next wrap
2024-06-03 16:11:58 -07:00
Mitchell Hashimoto
a72a02488f gtk: goto_split:previous/next wrap
Fixes #1258

This matches macOS.
2024-06-03 16:06:24 -07:00
Mitchell Hashimoto
b9340aad55 Merge pull request #1821 from ghostty-org/gtk-mouse
gtk: various mouse-hide-while-typing fixes
2024-06-03 15:39:23 -07:00
Mitchell Hashimoto
d6f79ce96b gtk: note setting title unhides the cursor 2024-06-03 15:36:10 -07:00
Mitchell Hashimoto
67c17cba1a apprt/gtk: only set cursor on shape change if its visible 2024-06-03 15:07:33 -07:00
Mitchell Hashimoto
30c1ab737c core: only hide mouse on key press events
see comment
2024-06-03 15:04:19 -07:00
Mitchell Hashimoto
ac554c74ff core: do not toggle mouse hidden on keyCallback with mods
If the mouse was hidden, we just keep it hidden.
2024-06-03 14:55:21 -07:00
Mitchell Hashimoto
254608697e Merge pull request #1820 from ghostty-org/gtk
apprt/gtk: when dragging tab out, grab focus
2024-06-03 14:46:14 -07:00
Mitchell Hashimoto
7e82cd4d44 Merge pull request #1819 from ghostty-org/pointcoord
terminal: point coord y needs to be a larger int
2024-06-03 14:43:13 -07:00
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