Commit Graph

12112 Commits

Author SHA1 Message Date
Mitchell Hashimoto
c8fce8850b apprt/gtk-ng: global shortcuts 2025-08-04 10:25:24 -07:00
Mitchell Hashimoto
41e8f1374b gtk-ng: prevent split button from becoming focused (#8136)
Without this, if you create a new tab by clicking on the split button it
will be the focus for any new input. So for example if you create a new
tab and then immediately press the space bar a bunch of new tabs will be
created. Other keypresses will just "disappear". Only by clicking in the
new tab to focus it will keyboard input go to "the right place".
2025-08-04 08:07:52 -07:00
Jon Parise
eccff1ea95 fix fish shell syntax for ssh-env shell integration (#8138)
As discussed here
https://github.com/ghostty-org/ghostty/discussions/8021

This fixes invalid fish shell syntax.

As an example, run ghostty like so: `XDG_CONFIG_HOME=/tmp ghostty
--shell-integration-features=ssh-env --command="/usr/bin/env fish"`.
Setting `XDG_CONFIG_HOME` to `/tmp` is just to start from the default
configs for ghostty and fish.

Before:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)> ssh git@github.com
env: ‘command’: No such file or directory
robbiev@neo ~/s/ghostty (fish-shell-ssh) [127]>
```

After:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)> ssh git@github.com
PTY allocation request failed on channel 0
Hi robbiev! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
robbiev@neo ~/s/ghostty (fish-shell-ssh) [1]>
```

(This fails correctly)

I've also tried with a correctly accessible ssh server but of course you
can't repro that easily if you don't have some place to ssh to.

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)> ssh trinity

[robbiev@trinity:~]$ echo $TERM
xterm-ghostty
```

My understanding of the fix follows.

The script is using `command` to make sure it calls the actual ssh
binary and not some intermediate shell function with the same name (`man
command` explains).

`env` can be useful for fish compat < 3.1, where [the KEY=value syntax
was
introduced](https://fishshell.com/docs/current/faq.html#how-do-i-set-or-clear-an-environment-variable).
However because `command` is a builtin it doesn't work in this case.

So a simple solution is this, requiring fish >= 3.1

```
TERM="$ssh_term" command ssh $ssh_opts $argv
```

An
[alternative](https://serverfault.com/questions/164305/how-can-i-set-environment-variable-for-just-one-command-in-fish-shell)
for maximum fish compat could be the following:

```
begin
  set -lx TERM "$ssh_term"
  command ssh $ssh_opts $argv
end
```

According to `man set`, `-l` means local to the block and `-x` means
export.

I'm in favour of keeping `command` as it makes the integration more
predicable.

The reason I went with the current fix:
- It's easier to understand without knowing fish shell.
- [kat found that fish 3.1 should be widely
available](https://github.com/ghostty-org/ghostty/discussions/8021#discussioncomment-13877129).
2025-08-04 07:27:14 -04:00
Robbie Vanbrabant
42e4a95b64 fix fish shell syntax for ssh-env shell integration
As discussed here https://github.com/ghostty-org/ghostty/discussions/8021

This fixes invalid fish shell syntax.

As an example, run ghostty like so: `XDG_CONFIG_HOME=/tmp ghostty --shell-integration-features=ssh-env --command="/usr/bin/env fish"`. Setting XDG_CONFIG_HOME to /tmp is just to start from the default config.

Before:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)> ssh git@github.com
env: ‘command’: No such file or directory
robbiev@neo ~/s/ghostty (fish-shell-ssh) [127]>
```

After:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)> ssh git@github.com
PTY allocation request failed on channel 0
Hi robbiev! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
robbiev@neo ~/s/ghostty (fish-shell-ssh) [1]>
```

My understanding of the fix follows.

The script is using `command` to make sure it calls the actual ssh binary and not some intermediate shell function with the same name (`man command` explains).

`env` can be useful for fish compat < 3.1, where [the KEY=value syntax was introduced](https://fishshell.com/docs/current/faq.html#how-do-i-set-or-clear-an-environment-variable). However because `command` is a builtin it doesn't work in this case.

So a simple solution is this, requiring fish >= 3.1

```
TERM="$ssh_term" command ssh $ssh_opts $argv
```

An [alternative](https://serverfault.com/questions/164305/how-can-i-set-environment-variable-for-just-one-command-in-fish-shell) for maximum fish compat could be the following:

```
begin
  set -lx TERM "$ssh_term"
  command ssh $ssh_opts $argv
end
```

According to `man set`, `-l` means local to the block and `-x` means export.

I'm in favour of keeping `command` as it makes the integration more predicable.

The reason I went with the current fix:
- It's easier to understand without knowing fish shell.
- [kat found that fish 3.1 should be widely available](https://github.com/ghostty-org/ghostty/discussions/8021#discussioncomment-13877129).
2025-08-04 11:28:39 +01:00
Jeffrey C. Ollie
83063e5527 gtk-ng: prevent split button from becoming focused 2025-08-03 13:38:49 -05:00
trag1c
f0272e5fec Added and updated translations for id_ID (#8126) 2025-08-03 17:36:43 +02:00
Mitchell Hashimoto
4efef78216 bash: upgrade to bash-preexec 0.6.0 (#8135)
https://github.com/rcaloras/bash-preexec/releases/tag/0.6.0

This is a small update for us because we've been using a patched version
of this script in Ghostty for some time, and the 0.6.0 release includes
most of the local changes we made as part of maintaining and improving
our bash shell integration.

- https://github.com/rcaloras/bash-preexec/pull/167
- https://github.com/rcaloras/bash-preexec/pull/170

We continue to maintain one local HISTCONTROL-related modification
(#2478). There are a few upstream conversations related to HISTCONTROL
that might eliminate the need for this local patch, so we may revisit
that in the future.
2025-08-03 06:44:19 -07:00
Jon Parise
f4e434fffd bash: upgrade to bash-preexec 0.6.0
https://github.com/rcaloras/bash-preexec/releases/tag/0.6.0

This is a small update for us because we've been using a patched version
of this script in Ghostty for some time, and the 0.6.0 release includes
most of the local changes we made as part of maintaining and improving
our bash shell integration.

- https://github.com/rcaloras/bash-preexec/pull/167
- https://github.com/rcaloras/bash-preexec/pull/170

We continue to maintain one local HISTCONTROL-related modification
(#2478). There are a few upstream conversations related to HISTCONTROL
that might eliminate the need for this local patch, so we may revisit
that in the future.
2025-08-03 09:15:35 -04:00
trag1c
6b57a23273 i18n: Updated translation for ko_KR (#8058) 2025-08-03 14:04:44 +02:00
Jinhyeok Lee
dbb1096c24 i18n: Update Korean translation metadata 2025-08-03 20:46:28 +09:00
mikailmm
b0ba0a1c8c fixed revision date
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-08-03 12:21:37 +07:00
Mitchell Hashimoto
afdaab9cc6 apprt/gtk-ng: runtime CSS and custom CSS (#8133)
A simple port, nothing creative here.

Found one definite leak in GTK, added a suppression. No leaks in Ghostty
code.
2025-08-02 20:32:59 -07:00
Mitchell Hashimoto
8e8dc76362 Update iTerm2 colorschemes (#8132)
Upstream revision:
b2742b8baf
2025-08-02 20:30:22 -07:00
Mitchell Hashimoto
053e3d307b apprt/gtk-ng: runtime CSS and custom CSS 2025-08-02 20:28:22 -07:00
mitchellh
7a7790a212 deps: Update iTerm2 color schemes 2025-08-03 00:15:54 +00:00
Mitchell Hashimoto
78f474b143 apprt/gtk-ng: toggle_window_decorations (#8128) 2025-08-02 13:38:01 -07:00
Mitchell Hashimoto
5078fc5243 apprt/gtk-ng: toggle_window_decorations 2025-08-02 13:34:14 -07:00
Mitchell Hashimoto
7836cc8f31 apprt/gtk-ng: winproto behaviors (quick terminal, csd/ssd, blur, etc.) (#8123)
This ports over the winproto behaviors to gtk-ng. The core winproto
logic is unchanged except for trivial typing changes. The interaction
with winproto is a bit different in ng due to the class separation of
logic between surfaces and windows, but functionally the same.

Ran against Valgrind and all looks good.
2025-08-02 12:57:01 -07:00
Mitchell Hashimoto
91254bb6cc apprt/gtk-ng: address feedback 2025-08-02 12:53:27 -07:00
mikailmm
bebbeed81d added name and email in contribution list 2025-08-03 00:31:13 +07:00
mikailmm
a41cb2c827 Added last-translator name and email 2025-08-03 00:29:45 +07:00
Mitchell Hashimoto
e1e525ba3d apprt/gtk-ng: winproto callbacks for subprocess env 2025-08-01 21:16:08 -07:00
Mitchell Hashimoto
523799a45f apprt/gtk-ng: winproto resizeEvent 2025-08-01 21:05:42 -07:00
Mitchell Hashimoto
7aa84cd372 apprt/gtk-ng: quick terminal 2025-08-01 20:51:43 -07:00
Mitchell Hashimoto
084a20c865 apprt/gtk-ng: hook up all the syncAppearance calls for winproto 2025-08-01 14:58:25 -07:00
Mitchell Hashimoto
c7eee9ee7a apprt/gtk-ng: initialize window protocol 2025-08-01 14:40:19 -07:00
Mitchell Hashimoto
469001b7f6 apprt/gtk-ng: size_limit apprt action (#8116)
This ports the same behavior from GTK, mostly. This also fixes a bug
where the limits would be enforced on reload. Instead, we should only
enforce them on the first surface ever.
2025-08-01 08:06:40 -07:00
Mitchell Hashimoto
780d4af8bc apprt/gtk-ng: size_limit apprt action
This ports the same behavior from GTK, mostly. This also fixes a bug
where the limits would be enforced on reload. Instead, we should only
enforce them on the first surface ever.
2025-08-01 07:59:19 -07:00
mikailmm
b99831ce36 Update id_ID.UTF-8.po
added and changed the translation following the terminology used by Gnome (and Apple) from help.gnome.org and support.apple.com
2025-08-01 10:25:25 +07:00
Mitchell Hashimoto
1901cbf334 apprt/gtk-ng: initial size apprt action (window-width/height) (#8115)
Simple port. I might add size limits if I get to it, but finished this
and it works so opened it up.
2025-07-31 13:58:34 -07:00
Mitchell Hashimoto
0b9130aba9 apprt/gtk-ng: initial size apprt action (window-width/height) 2025-07-31 13:28:30 -07:00
Leah Amelia Chen
cf9943a3dd gtk(wayland): bind globals correctly (#8110) 2025-07-31 18:28:05 +02:00
Leah Amelia Chen
c2165fc097 gtk(wayland): bind globals correctly
Fixes #7988
2025-07-31 15:51:49 +08:00
Mitchell Hashimoto
d4c825186e apprt/gtk-ng: desktop notifications, open config, open url, present terminal (#8105)
Implements a number of minor apprt actions. More or less directly
ported. Some notes added for future improvements given the new
architecture.
2025-07-30 09:38:48 -07:00
Mitchell Hashimoto
6c952d4168 apprt/gtk-ng: desktop notification 2025-07-30 09:31:54 -07:00
Mitchell Hashimoto
e7ea084cc3 apprt/gtk-ng: present surface 2025-07-30 09:20:15 -07:00
Mitchell Hashimoto
60b859dbf2 apprt/gtk-ng: open config, open url 2025-07-30 09:04:01 -07:00
Mitchell Hashimoto
e7befe2ed1 apprt/gtk-ng: surface has correct initial size (#8104)
Ensure the surface has a correct initial size when created. This avoids
a rapid resize event and also the pty reports the correct size for
startup scripts.

This is a departure from macOS and legacy GTK. This has been an issue in
Ghostty for awhile so this is the proper path forward.

This works by deferring Surface initialization until the first resize
event. This MIGHT result in a frame or two not rendering but I haven't
noticed anything visually and having the correct size is far more
important.
2025-07-30 08:54:51 -07:00
Mitchell Hashimoto
7b1092f991 apprt/gtk-ng: surface has correct initial size
Ensure the surface has a correct initial size when created. This avoids
a rapid resize event and also the pty reports the correct size for
startup scripts.

This is a departure from macOS and legacy GTK. This has been an issue in
Ghostty for awhile so this is the proper path forward.

This works by deferring Surface initialization until the first resize
event. This MIGHT result in a frame or two not rendering but I haven't
noticed anything visually and having the correct size is far more
important.
2025-07-30 08:48:27 -07:00
Mitchell Hashimoto
1e721ae567 apprt/gtk-ng: tabs are back! (#8098)
This brings back all tabbing behaviors.

I ran through create/close tabs and windows with Valgrind and everything
ran clean.

TODO:

- [x] goto tab keybinding
- [x] move tab
- [x] toggle tab overview (binding only, UI works!)
- [x] create window action to pull tab out into a window
2025-07-30 07:13:38 -07:00
Anthony
db2984de6e cli: update var name 2025-07-30 14:29:38 +10:00
Mitchell Hashimoto
fde50e0f1c apprt/gtk-ng: create-window action 2025-07-29 15:07:04 -07:00
Mitchell Hashimoto
0cc8b6d10f apprt/gtk-ng: remove all shortcuts on tab view 2025-07-29 14:57:50 -07:00
Mitchell Hashimoto
2847aeb181 apprt/gtk-ng: toggle tab overview 2025-07-29 14:56:16 -07:00
Mitchell Hashimoto
a5188142ba apprt/gtk-ng: move tab 2025-07-29 14:52:33 -07:00
Mitchell Hashimoto
2d1232878d apprt/gtk-ng: goto_tab 2025-07-29 14:40:45 -07:00
Mitchell Hashimoto
c78d32074e Add Gnome Nightly Icon Set (#8100)
This adds a nightly-variant for the icons. These aren't hooked up to our
build system yet.

<img width="1024" height="1024" alt="Ghostty-Gnome-Nightly-512"
src="https://github.com/user-attachments/assets/66da56a4-110a-4e60-8d6e-93e16bb27b51"
/>
2025-07-29 12:15:54 -07:00
Mitchell Hashimoto
a705b42899 Add Gnome Nightly Icon Set
This adds a nightly-variant for the icons. These aren't hooked up to our
build system yet.
2025-07-29 12:10:42 -07:00
Mitchell Hashimoto
4fb790ca4c apprt/gtk-ng: helper for getAncestor 2025-07-29 10:58:31 -07:00
Mitchell Hashimoto
179fa8e5aa remove bad file 2025-07-29 10:43:20 -07:00