├── .editorconfig
├── .env.sample
├── .envrc
├── .eslintrc.json
├── .github
├── ISSUE_TEMPLATE
│ ├── 1-bug-report.yml
│ └── config.yml
└── workflows
│ ├── test.yml
│ └── warn-autogenerated-files.yaml
├── .gitignore
├── .prettierrc
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── bin
└── video-to-terminal
│ ├── README.md
│ ├── video-to-terminal.sh
│ └── video.mp4
├── docker-compose.yaml
├── docs
├── about.mdx
├── config
│ ├── index.mdx
│ ├── keybind
│ │ ├── index.mdx
│ │ ├── reference.mdx
│ │ └── sequence.mdx
│ └── reference.mdx
├── features
│ ├── index.mdx
│ ├── shell-integration.mdx
│ └── theme.mdx
├── help
│ ├── gtk-single-instance.mdx
│ ├── index.mdx
│ ├── macos-login-shells.mdx
│ ├── macos-tiling-wms.mdx
│ └── terminfo.mdx
├── index.mdx
├── install
│ ├── binary.mdx
│ ├── build.mdx
│ ├── package.mdx
│ ├── pre.mdx
│ └── release-notes
│ │ ├── 1-0-1.mdx
│ │ ├── 1-1-0.mdx
│ │ ├── 1-1-1.mdx
│ │ ├── 1-1-2.mdx
│ │ ├── 1-1-3.mdx
│ │ └── index.mdx
├── nav.json
└── vt
│ ├── concepts
│ ├── cursor.mdx
│ ├── screen.mdx
│ └── sequences.mdx
│ ├── control
│ ├── bel.mdx
│ ├── bs.mdx
│ ├── cr.mdx
│ ├── lf.mdx
│ └── tab.mdx
│ ├── csi
│ ├── cbt.mdx
│ ├── cht.mdx
│ ├── cnl.mdx
│ ├── cpl.mdx
│ ├── cub.mdx
│ ├── cud.mdx
│ ├── cuf.mdx
│ ├── cup.mdx
│ ├── cuu.mdx
│ ├── dch.mdx
│ ├── decscusr.mdx
│ ├── decslrm.mdx
│ ├── decstbm.mdx
│ ├── dl.mdx
│ ├── dsr.mdx
│ ├── ech.mdx
│ ├── ed.mdx
│ ├── el.mdx
│ ├── hpa.mdx
│ ├── hpr.mdx
│ ├── ich.mdx
│ ├── il.mdx
│ ├── rep.mdx
│ ├── sd.mdx
│ ├── su.mdx
│ ├── tbc.mdx
│ ├── vpa.mdx
│ ├── vpr.mdx
│ └── xtshiftescape.mdx
│ ├── esc
│ ├── decaln.mdx
│ ├── deckpam.mdx
│ ├── deckpnm.mdx
│ ├── decrc.mdx
│ ├── decsc.mdx
│ ├── ind.mdx
│ ├── ri.mdx
│ └── ris.mdx
│ ├── index.mdx
│ └── reference.mdx
├── flake.lock
├── flake.nix
├── next.config.mjs
├── nix
└── devShell.nix
├── package-lock.json
├── package.json
├── postcss.config.json
├── public
├── favicon-128.png
├── favicon-16.png
├── favicon-256.png
├── favicon-32.png
├── favicon.ico
├── ghostty-404.png
├── ghostty-logo.svg
├── images
│ └── 1-1-0
│ │ ├── csd.png
│ │ ├── linear-corrected_blending.png
│ │ ├── linear_blending.png
│ │ ├── p3_blending.png
│ │ ├── srgb_blending.png
│ │ └── ssd.png
├── next.svg
├── social-share-card.jpg
└── vercel.svg
├── src
├── components
│ ├── animated-terminal
│ │ └── index.tsx
│ ├── blockquote
│ │ ├── Blockquote.module.css
│ │ └── index.tsx
│ ├── breadcrumbs
│ │ ├── Breadcrumbs.module.css
│ │ └── index.tsx
│ ├── button-links
│ │ ├── ButtonLinks.module.css
│ │ └── index.tsx
│ ├── button
│ │ ├── Button.module.css
│ │ └── index.tsx
│ ├── callout
│ │ ├── Callout.module.css
│ │ └── index.tsx
│ ├── card-links
│ │ ├── CardLinks.module.css
│ │ └── index.tsx
│ ├── codeblock
│ │ ├── CodeBlock.module.css
│ │ └── index.tsx
│ ├── custom-mdx
│ │ ├── CustomMDX.module.css
│ │ └── index.tsx
│ ├── footer
│ │ ├── Footer.module.css
│ │ └── index.tsx
│ ├── generic-404
│ │ ├── Generic404.module.css
│ │ └── index.tsx
│ ├── generic-card
│ │ ├── GenericCard.module.css
│ │ └── index.tsx
│ ├── grid-container
│ │ ├── GridContainer.module.css
│ │ └── index.tsx
│ ├── info-cards-section
│ │ ├── InfoCards.module.css
│ │ └── index.tsx
│ ├── jumplink-header
│ │ ├── JumplinkHeader.module.css
│ │ └── index.tsx
│ ├── link
│ │ ├── Link.module.css
│ │ └── index.tsx
│ ├── nav-tree
│ │ ├── NavTree.module.css
│ │ └── index.tsx
│ ├── navbar
│ │ ├── Navbar.module.css
│ │ ├── ghostty-wordmark.svg
│ │ └── index.tsx
│ ├── scroll-to-top
│ │ ├── ScrollToTop.module.css
│ │ └── index.tsx
│ ├── section-wrapper
│ │ ├── SectionWrapper.module.css
│ │ └── index.tsx
│ ├── sidecar
│ │ ├── Sidecar.module.css
│ │ └── index.tsx
│ ├── tabbed-terminals-section
│ │ ├── TabbedTerminalsSection.module.css
│ │ └── index.tsx
│ ├── tag-list
│ │ ├── TagList.module.css
│ │ └── index.tsx
│ ├── terminal-cards-section
│ │ ├── TerminalCardsSection.module.css
│ │ └── index.tsx
│ ├── terminal
│ │ ├── Terminal.module.css
│ │ └── index.tsx
│ ├── text
│ │ ├── Text.module.css
│ │ ├── font
│ │ │ └── pretendard-std-variable.woff2
│ │ └── index.tsx
│ └── vt-sequence
│ │ ├── VTSequence.module.css
│ │ └── index.tsx
├── layouts
│ ├── nav-footer-layout
│ │ └── index.tsx
│ └── root-layout
│ │ ├── RootLayout.module.css
│ │ └── index.tsx
├── lib
│ ├── fetch-docs.ts
│ ├── fetch-latest-ghostty-version.ts
│ ├── fetch-nav.ts
│ ├── fetch-terminal-content.ts
│ ├── nav-tree-to-breadcrumbs.ts
│ └── use-store.ts
├── pages
│ ├── 404.tsx
│ ├── 404Page.module.css
│ ├── Home.module.css
│ ├── _app.tsx
│ ├── _document.tsx
│ ├── docs
│ │ ├── [...path]
│ │ │ ├── DocsPage.module.css
│ │ │ └── index.tsx
│ │ └── index.tsx
│ ├── download
│ │ ├── DownloadPage.module.css
│ │ └── index.tsx
│ └── index.tsx
├── styles
│ └── globals.css
└── types
│ └── style.ts
├── terminals
└── home
│ └── animation_frames
│ ├── frame_001.txt
│ ├── frame_002.txt
│ ├── frame_003.txt
│ ├── frame_004.txt
│ ├── frame_005.txt
│ ├── frame_006.txt
│ ├── frame_007.txt
│ ├── frame_008.txt
│ ├── frame_009.txt
│ ├── frame_010.txt
│ ├── frame_011.txt
│ ├── frame_012.txt
│ ├── frame_013.txt
│ ├── frame_014.txt
│ ├── frame_015.txt
│ ├── frame_016.txt
│ ├── frame_017.txt
│ ├── frame_018.txt
│ ├── frame_019.txt
│ ├── frame_020.txt
│ ├── frame_021.txt
│ ├── frame_022.txt
│ ├── frame_023.txt
│ ├── frame_024.txt
│ ├── frame_025.txt
│ ├── frame_026.txt
│ ├── frame_027.txt
│ ├── frame_028.txt
│ ├── frame_029.txt
│ ├── frame_030.txt
│ ├── frame_031.txt
│ ├── frame_032.txt
│ ├── frame_033.txt
│ ├── frame_034.txt
│ ├── frame_035.txt
│ ├── frame_036.txt
│ ├── frame_037.txt
│ ├── frame_038.txt
│ ├── frame_039.txt
│ ├── frame_040.txt
│ ├── frame_041.txt
│ ├── frame_042.txt
│ ├── frame_043.txt
│ ├── frame_044.txt
│ ├── frame_045.txt
│ ├── frame_046.txt
│ ├── frame_047.txt
│ ├── frame_048.txt
│ ├── frame_049.txt
│ ├── frame_050.txt
│ ├── frame_051.txt
│ ├── frame_052.txt
│ ├── frame_053.txt
│ ├── frame_054.txt
│ ├── frame_055.txt
│ ├── frame_056.txt
│ ├── frame_057.txt
│ ├── frame_058.txt
│ ├── frame_059.txt
│ ├── frame_060.txt
│ ├── frame_061.txt
│ ├── frame_062.txt
│ ├── frame_063.txt
│ ├── frame_064.txt
│ ├── frame_065.txt
│ ├── frame_066.txt
│ ├── frame_067.txt
│ ├── frame_068.txt
│ ├── frame_069.txt
│ ├── frame_070.txt
│ ├── frame_071.txt
│ ├── frame_072.txt
│ ├── frame_073.txt
│ ├── frame_074.txt
│ ├── frame_075.txt
│ ├── frame_076.txt
│ ├── frame_077.txt
│ ├── frame_078.txt
│ ├── frame_079.txt
│ ├── frame_080.txt
│ ├── frame_081.txt
│ ├── frame_082.txt
│ ├── frame_083.txt
│ ├── frame_084.txt
│ ├── frame_085.txt
│ ├── frame_086.txt
│ ├── frame_087.txt
│ ├── frame_088.txt
│ ├── frame_089.txt
│ ├── frame_090.txt
│ ├── frame_091.txt
│ ├── frame_092.txt
│ ├── frame_093.txt
│ ├── frame_094.txt
│ ├── frame_095.txt
│ ├── frame_096.txt
│ ├── frame_097.txt
│ ├── frame_098.txt
│ ├── frame_099.txt
│ ├── frame_100.txt
│ ├── frame_101.txt
│ ├── frame_102.txt
│ ├── frame_103.txt
│ ├── frame_104.txt
│ ├── frame_105.txt
│ ├── frame_106.txt
│ ├── frame_107.txt
│ ├── frame_108.txt
│ ├── frame_109.txt
│ ├── frame_110.txt
│ ├── frame_111.txt
│ ├── frame_112.txt
│ ├── frame_113.txt
│ ├── frame_114.txt
│ ├── frame_115.txt
│ ├── frame_116.txt
│ ├── frame_117.txt
│ ├── frame_118.txt
│ ├── frame_119.txt
│ ├── frame_120.txt
│ ├── frame_121.txt
│ ├── frame_122.txt
│ ├── frame_123.txt
│ ├── frame_124.txt
│ ├── frame_125.txt
│ ├── frame_126.txt
│ ├── frame_127.txt
│ ├── frame_128.txt
│ ├── frame_129.txt
│ ├── frame_130.txt
│ ├── frame_131.txt
│ ├── frame_132.txt
│ ├── frame_133.txt
│ ├── frame_134.txt
│ ├── frame_135.txt
│ ├── frame_136.txt
│ ├── frame_137.txt
│ ├── frame_138.txt
│ ├── frame_139.txt
│ ├── frame_140.txt
│ ├── frame_141.txt
│ ├── frame_142.txt
│ ├── frame_143.txt
│ ├── frame_144.txt
│ ├── frame_145.txt
│ ├── frame_146.txt
│ ├── frame_147.txt
│ ├── frame_148.txt
│ ├── frame_149.txt
│ ├── frame_150.txt
│ ├── frame_151.txt
│ ├── frame_152.txt
│ ├── frame_153.txt
│ ├── frame_154.txt
│ ├── frame_155.txt
│ ├── frame_156.txt
│ ├── frame_157.txt
│ ├── frame_158.txt
│ ├── frame_159.txt
│ ├── frame_160.txt
│ ├── frame_161.txt
│ ├── frame_162.txt
│ ├── frame_163.txt
│ ├── frame_164.txt
│ ├── frame_165.txt
│ ├── frame_166.txt
│ ├── frame_167.txt
│ ├── frame_168.txt
│ ├── frame_169.txt
│ ├── frame_170.txt
│ ├── frame_171.txt
│ ├── frame_172.txt
│ ├── frame_173.txt
│ ├── frame_174.txt
│ ├── frame_175.txt
│ ├── frame_176.txt
│ ├── frame_177.txt
│ ├── frame_178.txt
│ ├── frame_179.txt
│ ├── frame_180.txt
│ ├── frame_181.txt
│ ├── frame_182.txt
│ ├── frame_183.txt
│ ├── frame_184.txt
│ ├── frame_185.txt
│ ├── frame_186.txt
│ ├── frame_187.txt
│ ├── frame_188.txt
│ ├── frame_189.txt
│ ├── frame_190.txt
│ ├── frame_191.txt
│ ├── frame_192.txt
│ ├── frame_193.txt
│ ├── frame_194.txt
│ ├── frame_195.txt
│ ├── frame_196.txt
│ ├── frame_197.txt
│ ├── frame_198.txt
│ ├── frame_199.txt
│ ├── frame_200.txt
│ ├── frame_201.txt
│ ├── frame_202.txt
│ ├── frame_203.txt
│ ├── frame_204.txt
│ ├── frame_205.txt
│ ├── frame_206.txt
│ ├── frame_207.txt
│ ├── frame_208.txt
│ ├── frame_209.txt
│ ├── frame_210.txt
│ ├── frame_211.txt
│ ├── frame_212.txt
│ ├── frame_213.txt
│ ├── frame_214.txt
│ ├── frame_215.txt
│ ├── frame_216.txt
│ ├── frame_217.txt
│ ├── frame_218.txt
│ ├── frame_219.txt
│ ├── frame_220.txt
│ ├── frame_221.txt
│ ├── frame_222.txt
│ ├── frame_223.txt
│ ├── frame_224.txt
│ ├── frame_225.txt
│ ├── frame_226.txt
│ ├── frame_227.txt
│ ├── frame_228.txt
│ ├── frame_229.txt
│ ├── frame_230.txt
│ ├── frame_231.txt
│ ├── frame_232.txt
│ ├── frame_233.txt
│ ├── frame_234.txt
│ └── frame_235.txt
└── tsconfig.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | indent_style = space
3 | indent_size = 2
4 |
5 | [Makefile]
6 | indent_style = tab
7 |
--------------------------------------------------------------------------------
/.env.sample:
--------------------------------------------------------------------------------
1 | # PORT needs to be exported for NextJS
2 | export PORT=3000
3 |
--------------------------------------------------------------------------------
/.envrc:
--------------------------------------------------------------------------------
1 | # If we are a computer with nix-shell available, then use that to setup
2 | # the build environment with exactly what we need.
3 | if has nix; then
4 | watch_file nix/{devShell}.nix
5 | use flake
6 | fi
7 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/1-bug-report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | title: "[ BUG ] "
3 | description: Bug Report for ghostty.org
4 |
5 | labels: ["bug"]
6 |
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: >-
11 | > [!IMPORTANT]
12 |
13 | > **This is not the place to report bugs for Ghostty, the terminal emulator**. This form should be used to report a bug in [ghostty.org](https://ghostty.org). To create a bug report for the terminal, [follow the contribution guidelines](https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md).
14 | - type: dropdown
15 | id: dropdown-0
16 | attributes:
17 | label: Browser on which this bug occurs
18 | options:
19 | - Google Chrome
20 | - Microsoft Edge
21 | - Safari
22 | - Mozilla Firefox
23 | - Opera
24 | - Brave
25 | - Other (Specify Below)
26 | default: 0
27 | - type: textarea
28 | id: textarea-1
29 | attributes:
30 | value: Put the behavior you expected from the site here.
31 | label: Expected Behavior
32 | - type: textarea
33 | id: textarea-2
34 | attributes:
35 | value: Put the behavior you actually got from the site here.
36 | label: Actual Behavior
37 | - type: textarea
38 | id: textarea-3
39 | attributes:
40 | value: Put any extra information you can include here.
41 | label: Extra Details
42 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 | contact_links:
3 | - name: Terminal Issues
4 | url: https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md
5 | about: "If you're looking to file an issue about the terminal, click here!"
6 | - name: Ghostty Website
7 | url: https://ghostty.org
8 | about: "Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration."
9 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push: {}
3 | pull_request: {}
4 | workflow_dispatch: {}
5 |
6 | name: Test
7 |
8 | jobs:
9 | alejandra:
10 | runs-on: namespace-profile-ghostty-sm
11 | timeout-minutes: 60
12 | steps:
13 | - uses: actions/checkout@v4 # Check out repo so we can lint it
14 | - name: Setup Cache
15 | uses: namespacelabs/nscloud-cache-action@v1.2.0
16 | with:
17 | path: |
18 | /nix
19 | - uses: cachix/install-nix-action@v30
20 | with:
21 | nix_path: nixpkgs=channel:nixos-unstable
22 | - name: alejandra check
23 | run: nix develop -c alejandra --check .
24 |
25 | prettier:
26 | runs-on: namespace-profile-ghostty-sm
27 | timeout-minutes: 60
28 | steps:
29 | - uses: actions/checkout@v4 # Check out repo so we can lint it
30 | - name: Setup Cache
31 | uses: namespacelabs/nscloud-cache-action@v1.2.0
32 | with:
33 | path: |
34 | /nix
35 | - uses: cachix/install-nix-action@v30
36 | with:
37 | nix_path: nixpkgs=channel:nixos-unstable
38 | - name: npm install
39 | run: nix develop -c npm install
40 | - name: prettier check
41 | run: nix develop -c npm exec -- prettier --check 'src/**/*.ts'
42 |
--------------------------------------------------------------------------------
/.github/workflows/warn-autogenerated-files.yaml:
--------------------------------------------------------------------------------
1 | on:
2 | pull_request_target:
3 | types:
4 | - opened
5 | branches:
6 | - main
7 | paths:
8 | - docs/config/reference.mdx
9 | - docs/config/keybind/reference.mdx
10 |
11 | name: Autogenerated files check
12 |
13 | jobs:
14 | warn-autogenerated:
15 | runs-on: namespace-profile-ghostty-sm
16 | timeout-minutes: 5
17 | permissions:
18 | pull-requests: write
19 | steps:
20 | - name: Comment on PR
21 | run: |
22 | gh pr comment "$PR_URL" -b \
23 | "Note: This PR contains modifications to auto-generated sections of the documentation.\
24 | These are generated from comments in ghostty's source code. Please submit changes to \
25 | the upstream repository at https://github.com/ghostty-org/ghostty by modifying the appropriate\
26 | source files"
27 | env:
28 | PR_URL: ${{ github.event.pull_request.html_url }}
29 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # .env files
29 | .env*
30 | !.envrc
31 | !.env.sample
32 | .direnv
33 |
34 | # vercel
35 | .vercel
36 |
37 | # typescript
38 | *.tsbuildinfo
39 | next-env.d.ts
40 |
41 | # bun files
42 | bun.lockb
43 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Ghostty.org
2 |
3 | Ghostty.org is the official Ghostty website.
4 |
5 | **Note, Ghostty.org has different contributing guidelines than
6 | the Ghostty project.** They are simpler. If you are familiar with
7 | the Ghostty project contributing guidelines, you probably still
8 | want to read the Quick Guide below.
9 |
10 | ## Quick Guide
11 |
12 | **There is a typo or grammatical error in the website.**
13 |
14 | Open a pull request with the correction. No need to make an
15 | issue or discussion.
16 |
17 | **There is a behavioral bug in the website.**
18 |
19 | Open an issue with clear steps to reproduce the bug.
20 |
21 | **There is a feature request for the website.**
22 |
23 | [Open a discussion](https://github.com/ghostty-org/ghostty/discussions)
24 | in the _Ghostty project_ repository. All feature requests even
25 | for the website flow through the Ghostty discussions as a central
26 | point.
27 |
28 | New pages or new content constitutes a feature request.
29 |
30 | Once the feature request is accepted, it will be converted to
31 | an issue in this repository.
32 |
33 | **Drive-by pull requests for features are discouraged.** If you
34 | open a PR without previous discussion with a maintainer, you do
35 | so at your own risk.
36 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # ===================================
2 | # =========== BUILD IMAGE ===========
3 | # ===================================
4 | FROM node:22-alpine AS build_image
5 |
6 | # Set the Current Working Directory inside the container
7 | WORKDIR /app
8 |
9 | # Copy package.json files
10 | COPY package.json package-lock.json ./
11 |
12 | # Download all dependencies. Dependencies will be cached
13 | # if the package.json files are not changed
14 | RUN npm i
15 |
16 | # Copy the source from the current directory to
17 | # the Working Directory inside the container
18 | COPY . .
19 |
20 | # Compile the website (production build)
21 | RUN npm run build
22 |
23 | # Remove development dependencies
24 | RUN npm prune --production
25 |
26 | # ===================================
27 | # ========== RUNTIME IMAGE ==========
28 | # ===================================
29 | FROM node:22-alpine
30 |
31 | # Set the Current Working Directory inside the container
32 | WORKDIR /app
33 |
34 | # Adds Bash for env variable access (alpine does not ship w/ Bash)
35 | RUN apk update && apk add bash
36 |
37 | COPY --from=build_image /app/.next ./.next
38 | COPY --from=build_image /app/public ./public
39 | COPY --from=build_image /app/node_modules ./node_modules
40 | COPY --from=build_image /app/package.json ./package.json
41 |
42 | # Run it
43 | CMD ["npm", "run", "start"]
44 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Ghostty
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | SHELL := /usr/bin/env bash
2 |
3 | .PHONY: dev
4 | dev: node_modules/.installed .env.local
5 | source .env.local && npm run dev
6 |
7 | node_modules/.installed: package.json
8 | npm i && touch node_modules/.installed
9 |
10 | .env.local:
11 | cp .env.sample .env.local
12 |
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 |
19 | # ====================================
20 | # ======= Docker Configuration =======
21 | # ====================================
22 |
23 | .PHONY: docker
24 | docker: .env.local docker-build
25 | source .env.local && docker compose up
26 |
27 | .PHONY: docker-build
28 | docker-build:
29 | docker compose build
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Ghostty Website
5 |
6 |
7 |
8 | This repository contains the entire source for ghostty.org.
9 |
10 |
11 | ## Local Development
12 |
13 | The official development environment is defined by Nix. You do not need
14 | to use Nix to develop the website, but the Nix environment is the
15 | only supported development environment.
16 |
17 | To spin up a local server, you can simply run `make`.
18 |
19 | ```bash
20 | make
21 | ```
22 |
23 | Open [http://localhost:3000](http://localhost:3000) with your browser
24 | to view the website.
25 |
26 | ## Contributing
27 |
28 | If you would like to contribute to the website, please read the
29 | [contributing guidelines](CONTRIBUTING.md).
30 |
--------------------------------------------------------------------------------
/bin/video-to-terminal/README.md:
--------------------------------------------------------------------------------
1 | # `video-to-terminal.sh`
2 |
3 | ```sh
4 | ./video-to-terminal.sh ./video-file.mp4
5 | ```
6 |
--------------------------------------------------------------------------------
/bin/video-to-terminal/video.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/bin/video-to-terminal/video.mp4
--------------------------------------------------------------------------------
/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | website:
4 | container_name: ghostty-website
5 | build: .
6 | image: ghostty-org/website
7 | environment:
8 | - PORT
9 | ports:
10 | - "${PORT}:${PORT}"
11 |
--------------------------------------------------------------------------------
/docs/config/keybind/sequence.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Trigger Sequences
3 | description: |-
4 | A trigger that requires a sequence of multiple keypress events.
5 | ---
6 |
7 | Ghostty supports keybindings that require a sequence of triggers
8 | to activate the action. For example, you could require `ctrl+a`
9 | followed by `n` to open a new window. In other software, this is sometimes
10 | referred to as a "leader key", a "key chord", a "key table",
11 | etc.
12 |
13 | To specify a sequence of triggers, use the
14 | [normal trigger syntax](/docs/config/keybind#trigger) and
15 | separate the triggers in the sequence with a `>` character.
16 | An example is shown below:
17 |
18 | ```ini
19 | keybind = ctrl+a>n=new_window
20 | ```
21 |
22 |
23 | If you define a sequence as a CLI argument to `ghostty`,
24 | you probably have to quote the keybind since `>` is a special character
25 | in most shells. Example: ghostty --keybind='ctrl+a>n=new_window'
26 |
27 |
28 | A trigger sequence has some special handling:
29 |
30 | * Ghostty will wait an indefinite amount of time for the next key in
31 | the sequence. There is no way to specify a timeout. The only way to
32 | force the output of a prefix key is to assign another keybind to
33 | specifically output that key (i.e. `ctrl+a>ctrl+a=text:foo`) or
34 | press an unbound key which will send both keys to the program.
35 |
36 | * If a prefix in a sequence is previously bound, the sequence will
37 | override the previous binding. For example, if `ctrl+a` is bound to
38 | `new_window` and `ctrl+a>n` is bound to `new_tab`, pressing `ctrl+a`
39 | will do nothing.
40 |
41 | * Adding to the above, if a previously bound sequence prefix is
42 | used in a new, non-sequence binding, the entire previously bound
43 | sequence will be unbound. For example, if you bind `ctrl+a>n` and
44 | `ctrl+a>t`, and then bind `ctrl+a` directly, both `ctrl+a>n` and
45 | `ctrl+a>t` will become unbound.
46 |
47 | * Trigger sequences are not allowed for `global:` or `all:`-prefixed
48 | triggers. This is a limitation we could remove in the future.
49 |
50 |
51 |
--------------------------------------------------------------------------------
/docs/help/gtk-single-instance.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: GTK Single Instance Mode
3 | description: |-
4 | GTK single instance mode is a feature that ensures only one instance of the
5 | application is running at a time.
6 | ---
7 |
8 | Ghostty uses GTK single instance mode by default when it detects
9 | it is launched from a desktop environment (i.e. not from the CLI).
10 |
11 | GTK single instance mode is recommended by the GTK project and is
12 | the idiomatic way official Gnome applications are expected to behave.
13 | When a second instance of Ghostty is launched, the original
14 | instance will create a new window, gain focus, and terminate the
15 | second instance.
16 |
17 |
18 | If you're using Ghostty on Linux and are experiencing slow startup times
19 | or high memory usage, GTK single instance detection may not be
20 | working for your environment and you may need to force it on.
21 | Continue reading this page to learn more.
22 |
23 |
24 | ## Desktop Environment Detection
25 |
26 | The default behavior of Ghostty is to use GTK single instance mode
27 | **when launched from a desktop environment.**
28 |
29 | Ghostty has this behavior because CLI terminal usage is common
30 | (i.e. `ghostty -e "some command"`) and in those cases the expected
31 | behavior is to launch a new process and block until it exits.
32 | Single instance mode doesn't allow us to easily do this so we only
33 | want to enable single instance mode when launched from a desktop
34 | environment.
35 |
36 | There isn't a standard API to detect if an application is launched
37 | from a desktop environment, so Ghostty uses the following heuristic:
38 |
39 | 1. The `GIO_LAUNCHED_DESKTOP_FILE_PID` environment variable is set.
40 | Gnome applications set this variable when launched from a `.desktop`
41 | file.
42 |
43 | 2. The PID in `GIO_LAUNCHED_DESKTOP_FILE_PID` matches the pid of
44 | the Ghostty process. This prevents Ghostty being launched from
45 | another desktop application from being detected as a desktop
46 | application.
47 |
48 |
49 | I expect that this heuristic isn't perfect. If you can improve
50 | this, please [start a GitHub discussion](https://github.com/ghostty-org/ghostty/discussions).
51 | During the private beta period of Ghostty, we had around 5,000
52 | beta testers and this heuristic overall worked very well.
53 |
54 |
55 | ## Forcing GTK Single Instance Mode On or Off
56 |
57 | You can force GTK single instance mode on or off by setting the
58 | [`gtk-single-instance`](/docs/config/reference#gtk-single-instance) option:
59 |
60 | ```ini
61 | gtk-single-instance = true
62 | ```
63 |
64 | A value of `true` forces Ghostty to run in single instance mode.
65 | In this mode, each new `ghostty` process will result in a new window
66 | in an existing instance of Ghostty if one is running.
67 |
68 | ## Relationship to Startup Performance and Memory
69 |
70 | Ghostty is a GTK application. The GTK framework has unavoidable
71 | overhead when starting up, both in terms of how long it takes and
72 | how much memory it uses. Ghostty can't do anything about this.
73 |
74 | GTK single instance mode avoids this overhead for subsequent
75 | instances of Ghostty. Launching a second instance of Ghostty
76 | will be extremely fast and use very little memory since it is
77 | just creating a new window in the existing instance.
78 |
--------------------------------------------------------------------------------
/docs/help/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Help
3 | description: |-
4 | How to seek help, a list of common issues and solutions,
5 | and how to report a bug or request a feature.
6 | ---
7 |
8 | Ghostty is a personal side project with no commercial backing.
9 | As such, there is no support team or dedicated resources to help you.
10 | The community is very helpful and may provide assistance, and
11 | we try to document as many common issues and solutions as possible.
12 |
13 | ## Common Issues and Solutions
14 |
15 | | Issue | Solution |
16 | |-------|----------|
17 | | Error "missing or unsuitable terminal" when running commands or using SSH. | [Terminfo](/docs/help/terminfo) |
18 | | macOS window managers such as Yabai or Aerospace act strange | [macOS Tiling Window Managers](/docs/help/macos-tiling-wms) |
19 | | Ghostty has slow startup or high memory usage on Linux. | [GTK Single Instance](/docs/help/gtk-single-instance) |
20 | | macOS defaults to login shells | [macOS Login Shells](/docs/help/macos-login-shells)
21 |
22 | ## Seeking Help
23 |
24 | If the common issues and solutions above did not help and you
25 | can't find an answer in the documentation, the following resources
26 | are available:
27 |
28 |
42 |
43 | ## Reporting Bugs or Requesting Features
44 |
45 | Please, please, please read the [contributing guide on GitHub](https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md).
46 |
47 |
48 | **GitHub Issues is probably not the right place to go.** This project
49 | starts all bugs and feature requests as discussions on GitHub Discussions
50 | until more specific details are known. From there, we convert them into
51 | GitHub Issues as needed. See the contributing guide for more details.
52 |
53 |
--------------------------------------------------------------------------------
/docs/help/macos-login-shells.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: macOS Login Shells
3 | description: |-
4 | In other Unix systems terminal emulators are generally started
5 | using non-login shells. Due to various reasons, macOS defaults
6 | all terminals as login shells.
7 | ---
8 |
9 | Ghostty respects the macOS traditions and will start each shell as a login
10 | shell. This matches the behavior of other terminal emulators on macOS, most
11 | notably the default Terminal.app. However, this behavior is different from
12 | other Unix systems, and may cause confusion for users who are used to the
13 | behavior of those systems.
14 |
15 | ## Why Login Shells
16 |
17 | Traditionally, unix shells have two main files that expect to be run before the user
18 | is able to interact with the shell: a profile file and the rc file. The
19 | profile file is usually run once at login and is used to set up the environment
20 | for the user. The rc file is run every time a new shell is created and is used
21 | to set up the shell itself.
22 |
23 | Using zsh as an example (the default shell on macOS since 10.15):
24 | zsh uses the `.zprofile` and `.zshrc` files. On most Linux systems `.zprofile`
25 | (or similar) is executed when the user initially logs in via something like
26 | a desktop manager. This allows subsequent shells to inherit the environment
27 | and any setup done by `.zprofile`. The idea here is that any expensive
28 | initialization only needs done once at login, and subsequent shells can reuse
29 | everything from the setup process.
30 |
31 |
32 | Zsh is used as an example but almost any shell can be used in its place and
33 | have the same behavior, with the exception of bash. Bash will **only** read
34 | `.bashrc` if the shell is both interactive and non-login. Since macOS moved from
35 | tcsh to bash in OSX 10.2 Jaguar, this difference in bash may have been
36 | overlooked, resulting in developers placing their shell setup entirely in
37 | `.profile` as `.bashrc` would rarely be run, specifically not by starting a new
38 | terminal. Now that zsh is the new default, `.zprofile` and `.zshrc` are both
39 | called starting an interactive non-login shell.
40 |
41 |
42 | macOS differs in that the GUI used to login to the system does not run
43 | `.zprofile` as it has its own method of loading in system level global
44 | settings. This means that any terminal emulator must run shells as login or
45 | else new shells would be potentially broken since they would be missing any
46 | setup process in `.zprofile`. This is the unfortunate reality, but makes sense
47 | in that there is no `.xsession` or similar, since `.zprofile` is never run,
48 | that can give a users terminals access to initial settings or set things like
49 | global environment variables [^1].
50 |
51 | This however does *not* mean that everything should just go in `.zprofile`, or
52 | that the two files are always called together. Since zsh is started in login
53 | mode and interactive mode, both `.zprofile` and `.zshrc` will run every time
54 | a new terminal is created. However, if you run a shell inside of a terminal
55 | emulator that will only be an interactive shell and it will lose access to the
56 | parent shells settings that were initialized in `.zprofile`. You can test this
57 | by placing an alias in your `.zprofile` and starting a terminal instance and
58 | running that alias, then run `zsh` and you will find that the alias is no longer
59 | available.
60 |
61 | Therefore, most shell setup should still go in the `.zshrc` file so that any shells,
62 | terminal or otherwise, are initialized correctly. This is also somewhat in line
63 | with how dotfiles on other Linux systems would be written.
64 |
65 | [^1]: [Why are interactive shells on OSX login shells by default?](https://unix.stackexchange.com/questions/119627/why-are-interactive-shells-on-osx-login-shells-by-default)
66 |
--------------------------------------------------------------------------------
/docs/help/macos-tiling-wms.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: macOS Tiling Window Managers
3 | description: |-
4 | Ghostty tabs may render as separate windows in macOS tiling
5 | window managers such as Yabai or Aerospace.
6 | ---
7 |
8 | macOS tiling window managers such as Yabai or Aerospace may
9 | render Ghostty tabs as separate windows. This is a known issue
10 | that is well documented in both the Yabai and Aerospace
11 | issue trackers.
12 |
13 | Ghostty uses macOS native tabs. macOS native tabs are represented
14 | as separate windows in the macOS window manager API. This is
15 | the API that Yabai, Aerospace, and other tiling window managers
16 | use to manage windows on macOS.
17 |
18 | As such, this is a limitation of macOS APIs and there isn't
19 | anything Ghostty can do to fix this issue.
20 |
21 |
22 | Longer term, we'd like to implement a custom tabbing solution
23 | that doesn't rely on macOS native tabs. This would allow us
24 | to better integrate with macOS tiling window managers.
25 |
26 |
27 | ## Workarounds
28 |
29 | The Ghostty community has identified potential workarounds
30 | depending on the tiling window manager you are using.
31 |
32 | ### Aerospace
33 |
34 | ```toml
35 | [[on-window-detected]]
36 | if.app-id="com.mitchellh.ghostty"
37 | run= [
38 | "layout tiling",
39 | ]
40 | ```
41 |
42 | If Ghostty tabs are still being rendered as separate windows, try replacing `"layout tiling"` with `"layout floating"`. Note that this will cause the Ghostty window to be floating on initial startup. You can manually unfloat the window (`alt+shift+;` followed by `f` by default).
43 |
44 | ### Yabai
45 |
46 | ```
47 | yabai -m signal --add app='^Ghostty$' event=window_created action='yabai -m space --layout bsp'
48 | yabai -m signal --add app='^Ghostty$' event=window_destroyed action='yabai -m space --layout bsp'
49 | ```
50 |
--------------------------------------------------------------------------------
/docs/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Ghostty Docs
3 | description: |-
4 | Ghostty is a fast, feature-rich, and cross-platform terminal emulator
5 | that uses platform-native UI and GPU acceleration.
6 | hideSidecar: true
7 | ---
8 |
9 | ## Get Started
10 |
11 | Install Ghostty and run!
12 | [Zero configuration required](/docs/config#zero-configuration-philosophy) to get up and running.
13 |
14 | ### Installation Instructions
15 |
16 | Ready-to-run binaries for macOS. Packages or build from source for Linux.
17 |
18 |
33 |
34 |
35 |
36 | ## Featured Documentation
37 |
38 |
62 |
--------------------------------------------------------------------------------
/docs/install/package.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Packaging Ghostty
3 | description: |-
4 | For people who want to build and package Ghostty for their platform.
5 | ---
6 |
7 |
8 | **This page is for people who want to build and package Ghostty for
9 | others.** If you want to just use Ghostty, you should follow the
10 | [installation instructions](/download).
11 |
12 |
13 | Ghostty relies on downstream package maintainers to distribute
14 | Ghostty to end-users. If you're interested in packaging Ghostty for
15 | your platform, _thank you very much_.
16 |
17 | We've put together a
18 | [packaging guide](https://github.com/ghostty-org/ghostty/blob/main/PACKAGING.md)
19 | within the Ghostty source tree. This is the most up to date
20 | information on how to package Ghostty. Please refer to that guide.
21 |
22 | If you have any questions or need help, we're very happy to help.
23 | Please open an issue directly on the Ghostty repository.
24 |
--------------------------------------------------------------------------------
/docs/install/pre.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Prerelease Builds
3 | description: |-
4 | Help test the latest features and get the most recent bug fixes
5 | by running prerelease builds of Ghostty.
6 | ---
7 |
8 | If you're comfortable with running prerelease software, you can
9 | help test the latest features and get the most recent bug fixes
10 | by running prerelease builds of Ghostty. This helps the project
11 | significantly by providing feedback on new features and addressing
12 | possible issues before they are released to the public.
13 |
14 |
15 | During the private beta period of Ghostty, testers daily drove
16 | prerelease builds using this same process. Many didn't have a single
17 | issue for months or even over a year. The prerelease builds are
18 | generally stable, but users should always be prepared for the
19 | possibility of stability issues.
20 |
21 |
22 | An overview of how to install prerelease builds is provided below
23 | with more details in the sections following the table.
24 |
25 | | Platform | Description |
26 | | -------- | ----------- |
27 | | macOS | `auto-update-channel` to get the latest prerelease builds |
28 | | Nix | Standard `flake.nix` in the Ghostty repository |
29 | | Linux | [Build from source](/docs/install/build) |
30 |
31 | ## macOS
32 |
33 | For macOS, the Ghostty project provides signed and notarized builds
34 | for the latest commit on the `main` branch. These are available
35 | via [GitHub Releases](https://github.com/ghostty-org/ghostty/releases/tag/tip)
36 | but also via the standard macOS auto-update mechanism.
37 |
38 | If you are on a release build, you can switch to the prerelease channel
39 | by setting [`auto-update-channel`](/docs/config/reference#auto-update-channel) to `tip`.
40 |
41 | ```ini
42 | auto-update-channel = tip
43 | ```
44 |
45 |
46 | Don't forget to restart Ghostty after changing the `auto-update-channel`
47 | setting! This setting does not take effect until Ghostty is restarted.
48 |
49 |
50 |
51 | While you can set this setting back to `stable` at any time, this will
52 | only take effect when a later stable release is available. If you want
53 | to downgrade back to the previous stable release, you must
54 | [re-download](/download) Ghostty.
55 |
56 |
57 |
58 | **Why is this setting called "tip"?** The term "tip" is a common term
59 | to refer to the latest commit on a branch in Git. Since we build
60 | prerelease builds from the latest commit on the `main` branch, we
61 | use the term "tip" to refer to the latest prerelease build rather than
62 | something like "nightly".
63 |
64 |
65 | ### Homebrew
66 |
67 | You can also install prerelease builds using Homebrew using the
68 | `@tip` version.
69 |
70 | ```shell-session
71 | brew install --cask ghostty@tip
72 | ```
73 |
74 |
75 | This is community-maintained. The `auto-update-channel` setting
76 | is an official distribution channel.
77 |
78 |
79 | ## Nix
80 |
81 | For Nix users on Linux, there is a standard
82 | [`flake.nix` in the Ghostty repository](https://github.com/ghostty-org/ghostty/blob/main/flake.nix).
83 | Follow the same instructions as the
84 | [Nix Flake](/docs/install/build#building-with-nix)
85 | section on the building from source page.
86 |
87 |
88 | **The package in the flake only supports Linux.** Building macOS app
89 | bundles is not well supported by Nix, so the package in the flake
90 | only supports Linux. If you want to contribute a macOS package to
91 | the flake, feel free to make a pull request!
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/docs/install/release-notes/1-1-2.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Ghostty 1.1.2
3 | description: |-
4 | Release notes for Ghostty 1.1.2, released on February 13, 2025.
5 | ---
6 |
7 | Ghostty 1.1.2 is a hotfix to fix a critical regression from 1.1.1
8 | on macOS that caused control-modified keys to not work properly
9 | in programs using Kitty Keyboard protocol such as Neovim and Fish 4.0.
10 |
11 | This was released on the same day as 1.1.1, please see the
12 | [1.1.1 release notes](/docs/install/release-notes/1-1-1).
13 |
14 |
15 | **There are no changes in this release for Linux.** Package managers
16 | can skip this release and stay on 1.1.1 until the next release if that
17 | is more convenient.
18 |
19 |
--------------------------------------------------------------------------------
/docs/install/release-notes/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Release Notes
3 | description: |-
4 | List of all published version of Ghostty and their accompanying
5 | release notes.
6 | ---
7 |
8 | - [1.1.3](/docs/install/release-notes/1-1-3) - Released on March 24, 2025
9 | - [1.1.2](/docs/install/release-notes/1-1-2) - Released on February 13, 2025
10 | - [1.1.1](/docs/install/release-notes/1-1-1) – Released on February 13, 2025
11 | - [1.1.0](/docs/install/release-notes/1-1-0) – Released on January 30, 2025
12 | - [1.0.1](/docs/install/release-notes/1-0-1) – Released on December 31, 2024
13 |
--------------------------------------------------------------------------------
/docs/vt/concepts/cursor.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor
3 | description: |-
4 | The cursor is the row and column where the next
5 | character will be printed or location-sensitive control
6 | sequence will be executed.
7 | ---
8 |
9 | The cursor is always present in a terminal and is located at
10 | some row and column within the active screen area. The cursor
11 | may be visually hidden, but the terminal internal state always
12 | has a cursor, and it is always located at some active position.
13 |
14 | The cursor most commonly is associated with where the next
15 | printed character will be placed. However, the cursor is also
16 | used for location-sensitive control sequences. For example,
17 | when an [erase line control sequence](/docs/vt/csi/el) is
18 | executed, the cursor determines the first line to erase.
19 |
20 | The terminal has a single cursor [per screen](/docs/vt/concepts/screen).
21 | **Note that this document is about the cursor as it relates
22 | to the [terminal API](/docs/vt).** Applications such as editors may
23 | have their own concept known as a "cursor" that is completely
24 | unrelated to the terminal cursor. For example, an editor may support
25 | "multiple cursors", but the underlying terminal API is both a separate
26 | concept and only supports a single cursor at any given moment.
27 |
28 | ## Initial State
29 |
30 | The cursor is always initially located at the top-left corner of the screen.
31 |
32 | ## Pending Wrap State
33 |
34 | The pending wrap state is a boolean value that is set when a character
35 | is printed in the rightmost column of the screen to indicate that the
36 | next printed character should wrap to the next line.
37 |
38 | If the pending wrap state is set, the next printed character will
39 | move the cursor to the leftmost column of the next line, unset
40 | the pending wrap state, and then print the character[^1].
41 |
42 | The pending wrap state may feel like an obvious and inconsequential
43 | feature, but it has a significant (but subtle) impact on cursor
44 | behavior. For example, print followed by [backspace](/docs/vt/control/bs)
45 | behaves differently depending on if you're printing in the rightmost
46 | column of the screen or not.
47 |
48 | If you print a character in any column other than the rightmost column
49 | and then send a [backspace](/docs/vt/control/bs) control character, the
50 | cursor will move back on top of the most recently printed character.
51 | But if you print a character in the rightmost column and then send a
52 | [backspace](/docs/vt/control/bs) control character, the cursor will move
53 | to the left of the character most recently printed. This is the
54 | source of [bugs in multiple popular shell prompts](https://github.com/ghostty-org/ghostty/issues/884).
55 |
56 | You will see that many control sequences note that they
57 | "unset the pending wrap state". This is just as it sounds: if the
58 | pending wrap state is set on the cursor, it becomes unset. The next
59 | printed character will not wrap to the next line.
60 |
61 | [^1]: This isn't strictly true. Wraparound modes and scroll regions
62 | can change this behavior.
63 |
--------------------------------------------------------------------------------
/docs/vt/concepts/screen.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Screen
3 | description: TODO
4 | ---
5 |
6 | TODO
7 |
--------------------------------------------------------------------------------
/docs/vt/control/bel.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Bell (BEL)
3 | description: Raise the attention of the user.
4 | ---
5 |
6 |
7 |
8 | The purpose of the bell sequence is to raise the attention
9 | of the user.
10 |
11 | Historically, this would
12 | [ring a physical bell](https://en.wikipedia.org/wiki/Bell_character).
13 | Today, many alternate behaviors are acceptable:
14 |
15 | - An audible sound can be played through the speakers
16 | - Background or border of a window can visually flash
17 | - The terminal window can come into focus or be put on top
18 | - Application icon can bounce or otherwise draw attention
19 | - A desktop notification can be shown
20 |
21 | Normally, the bell behavior is configurable and can be disabled.
22 |
23 | ## BEL as an OSC Terminator
24 |
25 | The `BEL` character is also a valid terminating character for
26 | OSC sequences, although `ST` is preferred. If `BEL` is the
27 | terminating character for an OSC sequence, any responses should
28 | also terminate with the `BEL` character.[^1]
29 |
30 | ## Ghostty Status
31 |
32 | This control character is not currently implemented in Ghostty,
33 | but can be used as an OSC terminator. If it is used as an OSC
34 | terminator, Ghostty will terminate any responses with the
35 | `BEL` character.
36 |
37 | There is an [open discussion](https://github.com/ghostty-org/ghostty/discussions/2710)
38 | about implementing the bell character in Ghostty and what
39 | that will look like.
40 |
41 | [^1]: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
42 |
--------------------------------------------------------------------------------
/docs/vt/control/bs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Backspace (BS)
3 | description: Move the cursor backward one position.
4 | ---
5 |
6 |
7 |
8 | This sequence performs [cursor backward (CUB)](/docs/vt/csi/cub)
9 | with `Pn = 1`. There is no additional or different behavior for
10 | using `BS`.
11 |
--------------------------------------------------------------------------------
/docs/vt/control/cr.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Carriage Return (CR)
3 | description: Move the cursor to the leftmost column.
4 | ---
5 |
6 |
7 |
8 | This sequence always unsets the pending wrap state.
9 |
10 | If [origin mode (mode 6)](#TODO) is enabled, the cursor is set to the
11 | [left margin](#TODO) of the scroll region and the operation is complete.
12 |
13 | If origin mode is _not_ set and the cursor is on or to the right of the
14 | left margin, the cursor is set to the left margin. If the cursor is to the left
15 | of the left margin, the cursor is moved to the leftmost column in the terminal.
16 |
17 | ## Validation
18 |
19 | ### CR V-1: Pending Wrap is Unset
20 |
21 | ```bash
22 | cols=$(tput cols)
23 | printf "\033[${cols}G" # move to last column
24 | printf "A" # set pending wrap state
25 | printf "\r"
26 | printf "X"
27 | echo
28 | ```
29 |
30 | ```
31 | |X________A|
32 | |c_________|
33 | ```
34 |
35 | ### CR V-2: Left Margin
36 |
37 | ```bash
38 | cols=$(tput cols)
39 | printf "\033[1;1H" # move to top-left
40 | printf "\033[0J" # clear screen
41 | printf "\033[?69h" # enable left/right margin mode
42 | printf "\033[2;5s" # set left/right margin
43 | printf "\033[4G"
44 | printf "A"
45 | printf "\r"
46 | printf "X"
47 | ```
48 |
49 | ```
50 | |_XcA______|
51 | ```
52 |
53 | ### CR V-3: Left of Left Margin
54 |
55 | ```bash
56 | cols=$(tput cols)
57 | printf "\033[1;1H" # move to top-left
58 | printf "\033[0J" # clear screen
59 | printf "\033[?69h" # enable left/right margin mode
60 | printf "\033[2;5s" # set left/right margin
61 | printf "\033[4G"
62 | printf "A"
63 | printf "\033[1G"
64 | printf "\r"
65 | printf "X"
66 | ```
67 |
68 | ```
69 | |Xc_A______|
70 | ```
71 |
72 | ### CR V-3: Left Margin with Origin Mode
73 |
74 | ```bash
75 | cols=$(tput cols)
76 | printf "\033[1;1H" # move to top-left
77 | printf "\033[0J" # clear screen
78 | printf "\033[?6h" # enable origin mode
79 | printf "\033[?69h" # enable left/right margin mode
80 | printf "\033[2;5s" # set left/right margin
81 | printf "\033[4G"
82 | printf "A"
83 | printf "\033[1G"
84 | printf "\r"
85 | printf "X"
86 | ```
87 |
88 | ```
89 | |_XcA______|
90 | ```
91 |
--------------------------------------------------------------------------------
/docs/vt/control/lf.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Linefeed (LF)
3 | description: Move the cursor down one line, scrolling if necessary.
4 | ---
5 |
6 |
7 |
8 | This is an alias for [index (IND)](/docs/vt/esc/ind).
9 |
10 | If [linefeed mode (mode 20)](#TODO) is enabled, perform a
11 | [carriage return](/docs/vt/control/cr) after the IND operation.
12 |
--------------------------------------------------------------------------------
/docs/vt/control/tab.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Tab (TAB)
3 | description: Move the cursor right to the next tab stop.
4 | ---
5 |
6 |
7 |
8 | This is an alias for [cursor horizontal tabulation (CHT)](/docs/vt/csi/cht) with
9 | `n = 1`.
10 |
--------------------------------------------------------------------------------
/docs/vt/csi/cbt.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Backward Tabulation (CBT)
3 | description: Move the cursor `n` tabs left.
4 | ---
5 |
6 |
7 |
8 | The leftmost valid column for this operation is the first column. If
9 | [origin mode](#TODO) is enabled, then the leftmost valid column for this
10 | operation is the [left margin](#TODO).
11 |
12 | Move the cursor left until the cursor position is on a tabstop. If the
13 | cursor would move past the leftmost valid column, the cursor remains at
14 | the leftmost valid column and the operation completes. Repeat this process
15 | `n` times.
16 |
17 | Tabstops are dynamic and can be set with escape sequences such as
18 | [horizontal tab set (HTS)](/docs/vt/csi/hts), [tab clear (TBC)](/docs/vt/csi/tbc), etc.
19 | A terminal emulator may default tabstops at any interval, though an interval
20 | of 8 spaces is most common.
21 |
22 | ## Validation
23 |
24 | ### CBT V-1: Left Beyond First Column
25 |
26 | ```bash
27 | printf "\033[?5W" # reset tab stops
28 | printf "\033[10Z"
29 | printf "A"
30 | ```
31 |
32 | ```
33 | |Ac________|
34 | ```
35 |
36 | ### CBT V-2: Left Starting After Tab Stop
37 |
38 | ```bash
39 | printf "\033[?5W" # reset tab stops
40 | printf "\033[1;10H"
41 | printf "X"
42 | printf "\033[Z"
43 | printf "A"
44 | ```
45 |
46 | ```
47 | |________AX|
48 | ```
49 |
50 | ### CBT V-3: Left Starting on Tabstop
51 |
52 | ```bash
53 | printf "\033[?5W" # reset tab stops
54 | printf "\033[1;9H"
55 | printf "X"
56 | printf "\033[1;9H"
57 | printf "\033[Z"
58 | printf "A"
59 | ```
60 |
61 | ```
62 | |A_______X_|
63 | ```
64 |
65 | ### CBT V-4: Left Margin with Origin Mode
66 |
67 | ```bash
68 | printf "\033[1;1H" # move to top-left
69 | printf "\033[0J" # clear screen
70 | printf "\033[?5W" # reset tab stops
71 | printf "\033[?6h" # enable origin mode
72 | printf "\033[?69h" # enable left/right margins
73 | printf "\033[3;6s" # scroll region left/right
74 | printf "\033[1;2H" # move cursor in region
75 | printf "X"
76 | printf "\033[Z"
77 | printf "A"
78 | ```
79 |
80 | ```
81 | |__AX______|
82 | ```
83 |
--------------------------------------------------------------------------------
/docs/vt/csi/cht.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Horizontal Tabulation (CHT)
3 | description: Move the cursor right `n` tabs.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
9 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
10 |
11 | The rightmost valid column for this operation is the rightmost column in
12 | the terminal screen or the [right margin](#TODO), whichever is smaller.
13 | This sequence does not change behavior with [origin mode](#TODO) set.
14 |
15 | Move the cursor right until the cursor position is on a tabstop. If the
16 | cursor would move past the rightmost valid column, the cursor remains at
17 | the rightmost valid column and the operation completes. Repeat this process
18 | `n` times.
19 |
20 | Tabstops are dynamic and can be set with escape sequences such as
21 | [horizontal tab set (HTS)](/docs/vt/csi/hts), [tab clear (TBC)](/docs/vt/csi/tbc), etc.
22 | A terminal emulator may default tabstops at any interval, though an interval
23 | of 8 spaces is most common.
24 |
25 | ## Validation
26 |
27 | ### CHT V-1: Right Beyond Last Column
28 |
29 | ```bash
30 | printf "\033[?5W" # reset tab stops
31 | printf "\033[100I" # assuming the test terminal has less than 800 columns
32 | printf "A"
33 | ```
34 |
35 | ```
36 | |_________A|
37 | ```
38 |
39 | ### CHT V-2: Right From Before a Tabstop
40 |
41 | ```bash
42 | printf "\033[?5W" # reset tab stops
43 | printf "\033[1;2H"
44 | printf "A"
45 | printf "\033[I"
46 | printf "X"
47 | ```
48 |
49 | ```
50 | |_A______X_|
51 | ```
52 |
53 | ### CHT V-3: Right Margin
54 |
55 | ```bash
56 | printf "\033[1;1H" # move to top-left
57 | printf "\033[0J" # clear screen
58 | printf "\033[?5W" # reset tab stops
59 | printf "\033[?69h" # enable left/right margins
60 | printf "\033[3;6s" # scroll region left/right
61 | printf "\033[1;1H" # move cursor in region
62 | printf "X"
63 | printf "\033[I"
64 | printf "A"
65 | ```
66 |
67 | ```
68 | |__AX______|
69 | ```
70 |
--------------------------------------------------------------------------------
/docs/vt/csi/cnl.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Next Line (CNL)
3 | description: Move the cursor down `n` cells and to the beginning of the line.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1.
9 | If `n` is less than or equal to 0, adjust `n` to be 1. If `n` is
10 | omitted, `n` defaults to 1.
11 |
12 | The logic of this sequence is identical to
13 | [Cursor Down (CUD)](/docs/vt/csi/cud)
14 | followed by [Carriage Return (CR)](/docs/vt/control/cr).
15 |
--------------------------------------------------------------------------------
/docs/vt/csi/cpl.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Previous Line (CPL)
3 | description: Move the cursor up `n` cells and to the beginning of the line.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
9 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
10 |
11 | The logic of this sequence is identical to [Cursor Up (CUU)](/docs/vt/csi/cuu)
12 | followed by [Carriage Return (CR)](/docs/vt/control/cr).
13 |
--------------------------------------------------------------------------------
/docs/vt/csi/cud.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Down (CUD)
3 | description: Move the cursor down `n` cells.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
9 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
10 |
11 | This sequence always unsets the pending wrap state.
12 |
13 | If the current cursor position is at or above the [bottom margin](#TODO),
14 | the lowest point the cursor can move is the bottom margin. If the current
15 | cursor position is below the bottom margin, the lowest point the cursor
16 | can move is the final row.
17 |
18 | This sequence never triggers scrolling.
19 |
20 | ## Validation
21 |
22 | ### CUD V-1: Cursor Down
23 |
24 | ```bash
25 | printf "A"
26 | printf "\033[2B" # cursor down
27 | printf "X"
28 | ```
29 |
30 | ```
31 | |A_________|
32 | |__________|
33 | |_Xc_______|
34 | ```
35 |
36 | ### CUD V-2: Cursor Down Above Bottom Margin
37 |
38 | ```bash
39 | printf "\033[1;1H" # move to top-left
40 | printf "\033[0J" # clear screen
41 | printf "\n\n\n\n" # screen is 4 high
42 | printf "\033[1;3r" # set scrolling region
43 | printf "A"
44 | printf "\033[5B" # cursor down
45 | printf "X"
46 | ```
47 |
48 | ```
49 | |A_________|
50 | |__________|
51 | |_Xc_______|
52 | |__________|
53 | ```
54 |
55 | ### CUD V-3: Cursor Down Below Bottom Margin
56 |
57 | ```bash
58 | printf "\033[1;1H" # move to top-left
59 | printf "\033[0J" # clear screen
60 | printf "\n\n\n\n\n" # screen is 5 high
61 | printf "\033[1;3r" # set scrolling region
62 | printf "A"
63 | printf "\033[4;1H" # move below region
64 | printf "\033[5B" # cursor down
65 | printf "X"
66 | ```
67 |
68 | ```
69 | |A_________|
70 | |__________|
71 | |__________|
72 | |__________|
73 | |_Xc_______|
74 | ```
75 |
--------------------------------------------------------------------------------
/docs/vt/csi/cuf.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Forward (CUF)
3 | description: Move the cursor `n` cells right.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
9 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
10 |
11 | This sequence always unsets the pending wrap state.
12 |
13 | The rightmost boundary the cursor can move to is determined by the current
14 | cursor column and the [right margin](#TODO). If the cursor begins to the right
15 | of the right margin, modify the right margin to be the rightmost column
16 | of the screen for the duration of the sequence. The rightmost column the cursor
17 | can be on is the right margin.
18 |
19 | Move the cursor `n` cells to the right up to and including the rightmost boundary.
20 | This sequence never wraps or modifies cell content. This sequence is not affected
21 | by any terminal modes.
22 |
23 | ## Validation
24 |
25 | ### CUF V-1: Pending Wrap is Unset
26 |
27 | ```bash
28 | cols=$(tput cols)
29 | printf "\033[${cols}G" # move to last column
30 | printf "A" # set pending wrap state
31 | printf "\033[C" # move forward one
32 | printf "XYZ"
33 | ```
34 |
35 | ```
36 | |_________X|
37 | |YZ________|
38 | ```
39 |
40 | ### CUF V-2: Rightmost Boundary with Reverse Wrap Disabled
41 |
42 | ```bash
43 | printf "A"
44 | printf "\033[500C" # forward larger than screen width
45 | printf "B"
46 | ```
47 |
48 | ```
49 | |A________Bc
50 | ```
51 |
52 | ### CUF V-3: Left of the Right Margin
53 |
54 | ```bash
55 | printf "\033[1;1H" # move to top-left
56 | printf "\033[0J" # clear screen
57 | printf "\033[?69h" # enable left/right margins
58 | printf "\033[3;5s" # scroll region left/right
59 | printf "\033[1G" # move to left
60 | printf "\033[500C" # forward larger than screen width
61 | printf "X"
62 | ```
63 |
64 | ```
65 | |____X_____|
66 | ```
67 |
68 | ### CUF V-4: Right of the Right Margin
69 |
70 | ```bash
71 | printf "\033[1;1H" # move to top-left
72 | printf "\033[0J" # clear screen
73 | printf "\033[?69h" # enable left/right margins
74 | printf "\033[3;5s" # scroll region left/right
75 | printf "\033[6G" # move to right of margin
76 | printf "\033[500C" # forward larger than screen width
77 | printf "X"
78 | ```
79 |
80 | ```
81 | |_________X|
82 | ```
83 |
--------------------------------------------------------------------------------
/docs/vt/csi/cup.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Position (CUP)
3 | description: Move the cursor to row `y` and column `x`.
4 | ---
5 |
6 |
7 |
8 | The parameters `y` and `x` must be integers greater than or equal to 1.
9 | If either is less than or equal to 0, adjust that parameter to be 1.
10 |
11 | The values `y` and `x` are both one-based. For example, the top row is row 1
12 | and the leftmost column on the screen is column 1.
13 |
14 | This sequence always unsets the pending wrap state.
15 |
16 | If [origin mode](#TODO) is **NOT** set, the cursor is moved exactly to the
17 | row and column specified by `y` and `x`. The maximum value for `y` is the
18 | bottom row of the screen and the maximum value for `x` is the rightmost
19 | column of the screen.
20 |
21 | If [origin mode](#TODO) is set, the cursor position is set relative
22 | to the top-left corner of the scroll region. `y = 1` corresponds to
23 | the [top margin](#TODO) and `x = 1` corresponds to the [left margin](#TODO).
24 | The maximum value for `y` is the [bottom margin](#TODO) and the maximum
25 | value for `x` is the [right margin](#TODO).
26 |
27 | When origin mode is set, it is impossible set a cursor position using
28 | this sequence outside the boundaries of the scroll region.
29 |
30 | ## Validation
31 |
32 | ### CUP V-1: Normal Usage
33 |
34 | ```bash
35 | printf "\033[1;1H" # move to top-left
36 | printf "\033[0J" # clear screen
37 | printf "\033[2;3H"
38 | printf "A"
39 | ```
40 |
41 | ```
42 | |__________|
43 | |__Ac______|
44 | ```
45 |
46 | ### CUP V-2: Off the Screen
47 |
48 | ```bash
49 | printf "\033[1;1H" # move to top-left
50 | printf "\033[0J" # clear screen
51 | printf "\033[500;500H"
52 | printf "A"
53 | ```
54 |
55 | ```
56 | |__________|
57 | |__________|
58 | |_________Ac
59 | ```
60 |
61 | ### CUP V-3: Relative to Origin
62 |
63 | ```bash
64 | printf "\033[1;1H" # move to top-left
65 | printf "\033[0J" # clear screen
66 | printf "\033[2;3r" # scroll region top/bottom
67 | printf "\033[?6h" # origin mode
68 | printf "\033[1;1H" # move to top-left
69 | printf "X"
70 | ```
71 |
72 | ```
73 | |__________|
74 | |X_________|
75 | ```
76 |
77 | ### CUP V-4: Relative to Origin with Left/Right Margins
78 |
79 | ```bash
80 | printf "\033[1;1H" # move to top-left
81 | printf "\033[0J" # clear screen
82 | printf "\033[?69h" # enable left/right margins
83 | printf "\033[3;5s" # scroll region left/right
84 | printf "\033[2;3r" # scroll region top/bottom
85 | printf "\033[?6h" # origin mode
86 | printf "\033[1;1H" # move to top-left
87 | printf "X"
88 | ```
89 |
90 | ```
91 | |__________|
92 | |__X_______|
93 | ```
94 |
95 | ### CUP V-5: Limits with Scroll Region and Origin Mode
96 |
97 | ```bash
98 | printf "\033[1;1H" # move to top-left
99 | printf "\033[0J" # clear screen
100 | printf "\033[?69h" # enable left/right margins
101 | printf "\033[3;5s" # scroll region left/right
102 | printf "\033[2;3r" # scroll region top/bottom
103 | printf "\033[?6h" # origin mode
104 | printf "\033[500;500H" # move to top-left
105 | printf "X"
106 | ```
107 |
108 | ```
109 | |__________|
110 | |__________|
111 | |____X_____|
112 | ```
113 |
114 | ### CUP V-6: Pending Wrap is Unset
115 |
116 | ```bash
117 | cols=$(tput cols)
118 | printf "\033[${cols}G" # move to last column
119 | printf "A" # set pending wrap state
120 | printf "\033[1;1H"
121 | printf "X"
122 | ```
123 |
124 | ```
125 | |Xc_______X|
126 | ```
127 |
--------------------------------------------------------------------------------
/docs/vt/csi/cuu.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cursor Up (CUU)
3 | description: Move the cursor `n` cells up.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
9 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
10 |
11 | This sequence always unsets the pending wrap state.
12 |
13 | If the current cursor position is at or below the [top margin](#TODO),
14 | the highest point the cursor can move is the top margin. If the current
15 | cursor position is above the top margin, the highest point the cursor
16 | can move is the first row.
17 |
18 | ## Validation
19 |
20 | ### CUU V-1: Cursor Up
21 |
22 | ```bash
23 | printf "\033[1;1H" # move to top-left
24 | printf "\033[0J" # clear screen
25 | printf "\033[3;1H"
26 | printf "A"
27 | printf "\033[2A" # cursor up
28 | printf "X"
29 | ```
30 |
31 | ```
32 | |_Xc_______|
33 | |__________|
34 | |A_________|
35 | ```
36 |
37 | ### CUU V-2: Cursor Up Below Top Margin
38 |
39 | ```bash
40 | printf "\033[1;1H" # move to top-left
41 | printf "\033[0J" # clear screen
42 | printf "\n\n\n\n" # screen is 4 high
43 | printf "\033[2;4r" # set scrolling region
44 | printf "\033[3;1H"
45 | printf "A"
46 | printf "\033[5A" # cursor up
47 | printf "X"
48 | ```
49 |
50 | ```
51 | |__________|
52 | |_Xc_______|
53 | |A_________|
54 | |__________|
55 | ```
56 |
57 | ### CUU V-3: Cursor Up Above Top Margin
58 |
59 | ```bash
60 | printf "\033[1;1H" # move to top-left
61 | printf "\033[0J" # clear screen
62 | printf "\n\n\n\n\n" # screen is 5 high
63 | printf "\033[3;5r" # set scrolling region
64 | printf "\033[3;1H"
65 | printf "A"
66 | printf "\033[2;1H" # move above region
67 | printf "\033[5A" # cursor up
68 | printf "X"
69 | ```
70 |
71 | ```
72 | |Xc________|
73 | |__________|
74 | |A_________|
75 | |__________|
76 | |__________|
77 | ```
78 |
--------------------------------------------------------------------------------
/docs/vt/csi/dch.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Delete Character (DCH)
3 | description: |-
4 | Delete `n` characters at the current cursor position and shift existing
5 | cell contents left.
6 | ---
7 |
8 |
9 |
10 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
11 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
12 |
13 | If the current cursor position is outside of the current scroll region,
14 | this sequence does nothing. The cursor is outside of the current scroll
15 | region if it is left of the [left margin](#TODO), or right of the
16 | [right margin](#TODO).
17 |
18 | This sequence unsets the pending wrap state. This sequence does _not_ unset
19 | the pending wrap state if the cursor position is outside of the current
20 | scroll region. This has to be called out explicitly because this behavior
21 | differs from [Insert Character (ICH)](/docs/vt/csi/ich).
22 |
23 | Only cells within the scroll region are deleted or shifted. Cells to the
24 | right of the right margin are unmodified.
25 | The blank cells inserted from the right margin are blank with the background
26 | color colored according to the current SGR state.
27 |
28 | If a multi-cell character (such as "橋") is shifted so that the cell is split
29 | in half, the multi-cell character can either be clipped or erased. Typical
30 | behavior is to clip at the right edge of the screen and erase at a right
31 | margin, but either behavior is acceptable.
32 |
33 | ## Validation
34 |
35 | ### DCH V-1: Simple Delete Character
36 |
37 | ```bash
38 | printf "ABC123"
39 | printf "\033[3G"
40 | printf "\033[2P"
41 | ```
42 |
43 | ```
44 | |AB23____|
45 | ```
46 |
47 | ### DCH V-2: SGR State
48 |
49 | ```bash
50 | printf "ABC123"
51 | printf "\033[3G"
52 | printf "\033[41m"
53 | printf "\033[2P"
54 | ```
55 |
56 | ```
57 | |AB23____|
58 | ```
59 |
60 | The two rightmost cells should have a red background color.
61 |
62 | ### DCH V-3: Outside Left/Right Scroll Region
63 |
64 | ```bash
65 | printf "\033[1;1H" # move to top-left
66 | printf "\033[0J" # clear screen
67 | printf "ABC123"
68 | printf "\033[?69h" # enable left/right margins
69 | printf "\033[3;5s" # scroll region left/right
70 | printf "\033[2G"
71 | printf "\033[P"
72 | ```
73 |
74 | ```
75 | |ABC123__|
76 | ```
77 |
78 | ### DCH V-4: Inside Left/Right Scroll Region
79 |
80 | ```bash
81 | printf "\033[1;1H" # move to top-left
82 | printf "\033[0J" # clear screen
83 | printf "ABC123"
84 | printf "\033[?69h" # enable left/right margins
85 | printf "\033[3;5s" # scroll region left/right
86 | printf "\033[4G"
87 | printf "\033[P"
88 | ```
89 |
90 | ```
91 | |ABC2_3__|
92 | ```
93 |
94 | ### DCH V-5: Split Wide Character
95 |
96 | ```bash
97 | printf "\033[1;1H" # move to top-left
98 | printf "\033[0J" # clear screen
99 | printf "A橋123"
100 | printf "\033[3G"
101 | printf "\033[P"
102 | ```
103 |
104 | ```
105 | |A_123_____|
106 | ```
107 |
--------------------------------------------------------------------------------
/docs/vt/csi/decscusr.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Set Cursor Style (DECSCUSR)
3 | description: Set the cursor style.
4 | ---
5 |
6 |
7 |
8 | If `n` is omitted, `n` defaults to `0`. `n` must be an integer between
9 | 0 and 6 (inclusive). The mapping of `n` to cursor style is below:
10 |
11 | | n | style |
12 | | --- | --------------------- |
13 | | 0 | terminal default |
14 | | 1 | blinking block |
15 | | 2 | steady block |
16 | | 3 | blinking underline |
17 | | 4 | steady underline |
18 | | 5 | blinking vertical bar |
19 | | 6 | steady vertical bar |
20 |
21 | For `n = 0`, the terminal default is up to the terminal and is inconsistent
22 | across terminal implementations. The default may also be impacted by terminal
23 | configuration.
24 |
--------------------------------------------------------------------------------
/docs/vt/csi/decslrm.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Set Left and Right Margins (DECSLRM)
3 | description: Set the left and right margins.
4 | ---
5 |
6 |
7 |
8 | Sets the left and right margins, otherwise known as the scroll region.
9 | To learn more about scroll regions in general, see
10 | [Set Top and Bottom Margins](/docs/vt/csi/decstbm).
11 |
12 | Parameters `l` and `r` are integer values. If either value is zero the
13 | value will be reset to default values. The default value for `l` is `1`
14 | and the default value of `r` is the number of columns in the screen.
15 |
16 | Values `l` and `r` can be omitted. If either value is omitted, their
17 | default values will be used. Note that it is impossible to omit `l`
18 | and not omit `r`.
19 |
20 | This sequence requires [enable left and right margin (mode 69)](#TODO)
21 | to be set. If mode 69 is not set, this sequence does nothing and left
22 | and right margins will not be set.
23 |
24 | This sequence conflicts with [save cursor (`CSI s`)](#TODO). If
25 | mode 69 is disabled, save cursor will be invoked. If mode 69 is enabled,
26 | the `CSI s` save cursor sequence will be disabled, but save cursor is always
27 | also available as `ESC 7`.
28 |
29 | If left is larger or equal to right, this sequence does nothing. A
30 | scroll region must be at least two columns (`r` must be greater than `l`).
31 | The rest of this sequence description assumes valid values for `l` and `r`.
32 |
33 | This sequence unsets the pending wrap state and moves the cursor to
34 | the top-left of the screen. If [origin mode](#TODO) is set, the cursor is
35 | moved to the top-left of the scroll region.
36 |
37 | To reset the left and right margins, call this sequence with both values set to
38 | "0". This will force the default values for both `l` and `r` which is
39 | the full screen. Unsetting mode 69 will also reset the left and right margins.
40 |
41 | ## Validation
42 |
43 | ### DECSLRM V-1: Full Screen
44 |
45 | ```bash
46 | printf "\033[1;1H" # move to top-left
47 | printf "\033[0J" # clear screen
48 | printf "ABC\n"
49 | printf "DEF\n"
50 | printf "GHI\n"
51 | printf "\033[?69h" # enable left/right margins
52 | printf "\033[s" # scroll region left/right
53 | printf "\033[X"
54 | ```
55 |
56 | ```
57 | |cBC_____|
58 | |DEF_____|
59 | |GHI_____|
60 | ```
61 |
62 | ### DECSLRM V-2: Left Only
63 |
64 | ```bash
65 | printf "\033[1;1H" # move to top-left
66 | printf "\033[0J" # clear screen
67 | printf "ABC\n"
68 | printf "DEF\n"
69 | printf "GHI\n"
70 | printf "\033[?69h" # enable left/right margins
71 | printf "\033[2s" # scroll region left/right
72 | printf "\033[2G" # move cursor to column 2
73 | printf "\033[L"
74 | ```
75 |
76 | ```
77 | |Ac______|
78 | |DBC_____|
79 | |GEF_____|
80 | | HI_____|
81 | ```
82 |
83 | ### DECSLRM V-3: Left And Right
84 |
85 | ```bash
86 | printf "\033[1;1H" # move to top-left
87 | printf "\033[0J" # clear screen
88 | printf "ABC\n"
89 | printf "DEF\n"
90 | printf "GHI\n"
91 | printf "\033[?69h" # enable left/right margins
92 | printf "\033[1;2s" # scroll region left/right
93 | printf "\033[2G" # move cursor to column 2
94 | printf "\033[L"
95 | ```
96 |
97 | ```
98 | |_cC_____|
99 | |ABF_____|
100 | |DEI_____|
101 | |GH______|
102 | ```
103 |
104 | ### DECSLRM V-4: Left Equal to Right
105 |
106 | ```bash
107 | printf "\033[1;1H" # move to top-left
108 | printf "\033[0J" # clear screen
109 | printf "ABC\n"
110 | printf "DEF\n"
111 | printf "GHI\n"
112 | printf "\033[?69h" # enable left/right margins
113 | printf "\033[2;2s" # scroll region left/right
114 | printf "\033[X"
115 | ```
116 |
117 | ```
118 | |cBC_____|
119 | |DEF_____|
120 | |GHI_____|
121 | ```
122 |
--------------------------------------------------------------------------------
/docs/vt/csi/decstbm.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Set Top and Bottom Margins (DECSTBM)
3 | description: Set the top and bottom margins, otherwise known as the scroll region.
4 | ---
5 |
6 |
7 |
8 | Parameters `t` and `b` are integer values. If either value is zero the
9 | value will be reset to default values. The default value for `t` is `1`
10 | and the default value of `b` is the number of rows in the screen.
11 |
12 | Values `t` and `b` can be omitted. If either value is omitted, their
13 | default values will be used. Note that it is impossible to omit `t`
14 | and not omit `b`. The only valid sequences are `CSI t ; b r`,
15 | `CSI t r` and `CSI r`.
16 |
17 | If top is larger or equal to bottom, this sequence does nothing. A
18 | scroll region must be at least two rows (`b` must be greater than `t`).
19 | The rest of this sequence description assumes valid values for `t` and `b`.
20 |
21 | This sequence unsets the pending wrap state and moves the cursor to
22 | the top-left of the screen. If [origin mode](#TODO) is set, the cursor is
23 | moved to the top-left of the scroll region.
24 |
25 | To reset the scroll region, call this sequence with both values set to
26 | "0". This will force the default values for both `t` and `b` which is
27 | the full screen.
28 |
29 | The top and bottom margin constitute what is known as the _scroll region_.
30 | The scroll region impacts the operation of many sequences such as
31 | [insert line](/docs/vt/csi/il), [cursor down](/docs/vt/csi/cud), etc. Scroll regions are
32 | an effective and efficient way to constraint terminal modifications to a
33 | rectangular region of the screen.
34 |
35 | ## Validation
36 |
37 | ### DECSTBM V-1: Full Screen
38 |
39 | ```bash
40 | printf "\033[1;1H" # move to top-left
41 | printf "\033[0J" # clear screen
42 | printf "ABC\n"
43 | printf "DEF\n"
44 | printf "GHI\n"
45 | printf "\033[r" # scroll region top/bottom
46 | printf "\033[T"
47 | ```
48 |
49 | ```
50 | |c_______|
51 | |ABC_____|
52 | |DEF_____|
53 | |GHI_____|
54 | ```
55 |
56 | ### DECSTBM V-2: Top Only
57 |
58 | ```bash
59 | printf "\033[1;1H" # move to top-left
60 | printf "\033[0J" # clear screen
61 | printf "ABC\n"
62 | printf "DEF\n"
63 | printf "GHI\n"
64 | printf "\033[2r" # scroll region top/bottom
65 | printf "\033[T"
66 | ```
67 |
68 | ```
69 | |ABC_____|
70 | |________|
71 | |DEF_____|
72 | |GHI_____|
73 | ```
74 |
75 | ### DECSTBM V-3: Top and Bottom
76 |
77 | ```bash
78 | printf "\033[1;1H" # move to top-left
79 | printf "\033[0J" # clear screen
80 | printf "ABC\n"
81 | printf "DEF\n"
82 | printf "GHI\n"
83 | printf "\033[1;2r" # scroll region top/bottom
84 | printf "\033[T"
85 | ```
86 |
87 | ```
88 | |________|
89 | |ABC_____|
90 | |GHI_____|
91 | ```
92 |
93 | ### DECSTBM V-4: Top Equal to Bottom
94 |
95 | ```bash
96 | printf "\033[1;1H" # move to top-left
97 | printf "\033[0J" # clear screen
98 | printf "ABC\n"
99 | printf "DEF\n"
100 | printf "GHI\n"
101 | printf "\033[2;2r" # scroll region top/bottom
102 | printf "\033[T"
103 | ```
104 |
105 | ```
106 | |________|
107 | |ABC_____|
108 | |DEF_____|
109 | |GHI_____|
110 | ```
111 |
--------------------------------------------------------------------------------
/docs/vt/csi/dl.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Delete Line (DL)
3 | description: |-
4 | Deletes `n` lines at the current cursor position and shifts existing
5 | lines up.
6 | ---
7 |
8 |
9 |
10 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
11 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
12 |
13 | If the current cursor position is outside of the current scroll region,
14 | this sequence does nothing. The cursor is outside of the current scroll
15 | region if it is above the [top margin](#TODO), below the [bottom margin](#TODO),
16 | left of the [left margin](#TODO), or right of the [right margin](#TODO).
17 |
18 | This sequence unsets the pending wrap state.
19 |
20 | This sequence moves the cursor column to the left margin.
21 |
22 | Remove the top `n` lines of the current scroll region, and shift existing
23 | lines up. The space created at the bottom of the scroll region should be
24 | blank with the background color set according to the current SGR state.
25 |
26 | If a [left margin](#TODO) or [right margin](#TODO) is set, only the cells
27 | within and including the margins are deleted or shifted.
28 | Other existing contents to the left of the left margin or right of the
29 | right margin remains untouched.
30 |
31 | If a multi-cell character would be split, erase the full multi-cell
32 | character. For example, if "橋" is printed to the left of the left margin
33 | and shifting the line down as a result of DL would split the character,
34 | the cell should be erased.
35 |
36 | ## Validation
37 |
38 | ### DL V-1: Simple Delete Line
39 |
40 | ```bash
41 | printf "\033[1;1H" # move to top-left
42 | printf "\033[0J" # clear screen
43 | printf "ABC\n"
44 | printf "DEF\n"
45 | printf "GHI\n"
46 | printf "\033[2;2H"
47 | printf "\033[M"
48 | ```
49 |
50 | ```
51 | |ABC_____|
52 | |GHI_____|
53 | ```
54 |
55 | ### DL V-2: Cursor Outside of Scroll Region
56 |
57 | ```bash
58 | printf "\033[1;1H" # move to top-left
59 | printf "\033[0J" # clear screen
60 | printf "ABC\n"
61 | printf "DEF\n"
62 | printf "GHI\n"
63 | printf "\033[3;4r" # scroll region top/bottom
64 | printf "\033[2;2H"
65 | printf "\033[M"
66 | ```
67 |
68 | ```
69 | |ABC_____|
70 | |DEF_____|
71 | |GHI_____|
72 | ```
73 |
74 | ### DL V-3: Top/Bottom Scroll Regions
75 |
76 | ```bash
77 | printf "\033[1;1H" # move to top-left
78 | printf "\033[0J" # clear screen
79 | printf "ABC\n"
80 | printf "DEF\n"
81 | printf "GHI\n"
82 | printf "123\n"
83 | printf "\033[1;3r" # scroll region top/bottom
84 | printf "\033[2;2H"
85 | printf "\033[M"
86 | ```
87 |
88 | ```
89 | |ABC_____|
90 | |GHI_____|
91 | |________|
92 | |123_____|
93 | ```
94 |
95 | ### DL V-4: Left/Right Scroll Regions
96 |
97 | ```bash
98 | printf "\033[1;1H" # move to top-left
99 | printf "\033[0J" # clear screen
100 | printf "ABC123\n"
101 | printf "DEF456\n"
102 | printf "GHI789\n"
103 | printf "\033[?69h" # enable left/right margins
104 | printf "\033[2;4s" # scroll region left/right
105 | printf "\033[2;2H"
106 | printf "\033[M"
107 | ```
108 |
109 | ```
110 | |ABC123__|
111 | |DHI756__|
112 | |G___89__|
113 | ```
114 |
--------------------------------------------------------------------------------
/docs/vt/csi/dsr.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Device Status Report (DSR)
3 | description: Request information from the terminal.
4 | ---
5 |
6 |
7 |
8 | Request information from the terminal depending on the value of `n`.
9 |
10 | The possible valid values of `n` are described in the paragraphs below. If
11 | any other value of `n` is provided, this sequence does nothing.
12 |
13 | If `n = 5`, the _operating status_ is requested. The terminal responds
14 | to the program with `ESC [ 0 n` to indicate no malfunctions.
15 |
16 | If `n = 6`, the _cursor position_ is requested. The terminal responds to
17 | the program in the format `ESC [ y ; x R` where `y` is the row and `x`
18 | is the column, both one-indexed. If [origin mode (DEC Mode 6)](/vt/modes/origin)
19 | is enabled, the reported cursor position is relative to the top-left of the
20 | scroll region.
21 |
22 | ## Validation
23 |
24 | ### DSR V-1: Operating Status
25 |
26 | ```bash
27 | printf "\033[1;1H" # move to top-left
28 | printf "\033[0J" # clear screen
29 | printf "\033[5n"
30 | ```
31 |
32 | ```
33 | |^[[0n_____|
34 | ```
35 |
36 | ### DSR V-2: Cursor Position
37 |
38 | ```bash
39 | printf "\033[1;1H" # move to top-left
40 | printf "\033[0J" # clear screen
41 | printf "\033[2;4H" # move to top-left
42 | printf "\033[6n"
43 | ```
44 |
45 | ```
46 | ^[[2;4R
47 | ```
48 |
--------------------------------------------------------------------------------
/docs/vt/csi/ed.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Erase Display (ED)
3 | description: |-
4 | Erase display contents with behavior depending on the command `n`.
5 | ---
6 |
7 |
8 |
9 | If `n` is unset, the value of `n` is 0. The only valid values for `n` are
10 | 0, 1, 2, or 3. If any other value of `n` is given, do not execute this sequence.
11 | The remainder of the sequence documentation assumes a valid value of `n`.
12 |
13 | For all valid values of `n` except 3, this sequence unsets the pending wrap state.
14 | The cursor position will remain unchanged under all circumstances throughout
15 | this sequence.
16 |
17 | If [Select Character Selection Attribute (DECSCA)](#TODO) is enabled
18 | or was the most recently enabled protection mode on the currently active screen,
19 | protected attributes are ignored. Otherwise, protected attributes will be
20 | respected. For more details on this specific logic for protected attribute
21 | handling, see [Erase Character (ECH)](/docs/vt/csi/ech).
22 |
23 | For all operations, if a multi-cell character would be split, erase the full multi-cell
24 | character. For example, if "橋" is printed and the erase would only erase the
25 | first or second cell of the two-cell character, both cells should be erased.
26 |
27 | This sequence does not respect any scroll regions (top, bottom, left, or
28 | right). The boundaries of the operation are the full visible screen.
29 |
30 | If `n` is `0`, perform an **erase display below** operation. Erase all
31 | cells to the right and below the cursor. The background color of erased cells
32 | is colored according to the current SGR state.
33 |
34 | If `n` is `1`, perform an **erase display above** operation. Erase all
35 | cells to the left and above the cursor. The background color of erased cells
36 | is colored according to the current SGR state.
37 |
38 | If `n` is `2`, **erase the entire display**. This is the equivalent of
39 | erase above (`n = 1`) and erase below (`n = 0`) both being executed.
40 |
41 | If `n` is `3`, **erase only the scrollback region**. This does not affect
42 | the visible display of the screen and does not move the cursor. The scrollback
43 | region is the region of the terminal that is currently above the visible
44 | area of the screen when the screen is scrolled completely to the bottom.
45 |
46 | ## Validation
47 |
48 | ### ED V-1: Simple Erase Below
49 |
50 | ```bash
51 | printf "\033[1;1H" # move to top-left
52 | printf "\033[0J" # clear screen
53 | printf "ABC\n"
54 | printf "DEF\n"
55 | printf "GHI\n"
56 | printf "\033[2;2H"
57 | printf "\033[0J"
58 | ```
59 |
60 | ```
61 | |ABC_____|
62 | |Dc______|
63 | |________|
64 | ```
65 |
66 | ### ED V-2: Erase Below SGR State
67 |
68 | ```bash
69 | printf "\033[1;1H" # move to top-left
70 | printf "\033[0J" # clear screen
71 | printf "ABC\n"
72 | printf "DEF\n"
73 | printf "GHI\n"
74 | printf "\033[2;2H"
75 | printf "\033[41m"
76 | printf "\033[0J"
77 | ```
78 |
79 | ```
80 | |ABC_____|
81 | |Dc______|
82 | |________|
83 | ```
84 |
85 | All the cells right and below of the cursor should be colored red.
86 |
87 | ### ED V-3: Erase Below Multi-Cell Character
88 |
89 | ```bash
90 | printf "\033[1;1H" # move to top-left
91 | printf "\033[0J" # clear screen
92 | printf "AB橋C\n"
93 | printf "DE橋F\n"
94 | printf "GH橋I\n"
95 | printf "\033[2;4H"
96 | printf "\033[0J"
97 | ```
98 |
99 | ```
100 | |AB橋C___|
101 | |DE_c____|
102 | |________|
103 | ```
104 |
105 | ### ED V-4: Simple Erase Above
106 |
107 | ```bash
108 | printf "\033[1;1H" # move to top-left
109 | printf "\033[0J" # clear screen
110 | printf "ABC\n"
111 | printf "DEF\n"
112 | printf "GHI\n"
113 | printf "\033[2;2H"
114 | printf "\033[1J"
115 | ```
116 |
117 | ```
118 | |________|
119 | |_cF_____|
120 | |GHI_____|
121 | ```
122 |
123 | ### ED V-5: Simple Erase Complete
124 |
125 | ```bash
126 | printf "\033[1;1H" # move to top-left
127 | printf "\033[0J" # clear screen
128 | printf "ABC\n"
129 | printf "DEF\n"
130 | printf "GHI\n"
131 | printf "\033[2;2H"
132 | printf "\033[2J"
133 | ```
134 |
135 | ```
136 | |________|
137 | |_c______|
138 | |________|
139 | ```
140 |
--------------------------------------------------------------------------------
/docs/vt/csi/hpa.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Horizontal Position Absolute (HPA)
3 | description: Move the cursor to a specific column.
4 | ---
5 |
6 |
7 |
8 | This sequence performs [cursor position (CUP)](/docs/vt/csi/cup) with `x` set
9 | to the parameterized value and `y` set to the current cursor position.
10 | There is no additional or different behavior for using `HPA`.
11 |
12 | Because this invokes `CUP`, the cursor row (`x`) can change if it is
13 | outside the bounds of the `CUP` operation. For example, if
14 | [origin mode](#TODO) is set and the current cursor position is outside
15 | of the scroll region, the row will be adjusted.
16 |
--------------------------------------------------------------------------------
/docs/vt/csi/hpr.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Horizontal Position Relative (HPR)
3 | description: |-
4 | Move the cursor to a specific column relative to the current position.
5 | ---
6 |
7 |
8 |
9 | This sequence performs [cursor position (CUP)](/docs/vt/csi/cup) with `x` set
10 | to the current cursor column plus `x` and `y` set to the current cursor row.
11 | There is no additional or different behavior for using `HPR`.
12 |
13 | The parameter `x` must be an integer greater than or equal to 1. If `x` is less than
14 | or equal to 0, adjust `x` to be 1. If `x` is omitted, `x` defaults to 1.
15 |
16 | Because this invokes `CUP`, the cursor row (`y`) can change if it is
17 | outside the bounds of the `CUP` operation. For example, if
18 | [origin mode](#TODO) is set and the current cursor position is outside
19 | of the scroll region, the row will be adjusted.
20 |
--------------------------------------------------------------------------------
/docs/vt/csi/ich.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Insert Character (ICH)
3 | description: Insert blank characters at the current cursor position.
4 | ---
5 |
6 |
7 |
8 | Insert `n` blank characters at the current cursor position and shift
9 | existing cell contents right.
10 |
11 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
12 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
13 |
14 | This sequence always unsets the pending wrap state.
15 |
16 | If the cursor position is outside of the [left and right margins](#TODO),
17 | this sequence does not change the screen, but the pending wrap state is
18 | still reset.
19 |
20 | Existing cells shifted beyond the right margin are deleted. Inserted cells
21 | are blank with the background color colored according to the current SGR state.
22 |
23 | If a multi-cell character (such as "橋") is shifted so that the cell is split
24 | in half, the multi-cell character can either be clipped or erased. Typical
25 | behavior is to clip at the right edge of the screen and erase at a right
26 | margin, but either behavior is acceptable.
27 |
28 | ## Validation
29 |
30 | ### ICH V-1: No Scroll Region, Fits on Screen
31 |
32 | ```bash
33 | printf "ABC"
34 | printf "\033[1G"
35 | printf "\033[2@"
36 | printf "X"
37 | ```
38 |
39 | ```
40 | |XcABC_____|
41 | ```
42 |
43 | ### ICH V-2: SGR State
44 |
45 | ```bash
46 | printf "ABC"
47 | printf "\033[1G"
48 | printf "\033[41m"
49 | printf "\033[2@"
50 | printf "X"
51 | ```
52 |
53 | ```
54 | |c_ABC_____|
55 | ```
56 |
57 | The `c_` cells should both have a red background. The `ABC` cells should
58 | remain unchanged in style.
59 |
60 | ### ICH V-3: Shifting Content Off the Screen
61 |
62 | ```bash
63 | cols=$(tput cols)
64 | printf "\033[${cols}G"
65 | printf "\033[2D"
66 | printf "ABC"
67 | printf "\033[2D"
68 | printf "\033[2@"
69 | printf "X"
70 | ```
71 |
72 | ```
73 | |_______XcA|
74 | ```
75 |
76 | ### ICH V-4: Inside Left/Right Scroll Region
77 |
78 | ```bash
79 | printf "\033[1;1H" # move to top-left
80 | printf "\033[0J" # clear screen
81 | printf "\033[?69h" # enable left/right margins
82 | printf "\033[3;5s" # scroll region left/right
83 | printf "\033[3G"
84 | printf "ABC"
85 | printf "\033[3G"
86 | printf "\033[2@"
87 | printf "X"
88 | ```
89 |
90 | ```
91 | |__XcA_____|
92 | ```
93 |
94 | ### ICH V-5: Outside Left/Right Scroll Region
95 |
96 | ```bash
97 | printf "\033[1;1H" # move to top-left
98 | printf "\033[0J" # clear screen
99 | printf "\033[?69h" # enable left/right margins
100 | printf "\033[3;5s" # scroll region left/right
101 | printf "\033[3G"
102 | printf "ABC"
103 | printf "\033[1G"
104 | printf "\033[2@"
105 | printf "X"
106 | ```
107 |
108 | ```
109 | |XcABC_____|
110 | ```
111 |
112 | ### ICH V-6: Split Wide Character
113 |
114 | ```bash
115 | cols=$(tput cols)
116 | printf "\033[${cols}G"
117 | printf "\033[1D"
118 | printf "橋"
119 | printf "\033[2D"
120 | printf "\033[@"
121 | printf "X"
122 | ```
123 |
124 | ```
125 | |_______Xc_|
126 | ```
127 |
128 | In this case, it is valid for the last cell to be blank or to clip the
129 | multi-cell character. xterm clips the character but many other terminals
130 | erase the cell.
131 |
--------------------------------------------------------------------------------
/docs/vt/csi/il.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Insert Line (IL)
3 | description: Insert blank lines at the current cursor position.
4 | ---
5 |
6 |
7 |
8 | Inserts `n` lines at the current cursor position and shifts existing
9 | lines down.
10 |
11 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
12 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
13 |
14 | If the current cursor position is outside of the current scroll region,
15 | this sequence does nothing. The cursor is outside of the current scroll
16 | region if it is above the [top margin](#TODO), below the [bottom margin](#TODO),
17 | left of the [left margin](#TODO), or right of the [right margin](#TODO).
18 |
19 | This sequence unsets the pending wrap state.
20 |
21 | This sequence moves the cursor column to the left margin.
22 |
23 | From the current cursor row down `n` lines, insert blank lines colored
24 | with a background color according to the current SGR state. When a line is
25 | inserted, shift all existing content down one line. The bottommost row
26 | is the bottom margin. If content is shifted beyond the bottom margin,
27 | it is lost and the existing content beyond the bottom margin is preserved
28 | and not shifted.
29 |
30 | If a [left margin](#TODO) or [right margin](#TODO) is set, only the cells
31 | within and including the margins are blanked (when inserted) or shifted.
32 | Other existing contents to the left of the left margin or right of the
33 | right margin remains untouched.
34 |
35 | If a multi-cell character would be split, erase the full multi-cell
36 | character. For example, if "橋" is printed to the left of the left margin
37 | and shifting the line down as a result of IL would split the character,
38 | the cell should be erased.
39 |
40 | ## Validation
41 |
42 | ### IL V-1: Simple Insert Line
43 |
44 | ```bash
45 | printf "\033[1;1H" # move to top-left
46 | printf "\033[0J" # clear screen
47 | printf "ABC\n"
48 | printf "DEF\n"
49 | printf "GHI\n"
50 | printf "\033[2;2H"
51 | printf "\033[L"
52 | ```
53 |
54 | ```
55 | |ABC_____|
56 | |c_______|
57 | |DEF_____|
58 | |GHI_____|
59 | ```
60 |
61 | ### IL V-2: Cursor Outside of Scroll Region
62 |
63 | ```bash
64 | printf "\033[1;1H" # move to top-left
65 | printf "\033[0J" # clear screen
66 | printf "ABC\n"
67 | printf "DEF\n"
68 | printf "GHI\n"
69 | printf "\033[3;4r" # scroll region top/bottom
70 | printf "\033[2;2H"
71 | printf "\033[L"
72 | ```
73 |
74 | ```
75 | |ABC_____|
76 | |DEF_____|
77 | |GHI_____|
78 | ```
79 |
80 | ### IL V-3: Top/Bottom Scroll Regions
81 |
82 | ```bash
83 | printf "\033[1;1H" # move to top-left
84 | printf "\033[0J" # clear screen
85 | printf "ABC\n"
86 | printf "DEF\n"
87 | printf "GHI\n"
88 | printf "123\n"
89 | printf "\033[1;3r" # scroll region top/bottom
90 | printf "\033[2;2H"
91 | printf "\033[L"
92 | ```
93 |
94 | ```
95 | |ABC_____|
96 | |c_______|
97 | |DEF_____|
98 | |123_____|
99 | ```
100 |
101 | ### IL V-4: Left/Right Scroll Regions
102 |
103 | ```bash
104 | printf "\033[1;1H" # move to top-left
105 | printf "\033[0J" # clear screen
106 | printf "ABC123\n"
107 | printf "DEF456\n"
108 | printf "GHI789\n"
109 | printf "\033[?69h" # enable left/right margins
110 | printf "\033[2;4s" # scroll region left/right
111 | printf "\033[2;2H"
112 | printf "\033[L"
113 | ```
114 |
115 | ```
116 | |ABC123__|
117 | |Dc__56__|
118 | |GEF489__|
119 | |_HI7____|
120 | ```
121 |
--------------------------------------------------------------------------------
/docs/vt/csi/rep.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Repeat Previous Character (REP)
3 | description: Repeat the previously printed character `n` times.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
9 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
10 |
11 | In xterm, only characters with single byte (less than decimal 256) are
12 | supported. In most other mainstream terminals, any character is supported.
13 |
14 | Each repeated character behaves identically to if it was manually typed in.
15 | Therefore, soft-wrapping, margins, etc. all behave the same as if the
16 | character was typed.
17 |
18 | The previously printed character is any character that is printed through
19 | any means. The previously printed character is not limited to characters
20 | a user manually types. If there is no previously typed character, this sequence
21 | does nothing.
22 |
23 | ## Validation
24 |
25 | ### REP V-1: Simple Usage
26 |
27 | ```bash
28 | printf "\033[1;1H" # move to top-left
29 | printf "\033[0J" # clear screen
30 | printf "A"
31 | printf "\033[b"
32 | ```
33 |
34 | ```
35 | |AAc_______|
36 | ```
37 |
38 | ### REP V-2: Soft-Wrap
39 |
40 | ```bash
41 | cols=$(tput cols)
42 | printf "\033[1;1H" # move to top-left
43 | printf "\033[0J" # clear screen
44 | printf "\033[${cols}G"
45 | printf "A"
46 | printf "\033[b"
47 | ```
48 |
49 | ```
50 | |_________A|
51 | |Ac________|
52 | ```
53 |
--------------------------------------------------------------------------------
/docs/vt/csi/sd.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Scroll Down (SD)
3 | description: |-
4 | Insert `n` lines at the top of the scroll region and
5 | shift existing lines down.
6 | ---
7 |
8 |
9 |
10 | This sequence is functionally identical to
11 | [Insert Line (IL)](/docs/vt/csi/il) with the cursor position set to the top of
12 | the scroll region. The cursor position after the operation must be unchanged
13 | from when SD was invoked.
14 |
15 | This sequence unsets the pending wrap state.
16 |
17 | ## Validation
18 |
19 | ### SD V-1: Outside of Top/Bottom Scroll Region
20 |
21 | ```bash
22 | printf "\033[1;1H" # move to top-left
23 | printf "\033[0J" # clear screen
24 | printf "ABC\n"
25 | printf "DEF\n"
26 | printf "GHI\n"
27 | printf "\033[3;4r" # scroll region top/bottom
28 | printf "\033[2;2H"
29 | printf "\033[T"
30 | ```
31 |
32 | ```
33 | |ABC_____|
34 | |DEF_____|
35 | |________|
36 | |GHI_____|
37 | ```
38 |
--------------------------------------------------------------------------------
/docs/vt/csi/su.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Scroll Up (SU)
3 | description: |-
4 | Remove `n` lines from the top of the scroll region and shift existing
5 | lines up.
6 | ---
7 |
8 |
9 |
10 | The parameter `n` must be an integer greater than or equal to 1. If `n` is less than
11 | or equal to 0, adjust `n` to be 1. If `n` is omitted, `n` defaults to 1.
12 |
13 | This sequence executes [Delete Line (DL)](/docs/vt/csi/dl) with the cursor position
14 | set to the top of the scroll region. There are some differences from DL
15 | which are explained below.
16 |
17 | The cursor position after the operation must be unchanged from when SU was
18 | invoked. The pending wrap state is _not_ reset.
19 |
20 | ## Validation
21 |
22 | ### SU V-1: Simple Usage
23 |
24 | ```bash
25 | printf "\033[1;1H" # move to top-left
26 | printf "\033[0J" # clear screen
27 | printf "ABC\n"
28 | printf "DEF\n"
29 | printf "GHI\n"
30 | printf "\033[2;2H"
31 | printf "\033[S"
32 | ```
33 |
34 | ```
35 | |DEF_____|
36 | |GHI_____|
37 | ```
38 |
39 | ### SU V-2: Top/Bottom Scroll Region
40 |
41 | ```bash
42 | printf "\033[1;1H" # move to top-left
43 | printf "\033[0J" # clear screen
44 | printf "ABC\n"
45 | printf "DEF\n"
46 | printf "GHI\n"
47 | printf "\033[2;3r" # scroll region top/bottom
48 | printf "\033[1;1H"
49 | printf "\033[S"
50 | ```
51 |
52 | ```
53 | |ABC_____|
54 | |GHI_____|
55 | ```
56 |
57 | ### SU V-3: Left/Right Scroll Regions
58 |
59 | ```bash
60 | printf "\033[1;1H" # move to top-left
61 | printf "\033[0J" # clear screen
62 | printf "ABC123\n"
63 | printf "DEF456\n"
64 | printf "GHI789\n"
65 | printf "\033[?69h" # enable left/right margins
66 | printf "\033[2;4s" # scroll region left/right
67 | printf "\033[2;2H"
68 | printf "\033[S"
69 | ```
70 |
71 | ```
72 | |AEF423__|
73 | |DHI756__|
74 | |G___89__|
75 | ```
76 |
77 | ### SU V-4: Preserves Pending Wrap
78 |
79 | ```bash
80 | cols=$(tput cols)
81 | printf "\033[1;${cols}H" # move to top-right
82 | printf "\033[2J" # clear screen
83 | printf "A"
84 | printf "\033[2;${cols}H"
85 | printf "B"
86 | printf "\033[3;${cols}H"
87 | printf "C"
88 | printf "\033[S"
89 | printf "X"
90 | ```
91 |
92 | ```
93 | |_______B|
94 | |_______C|
95 | |________|
96 | |X_______|
97 | ```
98 |
99 | ### SU V-5: Scroll Full Top/Bottom Scroll Region
100 |
101 | ```bash
102 | printf "\033[1;1H" # move to top-left
103 | printf "\033[0J" # clear screen
104 | printf "top"
105 | printf "\033[5;1H"
106 | printf "ABCDEF"
107 | printf "\033[2;5r" # scroll region top/bottom
108 | printf "\033[4S"
109 | ```
110 |
111 | ```
112 | |top_____|
113 | ```
114 |
--------------------------------------------------------------------------------
/docs/vt/csi/tbc.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Tab Clear (TBC)
3 | description: Clear one or all tab stops.
4 | ---
5 |
6 |
7 |
8 | The parameter `n` must be `0` or `3`. If `n` is omitted, `n` defaults to `0`.
9 |
10 | If the parameter `n` is `0`, the cursor column position is marked as
11 | not a tab stop. If the column was already not a tab stop, this does nothing.
12 |
13 | If the parameter `n` is `3`, all tab stops are cleared.
14 |
15 | ## Validation
16 |
17 | ### TBC V-1: Tab Clear Single
18 |
19 | ```bash
20 | printf "\033[1;1H" # move to top-left
21 | printf "\033[0J" # clear screen
22 | printf "\033[?5W" # reset tabs
23 | printf "\t"
24 | printf "\033[g"
25 | printf "\033[1G"
26 | printf "\t"
27 | ```
28 |
29 | ```
30 | |_______________c_______|
31 | ```
32 |
33 | ### TBC V-3: Clear All Tabstops
34 |
35 | ```bash
36 | printf "\033[1;1H" # move to top-left
37 | printf "\033[0J" # clear screen
38 | printf "\033[?5W" # reset tabs
39 | printf "\033[3g"
40 | printf "\033[1G"
41 | printf "\t"
42 | ```
43 |
44 | ```
45 | |______________________c|
46 | ```
47 |
--------------------------------------------------------------------------------
/docs/vt/csi/vpa.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Vertical Position Absolute (VPA)
3 | description: Move the cursor to a specific row.
4 | ---
5 |
6 |
7 |
8 | This sequence performs [cursor position (CUP)](/docs/vt/csi/cup) with `y` set
9 | to the parameterized value and `x` set to the current cursor position.
10 | There is no additional or different behavior for using `VPA`.
11 |
12 | Because this invokes `CUP`, the cursor column (`y`) can change if it is
13 | outside the bounds of the `CUP` operation. For example, if
14 | [origin mode](#TODO) is set and the current cursor position is outside
15 | of the scroll region, the column will be adjusted.
16 |
--------------------------------------------------------------------------------
/docs/vt/csi/vpr.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Vertical Position Relative (VPR)
3 | description: |-
4 | Move the cursor to a specific row relative to the current position.
5 | ---
6 |
7 |
8 |
9 | This sequence performs [cursor position (CUP)](/docs/vt/csi/cup) with `y` set
10 | to the current cursor row plus `y` and `x` set to the current cursor column.
11 | There is no additional or different behavior for using `VPR`.
12 |
13 | The parameter `y` must be an integer greater than or equal to 1. If `y` is less than
14 | or equal to 0, adjust `y` to be 1. If `y` is omitted, `y` defaults to 1.
15 |
16 | Because this invokes `CUP`, the cursor column (`x`) can change if it is
17 | outside the bounds of the `CUP` operation. For example, if
18 | [origin mode](#TODO) is set and the current cursor position is outside
19 | of the scroll region, the column will be adjusted.
20 |
--------------------------------------------------------------------------------
/docs/vt/csi/xtshiftescape.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Set Shift-Escape (XTSHIFTESCAPE)
3 | description: |-
4 | Configure whether mouse reports are allowed to capture
5 | the `shift` modifier.
6 | ---
7 |
8 | ", "Pn", "s"]} />
9 |
10 | The parameter `n` must be an integer equal to 0 or 1. If `n` is omitted,
11 | `n` defaults to 0. If `n` is an invalid value, this sequence does nothing.
12 |
13 | When a terminal program requests [mouse reporting](#TODO), some mouse
14 | reporting modes also report the modifier keys that are pressed (control, shift,
15 | etc.). This would disable the ability for a terminal user to natively select
16 | text if they typically select text using left-click and drag, since the
17 | left-click event is captured by the running program.
18 |
19 | To get around this limitation, many terminal emulators (including xterm)
20 | use the `shift` modifier to disable mouse reporting temporarily, allowing
21 | native text selection to work. In this scenario, however, the running
22 | terminal program cannot detect shift-clicks because the terminal emulator
23 | captures the event.
24 |
25 | This sequence (`XTSHIFTESCAPE`) allows configuring this behavior. If
26 | `n` is `0`, the terminal is allowed to override the shift key and not pass
27 | it through to the terminal program. If `n` is `1`, the terminal program
28 | is requesting that the shift modifier is sent using standard mouse
29 | reporting formats.
30 |
31 | In either case, the terminal emulator is not forced to respect this request.
32 | For example, `xterm` has a `never` and `always` terminal configuration
33 | to never allow terminal programs to capture shift or to always allow them,
34 | respectively. If either of these configurations are set, `XTSHIFTESCAPE`
35 | has zero effect.
36 |
37 | `xterm` also has `false` and `true` terminal configurations. In the `false`
38 | scenario, the terminal emulator will override `shift` (not allow the terminal
39 | program to see it) _unless it is explicitly requested_ via `XTSHIFTESCAPE`.
40 | The `true` scenario is the exact opposite: pass the shift modifier through
41 | to the running terminal program unless the terminal program explicitly states
42 | it doesn't need to know about it (`n = 0`).
43 |
--------------------------------------------------------------------------------
/docs/vt/esc/decaln.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Screen Alignment Test (DECALN)
3 | description: |-
4 | Reset margins, move cursor to the top left, and fill the screen with `E`.
5 | ---
6 |
7 |
8 |
9 | Reset the top, bottom, left, and right margins and unset [origin mode](#TODO).
10 | The cursor is moved to the top-left corner of the screen.
11 |
12 | All stylistic SGR attributes are unset, such as bold, blink, etc.
13 | SGR foreground and background colors are preserved.
14 | The [protected attribute](#TODO) is not unset.
15 |
16 | The entire screen is filled with the character `E`. The letter `E` ignores
17 | the current SGR settings and is written with no styling.
18 |
19 | ## Validation
20 |
21 | ### DECALN V-1: Simple Usage
22 |
23 | ```bash
24 | printf "\033#8"
25 | ```
26 |
27 | ```
28 | |EEEEEEEE|
29 | |EEEEEEEE|
30 | |EEEEEEEE|
31 | ```
32 |
33 | ### DECALN V-2: Reset Margins
34 |
35 | ```bash
36 | printf "\033[2;3r" # scroll region top/bottom
37 | printf "\033#8"
38 | printf "\033[T"
39 | ```
40 |
41 | ```
42 | |c_______|
43 | |EEEEEEEE|
44 | |EEEEEEEE|
45 | ```
46 |
--------------------------------------------------------------------------------
/docs/vt/esc/deckpam.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Keypad Application Mode (DECKPAM)
3 | description: Set the numeric keypad to application mode.
4 | ---
5 |
6 |
7 |
8 | Set the numeric keypad to application mode.
9 |
10 | This page is a work-in-progress.
11 |
--------------------------------------------------------------------------------
/docs/vt/esc/deckpnm.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Keypad Numeric Mode (DECKPNM)
3 | description: Set the numeric keypad to numeric mode.
4 | ---
5 |
6 | "]} />
7 |
8 | Set the numeric keypad to numeric mode.
9 |
--------------------------------------------------------------------------------
/docs/vt/esc/decrc.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Restore Cursor (DECRC)
3 | description: Restore the cursor-related state saved via Save Cursor (DECSC).
4 | ---
5 |
6 |
7 |
8 | If a cursor was never previously saved, this sets all the typically saved
9 | values to their default values.
10 |
11 | ## Validation
12 |
13 | Validation is shared with [Save Cursor (DECSC)](/docs/vt/esc/decsc).
14 |
--------------------------------------------------------------------------------
/docs/vt/esc/decsc.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Save Cursor (DECSC)
3 | description: |-
4 | Save various cursor-related state that can be restored with
5 | Restore Cursor (DECRC).
6 | ---
7 |
8 |
9 |
10 | The following attributes are saved:
11 |
12 | - Cursor row and column in absolute screen coordinates
13 | - Character sets
14 | - Pending wrap state
15 | - SGR attributes
16 | - [Origin mode (DEC Mode 6)](/vt/modes/origin)
17 |
18 | Only one cursor can be saved at any time. If save cursor is repeated, the
19 | previously save cursor is overwritten.
20 |
21 | Primary and alternate screens have separate saved cursor state. A cursor
22 | saved on the primary screen is inaccessible from the alternate screen
23 | and vice versa.
24 |
25 | ## Validation
26 |
27 | ### SC V-1: Cursor Position
28 |
29 | ```bash
30 | printf "\033[1;1H" # move to top-left
31 | printf "\033[0J" # clear screen
32 | printf "\033[1;5H"
33 | printf "A"
34 | printf "\0337" # Save Cursor
35 | printf "\033[1;1H"
36 | printf "B"
37 | printf "\0338" # Restore Cursor
38 | printf "X"
39 | ```
40 |
41 | ```
42 | |B___AX____|
43 | ```
44 |
45 | ### SC V-2: Pending Wrap State
46 |
47 | ```bash
48 | cols=$(tput cols)
49 | printf "\033[1;1H" # move to top-left
50 | printf "\033[0J" # clear screen
51 | printf "\033[${cols}G"
52 | printf "A"
53 | printf "\0337" # Save Cursor
54 | printf "\033[1;1H"
55 | printf "B"
56 | printf "\0338" # Restore Cursor
57 | printf "X"
58 | ```
59 |
60 | ```
61 | |B________A|
62 | |X_________|
63 | ```
64 |
65 | ### SC V-3: SGR Attributes
66 |
67 | ```bash
68 | printf "\033[1;1H" # move to top-left
69 | printf "\033[0J" # clear screen
70 | printf "\033[1;4;33;44m"
71 | printf "A"
72 | printf "\0337" # Save Cursor
73 | printf "\033[0m"
74 | printf "B"
75 | printf "\0338" # Restore Cursor
76 | printf "X"
77 | ```
78 |
79 | ```
80 | |AX________|
81 | ```
82 |
83 | The "A" and "X" should have identical styling.
84 |
--------------------------------------------------------------------------------
/docs/vt/esc/ind.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Index (IND)
3 | description: Move the cursor down one cell, scrolling if necessary.
4 | ---
5 |
6 |
7 |
8 | This sequence always unsets the pending wrap state.
9 |
10 | If the cursor is exactly on the bottom margin and is at or within the
11 | [left](#TODO) and [right margin](#TODO), [scroll up](#TODO) one line.
12 | If the scroll region is the full terminal screen and the terminal is on
13 | the [primary screen](#TODO), this may create scrollback. See the
14 | [scroll](#TODO) documentation for more details.
15 |
16 | If the cursor is outside of the scroll region or not on the bottom
17 | margin of the scroll region, perform the [cursor down](/docs/vt/csi/cud) operation with
18 | `n = 1`.
19 |
20 | This sequence will only scroll when the cursor is exactly on the bottom
21 | margin and within the remaining scroll region. If the cursor is outside
22 | the scroll region and on the bottom line of the terminal, the cursor
23 | does not move.
24 |
25 | ## Validation
26 |
27 | ### IND V-1: No Scroll Region, Top of Screen
28 |
29 | ```bash
30 | printf "\033[1;1H" # move to top-left
31 | printf "\033[0J" # clear screen
32 | printf "A"
33 | printf "\033D" # index
34 | printf "X"
35 | ```
36 |
37 | ```
38 | |A_________|
39 | |_Xc_______|
40 | ```
41 |
42 | ### IND V-2: Bottom of Primary Screen
43 |
44 | ```bash
45 | lines=$(tput lines)
46 | printf "\033[1;1H" # move to top-left
47 | printf "\033[0J" # clear screen
48 | printf "\033[${lines};1H" # move to bottom-left
49 | printf "A"
50 | printf "\033D" # index
51 | printf "X"
52 | ```
53 |
54 | ```
55 | |A_________|
56 | |_Xc_______|
57 | ```
58 |
59 | ### IND V-3: Inside Scroll Region
60 |
61 | ```bash
62 | printf "\033[1;1H" # move to top-left
63 | printf "\033[0J" # clear screen
64 | printf "\033[1;3r" # scroll region
65 | printf "A"
66 | printf "\033D" # index
67 | printf "X"
68 | ```
69 |
70 | ```
71 | |A_________|
72 | |_Xc_______|
73 | ```
74 |
75 | ### IND V-4: Bottom of Scroll Region
76 |
77 | ```bash
78 | printf "\033[1;1H" # move to top-left
79 | printf "\033[0J" # clear screen
80 | printf "\033[1;3r" # scroll region
81 | printf "\033[4;1H" # below scroll region
82 | printf "B"
83 | printf "\033[3;1H" # move to last row of region
84 | printf "A"
85 | printf "\033D" # index
86 | printf "X"
87 | ```
88 |
89 | ```
90 | |__________|
91 | |A_________|
92 | |_Xc_______|
93 | |B_________|
94 | ```
95 |
96 | ### IND V-5: Bottom of Primary Screen with Scroll Region
97 |
98 | ```bash
99 | lines=$(tput lines)
100 | printf "\033[1;1H" # move to top-left
101 | printf "\033[0J" # clear screen
102 | printf "\033[1;3r" # scroll region
103 | printf "\033[3;1H" # move to last row of region
104 | printf "A"
105 | printf "\033[${lines};1H" # move to bottom-left
106 | printf "\033D" # index
107 | printf "X"
108 | ```
109 |
110 | ```
111 | |__________|
112 | |__________|
113 | |A_________|
114 | |__________|
115 | |Xc________|
116 | ```
117 |
118 | ### IND V-6: Outside of Left/Right Scroll Region
119 |
120 | ```bash
121 | printf "\033[1;1H" # move to top-left
122 | printf "\033[0J" # clear screen
123 | printf "\033[?69h" # enable left/right margins
124 | printf "\033[1;3r" # scroll region top/bottom
125 | printf "\033[3;5s" # scroll region left/right
126 | printf "\033[3;3H"
127 | printf "A"
128 | printf "\033[3;1H"
129 | printf "\033D" # index
130 | printf "X"
131 | ```
132 |
133 | ```
134 | |__________|
135 | |__________|
136 | |XcA_______|
137 | ```
138 |
139 | ### IND V-7: Inside of Left/Right Scroll Region
140 |
141 | ```bash
142 | printf "\033[1;1H" # move to top-left
143 | printf "\033[0J" # clear screen
144 | printf "AAAAAA\n"
145 | printf "AAAAAA\n"
146 | printf "AAAAAA"
147 | printf "\033[?69h" # enable left/right margins
148 | printf "\033[1;3s" # set scroll region left/right
149 | printf "\033[1;3r" # set scroll region top/bottom
150 | printf "\033[3;1H" # Move to bottom left
151 | printf "\033D" # index
152 | ```
153 |
154 | ```
155 | |AAAAAA____|
156 | |AAAAAA____|
157 | |c__AAA____|
158 | ```
159 |
--------------------------------------------------------------------------------
/docs/vt/esc/ri.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Reverse Index (RI)
3 | description: Move the cursor up one cell, scrolling if necessary.
4 | ---
5 |
6 |
7 |
8 | This sequence does not unset the pending wrap state.
9 |
10 | If the cursor is exactly on the [top margin](/docs/vt/csi/decstbm) and is within
11 | [left and right margins](/docs/vt/csi/decslrm), invoke [scroll down (SD)](/docs/vt/csi/sd)
12 | with `n = 1`. The operation is complete.
13 |
14 | Otherwise, scrolling isn't necessary. Perform a
15 | [cursor up](/docs/vt/csi/cuu) operation with `n = 1`.
16 |
17 | ## Validation
18 |
19 | ### RI V-1: No Scroll Region, Top of Screen
20 |
21 | ```bash
22 | printf "\033[1;1H" # move to top-left
23 | printf "\033[0J" # clear screen
24 | printf "A\n"
25 | printf "B\n"
26 | printf "C\n"
27 | printf "\033[1;1H" # move to top-left
28 | printf "\033M" # reverse index
29 | printf "X"
30 | ```
31 |
32 | ```
33 | |Xc________|
34 | |A_________|
35 | |B_________|
36 | |C_________|
37 | ```
38 |
39 | ### RI V-2: No Scroll Region, Not Top of Screen
40 |
41 | ```bash
42 | printf "\033[1;1H" # move to top-left
43 | printf "\033[0J" # clear screen
44 | printf "A\n"
45 | printf "B\n"
46 | printf "C\n"
47 | printf "\033[2;1H"
48 | printf "\033M" # reverse index
49 | printf "X"
50 | ```
51 |
52 | ```
53 | |Xc________|
54 | |B_________|
55 | |C_________|
56 | ```
57 |
58 | ### RI V-3: Top/Bottom Scroll Region
59 |
60 | ```bash
61 | printf "\033[1;1H" # move to top-left
62 | printf "\033[0J" # clear screen
63 | printf "A\n"
64 | printf "B\n"
65 | printf "C\n"
66 | printf "\033[2;3r" # scroll region
67 | printf "\033[2;1H"
68 | printf "\033M" # reverse index
69 | ```
70 |
71 | ```
72 | |A_________|
73 | |c_________|
74 | |B_________|
75 | ```
76 |
77 | ### RI V-4: Outside of Top/Bottom Scroll Region
78 |
79 | ```bash
80 | printf "\033[1;1H" # move to top-left
81 | printf "\033[0J" # clear screen
82 | printf "A\n"
83 | printf "B\n"
84 | printf "C\n"
85 | printf "\033[2;3r" # scroll region
86 | printf "\033[1;1H"
87 | printf "\033M" # reverse index
88 | ```
89 |
90 | ```
91 | |A_________|
92 | |B_________|
93 | |C_________|
94 | ```
95 |
96 | ### RI V-5: Left/Right Scroll Region
97 |
98 | ```bash
99 | printf "\033[1;1H" # move to top-left
100 | printf "\033[0J" # clear screen
101 | printf "ABC\n"
102 | printf "DEF\n"
103 | printf "GHI\n"
104 | printf "\033[?69h" # enable left/right margins
105 | printf "\033[2;3s" # scroll region left/right
106 | printf "\033[1;2H"
107 | printf "\033M"
108 | ```
109 |
110 | ```
111 | |A_________|
112 | |DBC_______|
113 | |GEF_______|
114 | |_HI_______|
115 | ```
116 |
117 | ### RI V-6: Outside Left/Right Scroll Region
118 |
119 | ```bash
120 | printf "\033[1;1H" # move to top-left
121 | printf "\033[0J" # clear screen
122 | printf "ABC\n"
123 | printf "DEF\n"
124 | printf "GHI\n"
125 | printf "\033[?69h" # enable left/right margins
126 | printf "\033[2;3s" # scroll region left/right
127 | printf "\033[2;1H"
128 | printf "\033M"
129 | ```
130 |
131 | ```
132 | |ABC_______|
133 | |DEF_______|
134 | |GHI_______|
135 | ```
136 |
137 | Cursor on the `A`.
138 |
--------------------------------------------------------------------------------
/docs/vt/esc/ris.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Full Reset (RIS)
3 | description: Reset the terminal to its initial state.
4 | ---
5 |
6 |
7 |
8 | The full reset operation does the following:
9 |
10 | - Set the cursor shape to the default
11 | - Reset the scroll region to the full screen
12 | - Disable [left and right margin mode (mode 69)](#TODO)
13 | - Disable [origin mode (mode 6)](#TODO)
14 | - Unset cursor foreground and background colors
15 | - Reset charsets to the default
16 | - Reset [cursor key mode (DECCKM)](#TODO)
17 | - Reset [disable keyboard input (KAM)](#TODO)
18 | - Reset [application keypad mode](/docs/vt/esc/deckpnm)
19 | - Reset xterm keyboard modifier state to the default
20 | - Disable cursor [protected attribute](#TODO)
21 | - Disable any [protected area](#TODO)
22 | - Reset all [mouse tracking modes](#TODO)
23 | - Reset tabstops to default
24 | - Enable [send-receive mode (mode 12)](#TODO)
25 | - Reset [backspace sends delete (mode 67)](#TODO)
26 | - Return to the primary screen and clear it
27 | - Move the cursor to the top-left corner
28 | - Reset the pending wrap state
29 | - Reset saved cursor state
30 |
--------------------------------------------------------------------------------
/docs/vt/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Terminal API (VT)
3 | description: |-
4 | APIs for developers writing applications that run in Ghostty.
5 | ---
6 |
7 | Programs running in terminals use **control sequences** to interact with the
8 | terminal. Control sequences are a series of special characters that the terminal
9 | interprets as commands. This is sometimes referred as **VT sequences** or
10 | **escape codes**.
11 |
12 | For a full list of supported sequences, see the
13 | [reference](/docs/vt/reference). For a conceptual overview
14 | of control sequences, see the [concepts page](/docs/vt/concepts/sequences).
15 | The current page will give an overview of Ghostty's control
16 | sequence support.
17 |
18 |
19 |
--------------------------------------------------------------------------------
/docs/vt/reference.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: VT Sequence Reference
3 | description: A reference of all VT sequences supported by Ghostty.
4 | ---
5 |
6 | This page lists many of the VT sequences that Ghostty supports.
7 |
8 | This page is a work-in-progress. Ghostty supports many more sequences
9 | than are listed here and for the sequences listed here the quality
10 | of the linked documentation varies. This is a very contributor
11 | friendly area to help improve the documentation!
12 |
13 | They are currently grouped by sequence type (control, esc, CSI, etc.)
14 | and the listed alphabetically by syntax. In the future, we will
15 | introduce better organization and search capabilities.
16 |
17 | | Name | Syntax | Description |
18 | |------|------|-------------|
19 | | [BEL](/docs/vt/control/bel) | `0x07` | Alert the user (beep) |
20 | | [BS](/docs/vt/control/bs) | `0x08` | Move cursor backward one position |
21 | | [TAB](/docs/vt/control/tab) | `0x09` | Move cursor right to the next tab stop |
22 | | [LF](/docs/vt/control/lf) | `0x0A` | Move cursor down one line, scrolling if necessary |
23 | | [CR](/docs/vt/control/cr) | `0x0D` | Move cursor to the left margin |
24 | | [DECSC](/docs/vt/esc/decsc) | `ESC 7` | Save cursor |
25 | | [DECRC](/docs/vt/esc/decrc) | `ESC 8` | Restore cursor |
26 | | [IND](/docs/vt/esc/ind) | `ESC D` | Move cursor down, scrolling if necessary |
27 | | [RI](/docs/vt/esc/ri) | `ESC M` | Move cursor up, scrolling if necessary |
28 | | [RIS](/docs/vt/esc/ris) | `ESC c` | Full reset |
29 | | [DECSCUSR](/docs/vt/csi/decscusr) | `CSI Pn " " q` | Set cursor style |
30 | | [DECKPAM](/docs/vt/esc/deckpam) | `ESC =` | Set numeric keypad to application mode |
31 | | [DECKPNM](/docs/vt/esc/deckpnm) | `ESC >` | Set numeric keypad to numeric mode |
32 | | [DECALN](/docs/vt/esc/decaln) | `ESC # 8` | Screen alignment test |
33 | | [CUU](/docs/vt/csi/cuu) | `CSI Pn A` | Move cursor up |
34 | | [CUD](/docs/vt/csi/cud) | `CSI Pn B` | Move cursor down |
35 | | [CUF](/docs/vt/csi/cuf) | `CSI Pn C` | Move cursor right |
36 | | [CUB](/docs/vt/csi/cub) | `CSI Pn D` | Move cursor left |
37 | | [CNL](/docs/vt/csi/cnl) | `CSI Pn E` | Move cursor down `n` lines and to the leftmost column |
38 | | [CPL](/docs/vt/csi/cpl) | `CSI Pn F` | Move cursor up `n` lines and to the leftmost column |
39 | | [CUP](/docs/vt/csi/cup) | `CSI Py ; Px H` | Move cursor to the specified row and column |
40 | | [CHT](/docs/vt/csi/cht) | `CSI Pn I` | Move cursor right `n` tabs |
41 | | [ED](/docs/vt/csi/ed) | `CSI Pn J` | Erase display |
42 | | [EL](/docs/vt/csi/el) | `CSI Pn K` | Erase line |
43 | | [DL](/docs/vt/csi/dl) | `CSI Pn M` | Delete `n` lines at the cursor |
44 | | [IL](/docs/vt/csi/il) | `CSI Pn L` | Insert `n` lines at the cursor |
45 | | [DCH](/docs/vt/csi/dch) | `CSI Pn P` | Delete `n` characters at the cursor |
46 | | [SU](/docs/vt/csi/su) | `CSI Pn S` | Scroll up `n` lines |
47 | | [SD](/docs/vt/csi/sd) | `CSI Pn T` | Scroll down `n` lines |
48 | | [ECH](/docs/vt/csi/ech) | `CSI Pn X` | Erase `n` characters at the cursor |
49 | | [CBT](/docs/vt/csi/cbt) | `CSI Pn Z` | Move cursor left `n` tabs |
50 | | [HPR](/docs/vt/csi/hpr) | `CSI Pn a` | Move cursor to a column relative to the cursor |
51 | | [REP](/docs/vt/csi/rep) | `CSI Pn b` | Repeat the preceding character `n` times |
52 | | [VPA](/docs/vt/csi/vpa) | `CSI Py d` | Move cursor to the specified row |
53 | | [VPR](/docs/vt/csi/vpr) | `CSI Pn e` | Move cursor down `n` rows relative to the cursor |
54 | | [TBC](/docs/vt/csi/tbc) | `CSI Pn g` | Clear one or all tab stops |
55 | | [DSR](/docs/vt/csi/dsr) | `CSI Pn n` | Device status report |
56 | | [DECSTBM](/docs/vt/csi/decstbm) | `CSI Pt ; Pb r` | Set top and bottom margins |
57 | | [DECSLRM](/docs/vt/csi/decslrm) | `CSI Pl ; Pr s` | Set left and right margins |
58 | | [ICH](/docs/vt/csi/ich) | `CSI Pn @` | Insert `n` characters at the cursor |
59 | | [HPA](/docs/vt/csi/hpa) | `CSI Px ` ` | Move cursor to the specified column |
60 | | [XTSHIFTESCAPE](/docs/vt/csi/xtshiftescape) | `CSI > Pn s` | Configure `shift` modifier behavior with mouse reports |
61 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "flake-utils": {
4 | "inputs": {
5 | "systems": "systems"
6 | },
7 | "locked": {
8 | "lastModified": 1731533236,
9 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
10 | "owner": "numtide",
11 | "repo": "flake-utils",
12 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
13 | "type": "github"
14 | },
15 | "original": {
16 | "owner": "numtide",
17 | "repo": "flake-utils",
18 | "type": "github"
19 | }
20 | },
21 | "nixpkgs": {
22 | "locked": {
23 | "lastModified": 1734449207,
24 | "narHash": "sha256-/OYWCU/MMrx/OKRdV3VojgtQtmlexkgwh+o/jCPRLNE=",
25 | "owner": "nixos",
26 | "repo": "nixpkgs",
27 | "rev": "3716288b1d6e3063a61634d2a596d069157eb1d7",
28 | "type": "github"
29 | },
30 | "original": {
31 | "owner": "nixos",
32 | "ref": "release-24.11",
33 | "repo": "nixpkgs",
34 | "type": "github"
35 | }
36 | },
37 | "root": {
38 | "inputs": {
39 | "flake-utils": "flake-utils",
40 | "nixpkgs": "nixpkgs"
41 | }
42 | },
43 | "systems": {
44 | "locked": {
45 | "lastModified": 1681028828,
46 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
47 | "owner": "nix-systems",
48 | "repo": "default",
49 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
50 | "type": "github"
51 | },
52 | "original": {
53 | "owner": "nix-systems",
54 | "repo": "default",
55 | "type": "github"
56 | }
57 | }
58 | },
59 | "root": "root",
60 | "version": 7
61 | }
62 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "👻.org";
3 |
4 | inputs = {
5 | nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
6 | flake-utils.url = "github:numtide/flake-utils";
7 | };
8 |
9 | outputs = {
10 | self,
11 | flake-utils,
12 | nixpkgs,
13 | ...
14 | }:
15 | flake-utils.lib.eachDefaultSystem (
16 | system: let
17 | pkgs = import nixpkgs {inherit system;};
18 | in {
19 | devShell = pkgs.callPackage ./nix/devShell.nix {};
20 | formatter = pkgs.alejandra;
21 | }
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/next.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | };
5 |
6 | export default nextConfig;
7 |
--------------------------------------------------------------------------------
/nix/devShell.nix:
--------------------------------------------------------------------------------
1 | {
2 | mkShell,
3 | alejandra,
4 | bash,
5 | nodejs_22,
6 | }:
7 | mkShell rec {
8 | name = "ghostty.org";
9 |
10 | packages = [
11 | # Our Makefile requires a modern bash. If the developer computer is
12 | # running macOS then it ships with an old broken version of bash.
13 | # This ensures that the Makefile works. Alternately, we can just
14 | # fix the Makefile.
15 | bash
16 | nodejs_22
17 |
18 | # Required for CI for format checking.
19 | alejandra
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ghostty-website",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint && prettier 'src/**/*.ts' --write"
10 | },
11 | "dependencies": {
12 | "@r4ai/remark-callout": "^0.6.2",
13 | "classnames": "^2.5.1",
14 | "gray-matter": "^4.0.3",
15 | "klaw-sync": "^6.0.0",
16 | "lucide-react": "^0.424.0",
17 | "next": "^14.2.21",
18 | "next-mdx-remote": "^5.0.0",
19 | "postcss-flexbugs-fixes": "^5.0.2",
20 | "postcss-preset-env": "^9.6.0",
21 | "react": "^18",
22 | "react-dom": "^18",
23 | "react-intersection-observer": "^9.14.0",
24 | "rehype-highlight": "^7.0.1",
25 | "remark-gfm": "^4.0.0",
26 | "slugify": "^1.6.6",
27 | "xml2js": "^0.6.2",
28 | "zustand": "^5.0.2"
29 | },
30 | "devDependencies": {
31 | "@types/klaw-sync": "^6.0.5",
32 | "@types/node": "20.14.13",
33 | "@types/react": "18.3.3",
34 | "@types/react-dom": "^18",
35 | "@types/xml2js": "^0.4.14",
36 | "eslint": "^8",
37 | "eslint-config-next": "14.2.5",
38 | "prettier": "3.4.2",
39 | "typescript": "5.5.4"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/postcss.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | "postcss-flexbugs-fixes",
4 | [
5 | "postcss-preset-env",
6 | {
7 | "autoprefixer": {
8 | "flexbox": "no-2009"
9 | },
10 | "stage": 3,
11 | "features": {
12 | "custom-properties": false,
13 | "nesting-rules": true
14 | }
15 | }
16 | ]
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/public/favicon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/favicon-128.png
--------------------------------------------------------------------------------
/public/favicon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/favicon-16.png
--------------------------------------------------------------------------------
/public/favicon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/favicon-256.png
--------------------------------------------------------------------------------
/public/favicon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/favicon-32.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/favicon.ico
--------------------------------------------------------------------------------
/public/ghostty-404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/ghostty-404.png
--------------------------------------------------------------------------------
/public/ghostty-logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/public/images/1-1-0/csd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/images/1-1-0/csd.png
--------------------------------------------------------------------------------
/public/images/1-1-0/linear-corrected_blending.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/images/1-1-0/linear-corrected_blending.png
--------------------------------------------------------------------------------
/public/images/1-1-0/linear_blending.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/images/1-1-0/linear_blending.png
--------------------------------------------------------------------------------
/public/images/1-1-0/p3_blending.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/images/1-1-0/p3_blending.png
--------------------------------------------------------------------------------
/public/images/1-1-0/srgb_blending.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/images/1-1-0/srgb_blending.png
--------------------------------------------------------------------------------
/public/images/1-1-0/ssd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/images/1-1-0/ssd.png
--------------------------------------------------------------------------------
/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/social-share-card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghostty-org/website/7093f052a2f35e0247fcb828ede644ed74a749a0/public/social-share-card.jpg
--------------------------------------------------------------------------------
/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/blockquote/Blockquote.module.css:
--------------------------------------------------------------------------------
1 | .blockquote {
2 | border-left: 3px solid var(--gray-9);
3 | padding: 6px 20px;
4 | display: block;
5 | margin: 32px 0;
6 | }
7 |
--------------------------------------------------------------------------------
/src/components/blockquote/index.tsx:
--------------------------------------------------------------------------------
1 | import classNames from "classnames";
2 | import s from "./Blockquote.module.css";
3 |
4 | interface BlockquoteProps {
5 | className?: string;
6 | children?: React.ReactNode;
7 | }
8 |
9 | export default function Blockquote({ className, children }: BlockquoteProps) {
10 | return (
11 |
83 | {/* Intentionally using an a tag and not next/link:
84 | as we want our :target selectors to trigger here.
85 | See: https://github.com/vercel/next.js/issues/51346
86 | Also, we're remaining on the same page always here,
87 | so no client-side routing handing is needed. */}
88 |
89 |