### Install dependencies on Void Linux Source: https://ghostty.org/docs/install/build Use xbps-install to install required build dependencies. ```bash sudo xbps-install \ gtk4-devel \ gtk4-layer-shell-devel \ libadwaita-devel \ pkg-config \ zig \ gettext ``` -------------------------------- ### Install dependencies on Solus Source: https://ghostty.org/docs/install/build Use eopkg to install required build dependencies. ```bash sudo eopkg install \ libgtk-4-devel \ libadwaita-devel \ pkgconf \ zig \ gettext ``` -------------------------------- ### Install Ghostty to a target directory Source: https://ghostty.org/docs/install/build Use zig build with the -p flag to specify the installation prefix. ```bash zig build -p $HOME/.local -Doptimize=ReleaseFast ``` ```bash zig build -p /usr -Doptimize=ReleaseFast ``` -------------------------------- ### Install Ghostty tip via Homebrew Source: https://ghostty.org/docs/install/pre Use Homebrew to install the community-maintained prerelease version of Ghostty. ```bash brew install --cask ghostty@tip ``` -------------------------------- ### Install Ghostty Ubuntu Package Source: https://ghostty.org/docs/install/binary Install the Ghostty Ubuntu package (.deb) from a GitHub repository using a provided installation script. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mkasberg/ghostty-ubuntu/HEAD/install.sh)" ``` -------------------------------- ### Install Ghostty via Snap Source: https://ghostty.org/docs/install/binary Install Ghostty using the Snap package manager. This command installs Ghostty in classic confinement mode. ```bash snap install ghostty --classic ``` -------------------------------- ### Install Ghostty on Solus Source: https://ghostty.org/docs/install/binary Install Ghostty from the official Solus package repository using `eopkg`. ```bash eopkg install ghostty ``` -------------------------------- ### Install dependencies on Gentoo Source: https://ghostty.org/docs/install/build Use emerge to install required build dependencies. ```bash emerge -av \ libadwaita \ gtk \ blueprint-compiler \ gettext ``` -------------------------------- ### Build a Tmux-style Layout with Multiple Panes using AppleScript Source: https://ghostty.org/docs/features/applescript This AppleScript example creates a complex window layout with multiple split panes, each configured with a specific working directory and pre-populated with commands, mimicking a Tmux-like setup. ```AppleScript set projectDir to POSIX path of (path to home folder) & "src/ghostty" tell application "Ghostty" activate set cfg to new surface configuration set initial working directory of cfg to projectDir set win to new window with configuration cfg set paneEditor to terminal 1 of selected tab of win set paneBuild to split paneEditor direction right with configuration cfg set paneGit to split paneEditor direction down with configuration cfg set paneLogs to split paneBuild direction down with configuration cfg input text "nvim ." to paneEditor send key "enter" to paneEditor input text "zig build -Demit-macos-app=false" to paneBuild send key "enter" to paneBuild input text "git status -sb" to paneGit send key "enter" to paneGit input text "tail -f /tmp/dev.log" to paneLogs send key "enter" to paneLogs focus paneEditor end tell ``` -------------------------------- ### Install Ghostty on Gentoo Source: https://ghostty.org/docs/install/binary Install Ghostty from the official Gentoo repository using the emerge command. ```bash emerge -av ghostty ``` -------------------------------- ### Install Ghostty on Void Linux Source: https://ghostty.org/docs/install/binary Install Ghostty from the official Void Linux package repository using `xbps-install`. ```bash xbps-install ghostty ``` -------------------------------- ### Install dependencies on Debian and Ubuntu Source: https://ghostty.org/docs/install/build Use apt to install required build dependencies. ```bash sudo apt install \ libgtk-4-dev \ libgtk4-layer-shell-dev \ libadwaita-1-dev \ gettext \ libxml2-utils ``` -------------------------------- ### Ghostty Configuration Syntax Example Source: https://ghostty.org/docs/config Demonstrates the key-value syntax, comments, and keybinding definitions for the config.ghostty file. ```text # The syntax is "key = value". The whitespace around the # equals doesn't matter. background = 282c34 foreground = ffffff # Comments start with a `#` and are only valid on their own line. # Blank lines are ignored! keybind = ctrl+z=close_surface keybind = ctrl+d=new_split:right # Empty values reset the configuration to the default value font-family = ``` -------------------------------- ### Install dependencies on openSUSE Source: https://ghostty.org/docs/install/build Use zypper to install required build dependencies on Tumbleweed or Leap. ```bash sudo zypper install \ gtk4-devel \ libadwaita-devel \ pkgconf \ ncurses-devel \ zig \ gettext ``` -------------------------------- ### Enable Fedora COPR and Install Ghostty Source: https://ghostty.org/docs/install/binary Enable the ghostty COPR repository for Fedora and then install Ghostty. ```bash dnf copr enable scottames/ghostty dnf install ghostty ``` -------------------------------- ### Example configuration file loading order Source: https://ghostty.org/docs/config/reference Demonstrates how nested configuration files are loaded. Files are loaded after the configuration they are defined within. ```ini config-file = "foo" a = 1 ``` -------------------------------- ### Run Ghostty with Nix Source: https://ghostty.org/docs/install/binary Try out Ghostty without a full installation using `nix run` or `nix-shell`. ```bash nix run nixpkgs#ghostty ``` ```bash nix-shell -p ghostty --run ghostty ``` -------------------------------- ### Install Ghostty from Terra repository on Fedora Source: https://ghostty.org/docs/install/binary Install Ghostty from the Terra repository on Fedora systems. This command adds the repository and then installs the package. ```bash dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release dnf install ghostty ``` -------------------------------- ### Example Custom Ghostty Theme File Source: https://ghostty.org/docs/features/theme This example demonstrates a complete custom theme file, setting palette colors, background, foreground, and cursor styles. Theme files can modify any configuration option. ```Ghostty Config palette = 0=#51576d palette = 1=#e78284 palette = 2=#a6d189 palette = 3=#e5c890 palette = 4=#8caaee palette = 5=#f4b8e4 palette = 6=#81c8be palette = 7=#a5adce palette = 8=#626880 palette = 9=#e67172 palette = 10=#8ec772 palette = 11=#d9ba73 palette = 12=#7b9ef0 palette = 13=#f2a4db palette = 14=#5abfb5 palette = 15=#b5bfe2 background = #303446 foreground = #c6d0f5 cursor-color = #f2d5cf cursor-text = #c6d0f5 selection-background = #626880 selection-foreground = #c6d0f5 ``` -------------------------------- ### Install dependencies on Arch Linux Source: https://ghostty.org/docs/install/build Use pacman to install required build dependencies. ```bash sudo pacman -S \ gtk4 \ gtk4-layer-shell \ libadwaita \ gettext ``` -------------------------------- ### Install dependencies on Fedora Source: https://ghostty.org/docs/install/build Use dnf or rpm-ostree to install required build dependencies. ```bash sudo dnf install \ gtk4-devel \ gtk4-layer-shell-devel \ zig \ libadwaita-devel \ gettext ``` ```bash rpm-ostree install \ gtk4-devel \ gtk4-layer-shell-devel \ zig \ libadwaita-devel \ gettext ``` -------------------------------- ### Ghostty Configuration Files for System Installation Source: https://ghostty.org/docs/linux/systemd These are the default file paths for Ghostty's desktop entry, D-Bus service, and systemd user service when installed as a system-wide package. ```bash $PREFIX/share/applications/com.mitchellh.ghostty.desktop $PREFIX/share/dbus-1/services/com.mitchellh.ghostty.service $PREFIX/lib/systemd/user/app-com.mitchellh.ghostty.service ``` -------------------------------- ### Install Ghostty git via AUR Source: https://ghostty.org/docs/install/pre Use an AUR helper like yay to build and install the latest prerelease version on Arch Linux. ```bash # Install Ghostty git yay -S ghostty-git ``` -------------------------------- ### Install Ghostty dependencies via Homebrew Source: https://ghostty.org/docs/install/build Installs the gettext library required for building Ghostty on macOS. ```bash brew install gettext ``` -------------------------------- ### Run Latest Ghostty Tip Version with Nix Source: https://ghostty.org/docs/install/pre Use this command to build and run the most recent development version of Ghostty directly from its GitHub repository without a formal installation. Ensure you have Nix installed and configured. ```bash nix run github:ghostty-org/ghostty ``` -------------------------------- ### Ghostty Configuration Files for User Installation Source: https://ghostty.org/docs/linux/systemd These are the default file paths for Ghostty's desktop entry, D-Bus service, and systemd user service when installed for a single user. ```bash $PREFIX/share/applications/com.mitchellh.ghostty.desktop $PREFIX/share/dbus-1/services/com.mitchellh.ghostty.service $PREFIX/share/systemd/user/app-com.mitchellh.ghostty.service ``` -------------------------------- ### Install Ghostty on Arch Linux Source: https://ghostty.org/docs/install/binary Install the latest tagged release of Ghostty from the Arch Linux [extra] repository using pacman. ```bash pacman -S ghostty ``` -------------------------------- ### Install Ghostty on Alpine Linux Source: https://ghostty.org/docs/install/binary Install Ghostty from the official Alpine Linux testing repository using the apk package manager. ```bash apk add ghostty ``` -------------------------------- ### Scroll Down (SD) Sequence Example Source: https://ghostty.org/docs/vt/csi/sd This example demonstrates the Scroll Down (SD) control sequence. It sets up the scroll region, clears the screen, prints initial lines, and then executes the SD command. The output shows the effect of inserting lines at the top of the scroll region. ```bash printf "\033[1;1H" # move to top-left printf "\033[0J" # clear screen printf "ABC\n" printf "DEF\n" printf "GHI\n" printf "\033[3;4r" # scroll region top/bottom printf "\033[2;2H" printf "\033[T" ``` -------------------------------- ### Ghostty Debug Build Files for System Installation Source: https://ghostty.org/docs/linux/systemd File paths for desktop entry, D-Bus service, and systemd user service specific to Ghostty development builds installed as a system package. ```bash $PREFIX/share/applications/com.mitchellh.ghostty-debug.desktop $PREFIX/share/dbus-1/services/com.mitchellh.ghostty-debug.service $PREFIX/lib/systemd/user/app-com.mitchellh.ghostty-debug.service ``` -------------------------------- ### Ghostty Debug Build Files for User Installation Source: https://ghostty.org/docs/linux/systemd File paths for desktop entry, D-Bus service, and systemd user service specific to Ghostty development builds installed for a user. ```bash $PREFIX/share/applications/com.mitchellh.ghostty-debug.desktop $PREFIX/share/dbus-1/services/com.mitchellh.ghostty-debug.service $PREFIX/share/systemd/user/app-com.mitchellh.ghostty-debug.service ``` -------------------------------- ### Install Ghostty Directly on NixOS Source: https://ghostty.org/docs/install/pre This configuration snippet shows how to install Ghostty as a direct package for a user on NixOS. It specifies the Ghostty package from the inputs, targeting the current host system's architecture. ```nix { pkgs, inputs, }: { # Installing the package directly users.users.somebody.packages = [ inputs.ghostty.${pkgs.stdenv.hostPlatform.system}.default ]; # Alternatively, using overlays: nixpkgs.overlays = [ inputs.ghostty.overlays.default ]; users.users.somebody.packages = [ pkgs.ghostty ]; } ``` -------------------------------- ### List Available Themes Source: https://ghostty.org/docs/config/reference Command to display all themes currently available in the Ghostty installation. ```bash ghostty +list-themes ``` -------------------------------- ### DECSTBM V-1: Full Screen Source: https://ghostty.org/docs/vt/csi/decstbm This example demonstrates setting the scroll region to the full screen by using the default values for top and bottom margins. ```bash printf "\033[1;1H" # move to top-left printf "\033[0J" # clear screen printf "ABC\n" printf "DEF\n" printf "GHI\n" printf "\033[r" # scroll region top/bottom printf "\033[T" ``` -------------------------------- ### Inspect AppleScript Dictionary Source: https://ghostty.org/docs/features/applescript Use this command to view the Ghostty scripting definition file (`Ghostty.sdef`) from an installed app bundle. ```bash sdef /Applications/Ghostty.app | less ``` -------------------------------- ### CBT V-2: Left Starting After Tab Stop Source: https://ghostty.org/docs/vt/csi/cbt This example shows the CBT sequence when the cursor starts after a tab stop. The cursor moves left until it reaches the tab stop. ```bash printf "\033[?5W" # reset tab stops printf "\033[1;10H" printf "X" printf "\033[Z" printf "A" ``` -------------------------------- ### CBT V-3: Left Starting on Tabstop Source: https://ghostty.org/docs/vt/csi/cbt This example illustrates the CBT sequence when the cursor is already positioned on a tab stop. The cursor moves left, effectively skipping the current tab stop. ```bash printf "\033[?5W" # reset tab stops printf "\033[1;9H" printf "X" printf "\033[1;9H" printf "\033[Z" printf "A" ``` -------------------------------- ### DECSLRM Validation V-2: Left Only Source: https://ghostty.org/docs/vt/csi/decslrm This example sets only the left margin, effectively creating a scroll region starting from the second column. It enables left/right margins and then applies the scroll region sequence with the left parameter set. ```bash printf "\033[1;1H" # move to top-left printf "\033[0J" # clear screen printf "ABC\n" printf "DEF\n" printf "GHI\n" printf "\033[?69h" # enable left/right margins printf "\033[2s" # scroll region left/right printf "\033[2G" # move cursor to column 2 printf "\033[L" ``` -------------------------------- ### Insert Character (ICH) - Shifting Content Off Screen Source: https://ghostty.org/docs/vt/csi/ich Shows how content is handled when shifted beyond the screen's right edge. Cells shifted off-screen are deleted. This example uses `tput cols` to get the terminal width. ```bash cols=$(tput cols) printf "\033[${cols}G" printf "\033[2D" printf "ABC" printf "\033[2D" printf "\033[2@" printf "X" ``` -------------------------------- ### Loading Multiple Configuration Files Source: https://ghostty.org/docs/config Shows how to include additional configuration files using the config-file key, including optional and absolute paths. ```text config-file = some/relative/sub/config config-file = ?optional/config config-file = /absolute/path/config ``` -------------------------------- ### Build Ghostty with Nix Source: https://ghostty.org/docs/install/build Use the nix build command to build the package. ```bash nix build .#ghostty ``` -------------------------------- ### Enable Ghostty User Service for Login Startup Source: https://ghostty.org/docs/linux/systemd Enables the Ghostty user service to start in the background upon login, improving subsequent window creation speed. ```bash systemctl enable --user app-com.mitchellh.ghostty.service ``` -------------------------------- ### Make AppImage Executable and Run Source: https://ghostty.org/docs/install/binary After downloading the AppImage, make it executable and then run it from the terminal. ```bash chmod a+x Ghostty-${VERSION}-${ARCH}.appimage ./Ghostty-${VERSION}-${ARCH}.appimage ``` -------------------------------- ### Manage Ghostty Development Builds with systemctl and ghostty Source: https://ghostty.org/docs/linux/systemd Commands for enabling, stopping, reloading, viewing logs, and launching new windows for Ghostty development builds. ```bash systemctl enable --user app-com.mitchellh.ghostty-debug.service systemctl stop --user app-com.mitchellh.ghostty-debug.service systemctl reload --user app-com.mitchellh.ghostty-debug.service journalctl -a -f --user -u app-com.mitchellh.ghostty-debug.service ghostty +new-window --class=com.mitchellh.ghostty-debug.service ``` -------------------------------- ### Install dependencies on Alpine Linux Source: https://ghostty.org/docs/install/build Use the apk package manager to install required build dependencies. ```bash doas apk add \ gtk4.0-dev \ libadwaita-dev \ pkgconf \ ncurses \ gettext ``` -------------------------------- ### Install Ghostty via Homebrew on macOS Source: https://ghostty.org/docs/install/binary Use this command to install the Ghostty Homebrew cask on macOS. This repackages the official DMG. ```bash brew install --cask ghostty ``` -------------------------------- ### CUD V-1: Cursor Down Example Source: https://ghostty.org/docs/vt/csi/cud Demonstrates the basic functionality of the Cursor Down (CUD) sequence. This example shows the cursor moving down after printing characters. ```bash printf "A" printf "\033[2B" # cursor down printf "X" ``` -------------------------------- ### SU V-1: Simple Usage Source: https://ghostty.org/docs/vt/csi/su This example demonstrates the basic usage of the Scroll Up (SU) control sequence, showing how it affects the terminal display when scrolling up by one line. ```APIDOC ## SU V-1: Simple Usage ### Description Demonstrates the basic functionality of the Scroll Up (SU) sequence. ### Method Control Sequence ### Endpoint N/A ### Parameters None explicitly defined for this example, uses default SU behavior. ### Request Example ```bash printf "\033[1;1H" # move to top-left printf "\033[0J" # clear screen printf "ABC\n" printf "DEF\n" printf "GHI\n" printf "\033[2;2H" printf "\033[S" ``` ### Response #### Success Response (N/A) Visual change in terminal output. #### Response Example ``` |DEF_____| |GHI_____| ``` ``` -------------------------------- ### Install Ghostty on Atomic Desktops (Silverblue) after adding COPR Source: https://ghostty.org/docs/install/binary After adding the ghostty COPR repository, install Ghostty on your Fedora Atomic Desktops (Silverblue) system using `rpm-ostree`. ```bash rpm-ostree refresh-md && \ rpm-ostree install ghostty ``` -------------------------------- ### Include additional configuration files Source: https://ghostty.org/docs/config/reference Specifies additional configuration files to load. Paths are relative to the current file or working directory. Prepend '?' to ignore errors if a file is missing. ```ini config-file = "~/.config/ghostty/theme.ini" ``` ```ini config-file = "?./local-settings.ini" ``` -------------------------------- ### Configure Nix-Darwin for Ghostty Installation Source: https://ghostty.org/docs/install/binary Configure Nix-Darwin to install Ghostty systemwide or for a specific user. Note that Nix cannot compile Ghostty from source on macOS due to ecosystem limitations. ```nix { pkgs, }: { # Systemwide install environment.systemPackages = [ pkgs.ghostty-bin ]; # Install for a specific user users.users.somebody.packages = [ pkgs.ghostty-bin ]; } ``` -------------------------------- ### CUB V-1: Pending Wrap is Unset Example Source: https://ghostty.org/docs/vt/csi/cub Demonstrates the Cursor Backward (CUB) behavior when the pending wrap state is unset. This example moves the cursor to the last column, sets a character, moves back one cell, and then prints more characters. ```bash cols=$(tput cols) printf "\033[${cols}G" # move to last column printf "A" # set pending wrap state printf "\033[D" # move back one printf "XYZ" ``` ```text |________XY| |Zc________| ``` -------------------------------- ### Create and Use a Surface Configuration Record with AppleScript Source: https://ghostty.org/docs/features/applescript This snippet demonstrates how to create a reusable surface configuration record to define properties like working directory, font size, and environment variables, then apply it when creating a new Ghostty window. ```AppleScript tell application "Ghostty" set cfg to new surface configuration set initial working directory of cfg to POSIX path of (path to home folder) & "src/ghostty" set font size of cfg to 13 set environment variables of cfg to {"EDITOR=nvim", "FZF_DEFAULT_OPTS=--height 40%"} set win to new window with configuration cfg end tell ``` -------------------------------- ### Install Ghostty on NixOS Source: https://ghostty.org/docs/install/binary Add Ghostty to your system-wide or user-specific packages in your NixOS configuration. ```nix { pkgs, }: { # Systemwide install environment.systemPackages = [ pkgs.ghostty ]; # Install for a specific user users.users.somebody.packages = [ pkgs.ghostty ]; } ``` -------------------------------- ### Configuration Options Source: https://ghostty.org/docs/config/reference Reference for setting GUI language, font families, and font styles in Ghostty. ```APIDOC ## Configuration Options ### Description Ghostty supports various configuration options to customize the terminal experience, including GUI language and font rendering settings. ### Options - **language** (string) - Sets the GUI language. Requires a full restart. GTK only. - **font-family** (string) - Sets the primary font family. Can be repeated for fallbacks. - **font-family-bold** (string) - Sets the bold font family. - **font-family-italic** (string) - Sets the italic font family. - **font-family-bold-italic** (string) - Sets the bold-italic font family. - **font-style** (string/boolean) - Sets the named font style or disables it if set to false. - **font-style-bold** (string/boolean) - Sets the bold font style or disables it. - **font-style-italic** (string/boolean) - Sets the italic font style or disables it. - **font-style-bold-italic** (string/boolean) - Sets the bold-italic font style or disables it. ### Usage Examples ``` # Set GUI language language = de # Set font family font-family = "My Favorite Font" # Reset and set font family font-family = "" font-family = "My Favorite Font" ``` ``` -------------------------------- ### Configure FreeType Load Flags Source: https://ghostty.org/docs/config/reference Examples of enabling or disabling specific FreeType rendering flags. ```text hinting, no-hinting, force-autohint, no-force-autohint ``` -------------------------------- ### ECH V-1: Simple Operation Source: https://ghostty.org/docs/vt/csi/ech Demonstrates basic character erasure starting from the first column. ```shell printf "ABC" printf "\033[1G" printf "\033[2X" ``` -------------------------------- ### Keybinding Actions Reference Source: https://ghostty.org/docs/config/keybind/reference This section details the available actions that can be configured for keybindings in Ghostty. Each action is described with its purpose and any specific parameters or behaviors. ```APIDOC ## Keybinding Actions Reference Reference of all Ghostty keybinding actions. This is a reference of all Ghostty keybinding actions. ## `ignore` ### Description Ignore this key combination. Ghostty will not process this combination nor forward it to the child process within the terminal, but it may still be processed by the OS or other applications. ### Method N/A (Action) ### Endpoint N/A ## `unbind` ### Description Unbind a previously bound key binding. This cannot unbind bindings that were not bound by Ghostty or the user (e.g. bindings set by the OS or some other application). ### Method N/A (Action) ### Endpoint N/A ## `csi` ### Description Send a CSI sequence. The value should be the CSI sequence without the CSI header (`ESC [` or `\x1b[`). For example, `csi:0m` can be sent to reset all styles of the current text. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **csi** (string) - Required - The CSI sequence without the header. ## `esc` ### Description Send an `ESC` sequence. ### Method N/A (Action) ### Endpoint N/A ## `text` ### Description Send the specified text. Uses Zig string literal syntax. This is currently not validated. If the text is invalid (i.e. contains an invalid escape sequence), the error will currently only show up in logs. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **text** (string) - Required - The text to send. ## `cursor_key` ### Description Send data to the pty depending on whether cursor key mode is enabled (`application`) or disabled (`normal`). ### Method N/A (Action) ### Endpoint N/A ## `reset` ### Description Reset the terminal. This can fix a lot of issues when a running program puts the terminal into a broken state, equivalent to running the `reset` command. If you do this while in a TUI program such as vim, this may break the program. If you do this while in a shell, you may have to press enter after to get a new prompt. ### Method N/A (Action) ### Endpoint N/A ## `copy_to_clipboard` ### Description Copy the selected text to the clipboard. ### Method N/A (Action) ### Endpoint N/A ## `paste_from_clipboard` ### Description Paste the contents of the default clipboard. ### Method N/A (Action) ### Endpoint N/A ## `paste_from_selection` ### Description Paste the contents of the selection clipboard. ### Method N/A (Action) ### Endpoint N/A ## `copy_url_to_clipboard` ### Description If there is a URL under the cursor, copy it to the default clipboard. ### Method N/A (Action) ### Endpoint N/A ## `copy_title_to_clipboard` ### Description Copy the terminal title to the clipboard. If the terminal title is not set or is empty this has no effect. ### Method N/A (Action) ### Endpoint N/A ## `increase_font_size` ### Description Increase the font size by the specified amount in points (pt). For example, `increase_font_size:1.5` will increase the font size by 1.5 points. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **increase_font_size** (number) - Optional - The amount to increase the font size by in points. ## `decrease_font_size` ### Description Decrease the font size by the specified amount in points (pt). For example, `decrease_font_size:1.5` will decrease the font size by 1.5 points. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **decrease_font_size** (number) - Optional - The amount to decrease the font size by in points. ## `reset_font_size` ### Description Reset the font size to the original configured size. ### Method N/A (Action) ### Endpoint N/A ## `set_font_size` ### Description Set the font size to the specified size in points (pt). For example, `set_font_size:14.5` will set the font size to 14.5 points. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **set_font_size** (number) - Required - The font size in points. ## `search` ### Description Start a search for the given text. If the text is empty, then the search is canceled. A canceled search will not disable any GUI elements showing search. For that, the explicit end_search binding should be used. If a previous search is active, it is replaced. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **search** (string) - Required - The text to search for. ## `search_selection` ### Description Start a search for the current text selection. If there is no selection, this does nothing. If a search is already active, this changes the search terms. ### Method N/A (Action) ### Endpoint N/A ## `navigate_search` ### Description Navigate the search results. If there is no active search, this is not performed. ### Method N/A (Action) ### Endpoint N/A ## `start_search` ### Description Start a search if it isn't started already. This doesn't set any search terms, but opens the UI for searching. ### Method N/A (Action) ### Endpoint N/A ## `end_search` ### Description End the current search if any and hide any GUI elements. ### Method N/A (Action) ### Endpoint N/A ## `clear_screen` ### Description Clear the screen and all scrollback. ### Method N/A (Action) ### Endpoint N/A ## `select_all` ### Description Select all text on the screen. ### Method N/A (Action) ### Endpoint N/A ## `scroll_to_top` ### Description Scroll to the top of the screen. ### Method N/A (Action) ### Endpoint N/A ## `scroll_to_bottom` ### Description Scroll to the bottom of the screen. ### Method N/A (Action) ### Endpoint N/A ## `scroll_to_selection` ### Description Scroll to the selected text. ### Method N/A (Action) ### Endpoint N/A ## `scroll_to_row` ### Description Scroll to the given absolute row in the screen with 0 being the first row. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **scroll_to_row** (integer) - Required - The row number to scroll to. ## `scroll_page_up` ### Description Scroll the screen up by one page. ### Method N/A (Action) ### Endpoint N/A ## `scroll_page_down` ### Description Scroll the screen down by one page. ### Method N/A (Action) ### Endpoint N/A ## `scroll_page_fractional` ### Description Scroll the screen by the specified fraction of a page. Positive values scroll downwards, and negative values scroll upwards. For example, `scroll_page_fractional:0.5` would scroll the screen downwards by half a page, while `scroll_page_fractional:-1.5` would scroll it upwards by one and a half pages. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **scroll_page_fractional** (number) - Required - The fraction of a page to scroll. ## `scroll_page_lines` ### Description Scroll the screen by the specified amount of lines. Positive values scroll downwards, and negative values scroll upwards. For example, `scroll_page_lines:3` would scroll the screen downwards by 3 lines, while `scroll_page_lines:-10` would scroll it upwards by 10 lines. ### Method N/A (Action) ### Endpoint N/A ### Parameters #### Request Body - **scroll_page_lines** (integer) - Required - The number of lines to scroll. ``` -------------------------------- ### Create New Ghostty Window with D-Bus Activation Source: https://ghostty.org/docs/linux/systemd This command uses D-Bus to quickly create a new Ghostty window. If Ghostty is not running, D-Bus activation will launch it first. ```bash ghostty +new-window ``` -------------------------------- ### CHT V-2: Right From Before a Tabstop Source: https://ghostty.org/docs/vt/csi/cht Demonstrates cursor movement starting from a position before a tab stop. ```bash printf "\033[?5W" # reset tab stops printf "\033[1;2H" printf "A" printf "\033[I" printf "X" ``` ```text |_A______X_| ``` -------------------------------- ### Configure GTK Single Instance Mode Source: https://ghostty.org/docs/help/gtk-single-instance Set the gtk-single-instance option in your configuration file to force the application to run in single instance mode. ```text gtk-single-instance = true ```