Commit Graph

43 Commits

Author SHA1 Message Date
Mitchell Hashimoto
6105344c31 macos: add change tab title to right click menu 2025-12-11 16:30:06 -08:00
Mitchell Hashimoto
32033c9e1a core: prompt_tab_title binding and apprt action 2025-12-11 16:03:19 -08:00
Mitchell Hashimoto
3352d5f081 Fix up close right description 2025-12-10 20:57:36 -08:00
Mitchell Hashimoto
cca10f3ca8 Revert GTK UI changes, apple-sdk build stuff 2025-12-10 20:20:37 -08:00
George Papadakis
625d7274bf Add close tabs on the right action 2025-12-10 20:14:27 -08:00
Mitchell Hashimoto
dbfc3eb679 Remove unused imports 2025-11-27 13:37:53 -08:00
Mitchell Hashimoto
4ff0e0c9d2 input: remove the unused end search entry in the palette 2025-11-27 07:21:59 -08:00
Mitchell Hashimoto
c51170da9c add end_search binding 2025-11-26 08:50:06 -08:00
Mitchell Hashimoto
b7e70ce534 apprt: end_search 2025-11-26 08:50:04 -08:00
Mitchell Hashimoto
aeaa8d4ead add start_search binding and apprt action 2025-11-26 08:50:03 -08:00
Mitchell Hashimoto
ba7b816af0 core: bindings for navigate_search 2025-11-25 11:05:38 -08:00
Mitchell Hashimoto
e49f4a6dbc search binding action starts a search thread on surface 2025-11-24 19:55:27 -08:00
Qwerasd
6d5b4a3426 perf: replace std.debug.assert with inlined version
See doc comment in `quirks.zig` for reasoning
2025-11-17 12:13:56 -07:00
Mitchell Hashimoto
901708e8da input: write_*_file actions take an optional format
Fixes #9398
2025-10-31 09:49:59 -07:00
Mitchell Hashimoto
24b9778432 input: add more copy formatted options to the command palette 2025-10-31 08:21:16 -07:00
Mitchell Hashimoto
df037d75a6 copy_to_clipboard format types 2025-10-30 13:40:32 -07:00
Mitchell Hashimoto
fb5b8d7968 input: command palette actions must use formatter, not tag (#9325)
Regression from our Zig 0.15 migration.
2025-10-23 12:49:55 -07:00
Matthew Hrehirchuk
2696d50ca4 feat: added mouse-reporting / toggle-mouse-reporting (#9282)
Closes #8430

A few questions:
* Should I set a default keybind for `toggle-mouse-reporting`? The issue
mentioned one, it's currently unset.
* Am I handling the `toggle-mouse-reporting` action properly in
`performAction` (gtk) / `action` (macos)?

Copilot was used to understand the codebase, but code was authored
manually.
2025-10-19 20:45:37 -07:00
Mitchell Hashimoto
c86266cd90 input: scroll_to_row action 2025-10-16 09:11:03 -07:00
Mitchell Hashimoto
cb295b84a0 Zig 0.15: zig build test 2025-10-03 07:10:43 -07:00
Jeffrey C. Ollie
5265414a36 config: smarter parsing in autoParseStruct
Fixes #8849

Previously, the `parseAutoStruct` function that was used to parse
generic structs for the config simply split the input value on commas
without taking into account quoting or escapes. This led to problems
because it was impossible to include a comma in the value of config
entries that were parsed by `parseAutoStruct`. This is particularly
problematic because `ghostty +show-config --default` would produce
output like the following:

```
command-palette-entry = title:Focus Split: Next,description:Focus the next split, if any.,action:goto_split:next
```

Because the `description` contains a comma, Ghostty is unable to
parse this correctly. The value would be split into four parts:

```
title:Focus Split: Next
description:Focus the next split
 if any.
action:goto_split:next
```

Instead of three parts:

```
title:Focus Split: Next
description:Focus the next split, if any.
action:goto_split:next
```

Because `parseAutoStruct` simply looked for commas to split on, no
amount of quoting or escaping would allow that to be parsed correctly.

This is fixed by (1) introducing a parser that will split the input
to `parseAutoStruct` into fields while taking into account quotes and
escaping. And (2) changing the `ghostty +show-config` output to put the
values in `command-palette-entry` into quotes so that Ghostty can parse
it's own output.

`parseAutoStruct` will also now parse double quoted values as a Zig
string literal. This makes it easier to embed control codes, whitespace,
and commas in values.
2025-09-23 20:44:49 -05:00
Jeffrey C. Ollie
6f630a27be gtk-ng: implement close_tab:other keybind 2025-08-26 12:22:45 -05:00
Jeffrey C. Ollie
52a25e9c69 parameterize close_tab
- Add mode (`this`/`other`) parameter to `close_tab` keybind/apprt action.
- Keybinds will default to `this` if not specified, eliminating backward
  compatibility issues (`keybind=x=close_tab` === `keybind=x=close_tab:this`).
- Remove `close_other_tabs` keybind and apprt action.
2025-08-25 11:00:26 -05:00
jamylak
c26323d697 Close other tabs feature on Mac.
Supporting command line, file menu and keybindings.
Default mac shortcut of `super + alt + o` (other)

Not able to test on Linux so excluding `close_other_tabs` from `gtk` for now
make a default short cut for close other tabs
2025-08-24 07:55:08 -07:00
Leah Amelia Chen
23048dbd33 gtk-ng: add show_on_screen_keyboard binding 2025-08-14 04:06:02 +08:00
Jeffrey C. Ollie
a23b5328a5 keybind: rename copy_title to copy_title_to_clipboard
Co-authored-by: Jon Parise <jon@indelible.org>
2025-07-06 13:12:00 -05:00
Jeffrey C. Ollie
3cf56b8af3 keybind: add copy_title action
Fixes #7829

This will copy the terminal title to the clipboard. If the terminal
title is not set it has no effect.
2025-07-06 12:12:27 -05:00
Jeffrey C. Ollie
eb5694794c keybind: add set_font_size
Fixes #7795

This allows the font size to be set to an absolute value.
2025-07-06 06:42:14 -07:00
Troels Thomsen
ef06e3d02c Introduce action for copying into clipboard 2025-06-29 09:32:48 +02:00
Leah Amelia Chen
dbe6035da0 config: add command-palette-entry config option 2025-06-25 16:18:20 -04:00
Mitchell Hashimoto
b044f4864a add undo/redo keybindings, default them on macOS 2025-06-07 12:46:14 -07:00
Mitchell Hashimoto
c40ac6b785 input: add focus split directional commands to command palette 2025-06-05 07:11:18 -07:00
Leah Amelia Chen
2c8d6ba944 core: document keybind actions better
The current documentation for actions are very sparse and would leave
someone (even including contributors) as to what exactly they do.
On top of that there are many stylistic and grammatical problems that are
simply no longer in line with our current standards, and certainly not
on par with our configuration options reference.

Hence, I've taken it upon myself to add, clarify, supplement, edit and
even rewrite the documentation for most of these actions, in a wider
effort of trying to offer better, clearer documentation for our users.
2025-06-04 17:04:52 +02:00
Jeffrey C. Ollie
d3cb6d0d41 GTK: add action to show the GTK inspector
The default keybinds for showing the GTK inspector (`ctrl+shift+i` and
`ctrl+shift+d`) don't work reliably in Ghostty due to the way Ghostty
handles input. You can show the GTK inspector by setting the environment
variable `GTK_DEBUG` to `interactive` before starting Ghostty but that's
not always convenient.

This adds a keybind action that will show the GTK inspector. Due to
API limitations toggling the GTK inspector using the keybind action is
impractical because GTK does not provide a convenient API to determine
if the GTK inspector is already showing. Thus we limit ourselves to
strictly showing the GTK inspector. To close the GTK inspector the user
must click the close button on the GTK inspector window. If the GTK
inspector window is already visible but is hidden, calling the keybind
action will not bring the GTK inspector window to the front.
2025-05-29 16:07:57 -05:00
Aaron Ruan
7ccc181332 macos: add "Check for Updates" action, menu item & key-binding support 2025-05-15 13:34:44 +08:00
fn ⌃ ⌥
071531c5c5 Add "Scroll to Selection" command 2025-05-06 16:26:22 -07:00
Mitchell Hashimoto
6e11d947e7 Binding for toggling window float on top (macOS only)
This adds a keybinding and apprt action for #7237.
2025-05-01 09:47:17 -07:00
Mitchell Hashimoto
3e5fe5de9a move command filtering into apprt 2025-04-22 08:33:32 -07:00
Mitchell Hashimoto
28404e946b order commands alphabetically and preserve capitalization 2025-04-21 17:13:12 -07:00
Mitchell Hashimoto
a732bb272d fix CI 2025-04-21 10:54:23 -07:00
Mitchell Hashimoto
6dad763e69 input: omit commands that are platform-specific 2025-04-21 10:20:32 -07:00
Mitchell Hashimoto
6d2685b5a2 add toggle command palette binding 2025-04-21 10:05:30 -07:00
Mitchell Hashimoto
a34134e643 input: defind Command struct and default commands 2025-04-21 08:32:05 -07:00