Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jan 30, 2025
1 parent ed53599 commit e09395b
Show file tree
Hide file tree
Showing 12 changed files with 977 additions and 71 deletions.
20 changes: 20 additions & 0 deletions docs/config/keybind/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,26 @@ keybinds will always consume the input regardless of this setting.
Since they are not associated with a specific terminal surface,
they're never encoded.

#### `performabe:`

Only consume the input if the action is able to be performed. For example,
the `copy_to_clipboard` action will only consume the input if there is a
selection to copy. If there is no selection, Ghostty behaves as if the
keybind was not set. This has no effect with `global:` or `all:`-prefixed
keybinds. For key sequences, this will reset the sequence if the action is
not performable (acting identically to not having a keybind set at all).

Performable keybinds will not appear as menu shortcuts in the application
menu. This is because the menu shortcuts force the action to be performed
regardless of the state of the terminal. Performable keybinds will still
work, they just won't appear as a shortcut label in the menu.

Example:

```ini
keybind = performable:ctrl+c=copy_to_clipboard
```

## Action

Action is what happens when the trigger is activated. It is
Expand Down
61 changes: 48 additions & 13 deletions docs/config/keybind/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ enter after to get a new prompt.
## `paste_from_selection`
Copy and paste.

## `copy_url_to_clipboard`
Copy the URL under the cursor to the clipboard. If there is no
URL under the cursor, this does nothing.

## `increase_font_size`
## `decrease_font_size`
Increase/decrease the font size by a certain amount.
Expand All @@ -64,8 +68,15 @@ Select all text on the screen.
Scroll the screen varying amounts.

## `adjust_selection`
Adjust an existing selection in a given direction. This action
does nothing if there is no active selection.
Adjust the current selection in a given direction. Does nothing if no
selection exists.

Arguments:
- left, right, up, down, page_up, page_down, home, end,
beginning_of_line, end_of_line

Example: Extend selection to the right
keybind = shift+right=adjust_selection:right

## `jump_to_prompt`
Jump the viewport forward or back by prompt. Positive number is the
Expand Down Expand Up @@ -121,25 +132,42 @@ Toggle the tab overview.
This only works with libadwaita enabled currently.

## `new_split`
Create a new split in the given direction. The new split will appear in
the direction given. For example `new_split:up`. Valid values are left, right, up, down and auto.
Create a new split in the given direction.

Arguments:
- right, down, left, up, auto (splits along the larger direction)

Example: Create split on the right
keybind = cmd+shift+d=new_split:right

## `goto_split`
Focus on a split in a given direction. For example `goto_split:top`. Valid values are top, bottom, left, right, previous and next.
Focus on a split in a given direction. For example `goto_split:up`.
Valid values are left, right, up, down, previous and next.

## `toggle_split_zoom`
zoom/unzoom the current split.

## `resize_split`
Resize the current split by moving the split divider in the given
direction. For example `resize_split:left,10`. The valid directions are up, down, left and right.
Resize the current split in a given direction.

Arguments:
- up, down, left, right
- the number of pixels to resize the split by

Example: Move divider up 10 pixels
keybind = cmd+shift+up=resize_split:up,10

## `equalize_splits`
Equalize all splits in the current window

## `inspector`
Show, hide, or toggle the terminal inspector for the currently focused
terminal.
Control the terminal inspector visibility.

Arguments:
- toggle, show, hide

Example: Toggle inspector visibility
keybind = cmd+i=inspector:toggle

## `open_config`
Open the configuration file in the default OS editor. If your default OS
Expand All @@ -157,6 +185,10 @@ Close the current "surface", whether that is a window, tab, split, etc.
This only closes ONE surface. This will trigger close confirmation as
configured.

## `close_tab`
Close the current tab, regardless of how many splits there may be.
This will trigger close confirmation as configured.

## `close_window`
Close the window, regardless of how many tabs or splits there may be.
This will trigger close confirmation as configured.
Expand All @@ -165,6 +197,9 @@ This will trigger close confirmation as configured.
Close all windows. This will trigger close confirmation as configured.
This only works for macOS currently.

## `toggle_maximize`
Toggle maximized window state. This only works on Linux.

## `toggle_fullscreen`
Toggle fullscreen mode of window.

Expand All @@ -191,7 +226,7 @@ When the quick terminal loses focus, it disappears. The terminal state
is preserved between appearances, so you can always press the keybinding
to bring it back up.

To enable the quick terminally globally so that Ghostty doesn't
To enable the quick terminal globally so that Ghostty doesn't
have to be focused, prefix your keybind with `global`. Example:

```ini
Expand All @@ -216,10 +251,10 @@ This currently only works on macOS.

## `toggle_visibility`
Show/hide all windows. If all windows become shown, we also ensure
Ghostty is focused.
Ghostty becomes focused. When hiding all windows, focus is yielded
to the next application as determined by the OS.

This currently only works on macOS. When hiding all windows, we do
not yield focus to the previous application.
This currently only works on macOS.

## `quit`
Quit ghostty.
Expand Down
Loading

0 comments on commit e09395b

Please sign in to comment.