Skip to content

Commit 6430269

Browse files
Merge pull request #272 from akx/sync-webdata
Sync some documentation updates from app repo
2 parents 2d703fd + 595bf6b commit 6430269

File tree

3 files changed

+34
-15
lines changed

3 files changed

+34
-15
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ node_modules/.installed: package.json
1010
.env.local:
1111
cp .env.sample .env.local
1212

13+
.PHONY: sync-webdata
14+
sync-webdata:
15+
test -d "$(GHOSTTY_BUILD_DIR)" # if this fails, set GHOSTTY_BUILD_DIR to the ghostty output directory
16+
cp $(GHOSTTY_BUILD_DIR)/share/ghostty/webdata/config.mdx ./docs/config/reference.mdx
17+
cp $(GHOSTTY_BUILD_DIR)/share/ghostty/webdata/actions.mdx ./docs/config/keybind/reference.mdx
18+
1319
# ====================================
1420
# ======= Docker Configuration =======
1521
# ====================================

docs/config/keybind/reference.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ assertion to verify this.
1818

1919
## `csi`
2020
Send a CSI sequence. The value should be the CSI sequence without the
21-
CSI header (`ESC ]` or `\x1b]`).
21+
CSI header (`ESC [` or `\x1b[`).
2222

2323
## `esc`
2424
## `text`
@@ -113,7 +113,7 @@ is higher than the number of tabs, this will go to the last tab.
113113

114114
## `move_tab`
115115
Moves a tab by a relative offset.
116-
Adjusts the tab position based on `offset` (e.g., -1 for left, +1 for right).
116+
Adjusts the tab position based on `offset`. For example `move_tab:-1` for left, `move_tab:1` for right.
117117
If the new position is out of bounds, it wraps around cyclically within the tab range.
118118

119119
## `toggle_tab_overview`

docs/config/reference.mdx

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -408,17 +408,20 @@ be fixed in a future update:
408408
## `background`
409409

410410
Background color for the window.
411+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
411412

412413
## `foreground`
413414

414415
Foreground color for the window.
416+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
415417

416418
## `selection-foreground`
417419
## `selection-background`
418420

419421
The foreground and background color for selection. If this is not set, then
420422
the selection color is just the inverted window background and foreground
421423
(note: not to be confused with the cell bg/fg).
424+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
422425

423426
## `selection-invert-fg-bg`
424427

@@ -446,16 +449,21 @@ This value does not apply to Emoji or images.
446449
## `palette`
447450

448451
Color palette for the 256 color form that many terminal applications use.
449-
The syntax of this configuration is `N=HEXCODE` where `N` is 0 to 255 (for
450-
the 256 colors in the terminal color table) and `HEXCODE` is a typical RGB
451-
color code such as `#AABBCC`.
452+
The syntax of this configuration is `N=COLOR` where `N` is 0 to 255 (for
453+
the 256 colors in the terminal color table) and `COLOR` is a typical RGB
454+
color code such as `#AABBCC` or `AABBCC`, or a named X11 color.
452455

453-
For definitions on all the codes [see this cheat
454-
sheet](https://www.ditig.com/256-colors-cheat-sheet).
456+
The palette index can be in decimal, binary, octal, or hexadecimal.
457+
Decimal is assumed unless a prefix is used: `0b` for binary, `0o` for octal,
458+
and `0x` for hexadecimal.
459+
460+
For definitions on the color indices and what they canonically map to,
461+
[see this cheat sheet](https://www.ditig.com/256-colors-cheat-sheet).
455462

456463
## `cursor-color`
457464

458465
The color of the cursor. If this is not set, a default will be chosen.
466+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
459467

460468
## `cursor-invert-fg-bg`
461469

@@ -514,6 +522,7 @@ Valid values are:
514522

515523
The color of the text under the cursor. If this is not set, a default will
516524
be chosen.
525+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
517526

518527
## `cursor-click-to-move`
519528

@@ -573,7 +582,7 @@ Multiplier for scrolling distance with the mouse wheel. Any value less
573582
than 0.01 or greater than 10,000 will be clamped to the nearest valid
574583
value.
575584

576-
A value of "1" (default) scrolls te default amount. A value of "2" scrolls
585+
A value of "1" (default) scrolls the default amount. A value of "2" scrolls
577586
double the default amount. A value of "0.5" scrolls half the default amount.
578587
Et cetera.
579588

@@ -616,6 +625,8 @@ that rectangle and can be used to carefully control the dimming effect.
616625

617626
This will default to the background color.
618627

628+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
629+
619630
## `command`
620631

621632
The command to run, usually a shell. If this is not an absolute path, it'll
@@ -762,7 +773,7 @@ default value of the running program.
762773
This configuration can be reloaded at runtime. If it is set, the title
763774
will update for all windows. If it is unset, the next title change escape
764775
sequence will be honored but previous changes will not retroactively
765-
be set. This latter case may require you restart programs such as neovim
776+
be set. This latter case may require you to restart programs such as Neovim
766777
to get the new title.
767778

768779
## `class`
@@ -1217,12 +1228,16 @@ Background color for the window titlebar. This only takes effect if
12171228
window-theme is set to ghostty. Currently only supported in the GTK app
12181229
runtime.
12191230

1231+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
1232+
12201233
## `window-titlebar-foreground`
12211234

12221235
Foreground color for the window titlebar. This only takes effect if
12231236
window-theme is set to ghostty. Currently only supported in the GTK app
12241237
runtime.
12251238

1239+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
1240+
12261241
## `resize-overlay`
12271242

12281243
This controls when resize overlays are shown. Resize overlays are a
@@ -1879,24 +1894,22 @@ This only has an effect when `macos-icon` is set to `custom-style`.
18791894

18801895
The color of the ghost in the macOS app icon.
18811896

1882-
The format of the color is the same as the `background` configuration;
1883-
see that for more information.
1884-
18851897
<Note>
18861898
This configuration is required when `macos-icon` is set to
18871899
`custom-style`.
18881900
</Note>
18891901

18901902
This only has an effect when `macos-icon` is set to `custom-style`.
18911903

1904+
Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color.
1905+
18921906
## `macos-icon-screen-color`
18931907

18941908
The color of the screen in the macOS app icon.
18951909

18961910
The screen is a gradient so you can specify multiple colors that
1897-
make up the gradient. Colors should be separated by commas. The
1898-
format of the color is the same as the `background` configuration;
1899-
see that for more information.
1911+
make up the gradient. Comma-separated colors may be specified as
1912+
as either hex (`#RRGGBB` or `RRGGBB`) or as named X11 colors.
19001913

19011914
<Note>
19021915
This configuration is required when `macos-icon` is set to

0 commit comments

Comments
 (0)