Files
mac-dots/ghostty/config
T
2026-04-10 16:14:38 +00:00

289 lines
13 KiB
Plaintext

# To get the default values
# ghostty +show-config --default --docs > ~/github/dotfiles-latest/ghostty/config-default
# To get syntax highlighting in neovim, see
# ~/github/dotfiles-latest/neovim/neobean/lua/plugins/ghostty.lua
# HACK: How to setup the Ghostty terminal, is it just hype? READ PINNED MESSAGE
# https://youtu.be/rCiq5CyFFhA
# No way of reloading config via command yet, only via keymap cmd+shift+,
# Created a script to do it so that its reloaded with my colorscheme selector
# Additional configuration files to read. This configuration can be repeated
# to read multiple configuration files. Configuration files themselves can
# load more configuration files. Paths are relative to the file containing the
# `config-file` directive. For command-line arguments, paths are relative to
# the current working directory.
#
# Prepend a ? character to the file path to suppress errors if the file does
# not exist. If you want to include a file that begins with a literal ?
# character, surround the file path in double quotes (").
#
# Cycles are not allowed. If a cycle is detected, an error will be logged and
# the configuration file will be ignored.
# config-file = ghostty-theme
theme = Catppuccin Mocha
cursor-color = #cba6f7
# Some shaders can be found in this repo, they're usually uploaded to discord
# https://github.com/hackrmomo/ghostty-shaders
# custom-shader = shaders/animated-gradient-shader.glsl
# custom-shader = shaders/bettercrt.glsl
# custom-shader = shaders/bloom.glsl
# custom-shader = shaders/bloom1.glsl
# custom-shader = shaders/bloom075.glsl
# custom-shader = shaders/bloom060.glsl
# custom-shader = shaders/bloom050.glsl
# custom-shader = shaders/bloom025.glsl
# custom-shader = shaders/bloom050.glsl
custom-shader = shaders/bloom060.glsl
# custom-shader = shaders/bloom075.glsl
# custom-shader = shaders/bloom1.glsl
# custom-shader = shaders/crt.glsl
# custom-shader = shaders/cubes.glsl
# custom-shader = shaders/dither.glsl
# custom-shader = shaders/drunkard.glsl
# custom-shader = shaders/fireworks-rockets.glsl
# custom-shader = shaders/fireworks.glsl
# custom-shader = shaders/gears-and-belts.glsl
# custom-shader = shaders/glitchy.glsl
# custom-shader = shaders/glow-rgbsplit-twitchy.glsl
# custom-shader = shaders/gradient-background.glsl
# custom-shader = shaders/inside-the-matrix.glsl
# custom-shader = shaders/just-snow.glsl
# custom-shader = shaders/matrix-hallway.glsl
# custom-shader = shaders/negative.glsl
# custom-shader = shaders/retro-terminal.glsl
# custom-shader = shaders/smoke-and-ghost.glsl
# custom-shader = shaders/sparks-from-fire.glsl
# custom-shader = shaders/spotlight.glsl
# custom-shader = shaders/starfield-colors.glsl
# custom-shader = shaders/starfield.glsl
# custom-shader = shaders/tft.glsl
# custom-shader = shaders/underwater.glsl
# custom-shader = shaders/water.glsl
# custom-shader = shaders/cursor_blaze.glsl
custom-shader = shaders/cursor_blaze_no_trail.glsl
# custom-shader = shaders/cursor_smear.glsl
# custom-shader = shaders/cursor_smear_fade.glsl
custom-shader = shaders/cursor_warp.glsl
custom-shader = shaders/ripple_cursor.glsl
# The command to run, usually a shell. If this is not an absolute path, it'll
# be looked up in the `PATH`. If this is not set, a default will be looked up
# from your system. The rules for the default lookup are:
#
# * `SHELL` environment variable
#
# * `passwd` entry (user information)
#
# This can contain additional arguments to run the command with. If additional
# arguments are provided, the command will be executed using `/bin/sh -c`.
# Ghostty does not do any shell command parsing.
#
# If you're using the `ghostty` CLI there is also a shortcut to run a command
# with arguments directly: you can use the `-e` flag. For example: `ghostty -e
# fish --with --custom --args`. The `-e` flag automatically forces some
# other behaviors as well:
#
# * `gtk-single-instance=false` - This ensures that a new instance is
# launched and the CLI args are respected.
#
# * `quit-after-last-window-closed=true` - This ensures that the Ghostty
# process will exit when the command exits. Additionally, the
# `quit-after-last-window-closed-delay` is unset.
# ############################################################################
# The following command checks if tmux is installed.
# If tmux is installed, it automatically attaches to an existing tmux session.
# If no tmux session exists, a new one is created.
# If tmux is not installed, it simply starts zsh without tmux.
#
# For this to work properly, you need to make sure that your shell is configured
# for homebrew, so you should have this line:
# eval "$(/opt/homebrew/bin/brew shellenv)"
# In your ~/.zprofile file
# If you don't have that line, or if the file doesn't exist, run this:
# echo '' >>~/.zprofile && echo '# Configure shell for brew' >>~/.zprofile && echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >>~/.zprofile && eval "$(/opt/homebrew/bin/brew shellenv)"
#
# This assumes you installed tmux through brew if using macos
# command = zsh --login -c "if command -v tmux >/dev/null 2>&1; then tmux attach || tmux; else zsh; fi"
# command = zsh --login -c "if command -v tmux >/dev/null 2>&1; then $HOME/github/dotfiles-latest/tmux/tools/prime/tmux-sessionizer.sh $HOME/github/dotfiles-latest || (tmux attach 2>/dev/null || tmux); else exec zsh; fi"
# Horizontal window padding. This applies padding between the terminal cells
# and the left and right window borders. The value is in points, meaning that
# it will be scaled appropriately for screen DPI.
#
# If this value is set too large, the screen will render nothing, because the
# grid will be completely squished by the padding. It is up to you as the user
# to pick a reasonable value. If you pick an unreasonable value, a warning
# will appear in the logs.
#
# Changing this configuration at runtime will only affect new terminals, i.e.
# new windows, tabs, etc.
#
# To set a different left and right padding, specify two numerical values
# separated by a comma. For example, `window-padding-x = 2,4` will set the
# left padding to 2 and the right padding to 4. If you want to set both
# paddings to the same value, you can use a single value. For example,
# `window-padding-x = 2` will set both paddings to 2.
window-padding-x = 4,2
# Vertical window padding. This applies padding between the terminal cells and
# the top and bottom window borders. The value is in points, meaning that it
# will be scaled appropriately for screen DPI.
#
# If this value is set too large, the screen will render nothing, because the
# grid will be completely squished by the padding. It is up to you as the user
# to pick a reasonable value. If you pick an unreasonable value, a warning
# will appear in the logs.
#
# Changing this configuration at runtime will only affect new terminals,
# i.e. new windows, tabs, etc.
#
# To set a different top and bottom padding, specify two numerical values
# separated by a comma. For example, `window-padding-y = 2,4` will set the
# top padding to 2 and the bottom padding to 4. If you want to set both
# paddings to the same value, you can use a single value. For example,
# `window-padding-y = 2` will set both paddings to 2.
window-padding-y = 6,0
font-family = FiraCode Nerd Font
font-size = 15
# Valid values:
#
# * `true`
# * `false` - windows won't have native decorations, i.e. titlebar and
# borders. On macOS this also disables tabs and tab overview.
#
# The "toggle_window_decoration" keybind action can be used to create
# a keybinding to toggle this setting at runtime.
#
# Changing this configuration in your configuration and reloading will
# only affect new windows. Existing windows will not be affected.
#
# macOS: To hide the titlebar without removing the native window borders
# or rounded corners, use `macos-titlebar-style = hidden` instead.
macos-titlebar-style = hidden
# Confirms that a surface should be closed before closing it. This defaults to
# true. If set to false, surfaces will close without any confirmation.
confirm-close-surface = false
# Toggle the "quick" terminal. The quick terminal is a terminal that
# appears on demand from a keybinding, often sliding in from a screen
# edge such as the top. This is useful for quick access to a terminal
# without having to open a new window or tab.
#
# When the quick terminal loses focus, it disappears. The terminal state
# is preserved between appearances, so you can always press the keybinding
# to bring it back up.
#
# The quick terminal has some limitations:
#
# - It is a singleton; only one instance can exist at a time.
# - It does not support tabs.
# - It will not be restored when the application is restarted
# (for systems that support window restoration).
# - It supports fullscreen, but fullscreen will always be a non-native
# fullscreen (macos-non-native-fullscreen = true). This only applies
# to the quick terminal window. This is a requirement due to how
# the quick rerminal is rendered.
#
# See the various configurations for the quick terminal in the
# configuration file to customize its behavior.
#
# `global:` - Make the keybind global. By default, keybinds only work
# within Ghostty and under the right conditions (application focused,
# sometimes terminal focused, etc.). If you want a keybind to work
# globally across your system (i.e. even when Ghostty is not focused),
# specify this prefix. This prefix implies `all:`. Note: this does not
# work in all environments; see the additional notes below for more
# information.
# keybind = global:cmd+s=toggle_quick_terminal
# keybind = cmd+s=toggle_quick_terminal
# If `true`, the *Option* key will be treated as *Alt*. This makes terminal
# sequences expecting *Alt* to work properly, but will break Unicode input
# sequences on macOS if you use them via the *Alt* key. You may set this to
# `false` to restore the macOS *Alt* key unicode sequences but this will break
# terminal sequences expecting *Alt* to work.
#
# The values `left` or `right` enable this for the left or right *Option*
# key, respectively.
#
# Note that if an *Option*-sequence doesn't produce a printable character, it
# will be treated as *Alt* regardless of this setting. (i.e. `alt+ctrl+a`).
#
# This does not work with GLFW builds.
macos-option-as-alt = right
# Duration (in seconds) of the quick terminal enter and exit animation.
# Set it to 0 to disable animation completely. This can be changed at
# runtime.
# quick-terminal-animation-duration = 0.1
quick-terminal-animation-duration = 0.08
# quick-terminal-animation-duration = 0
keybind = super+i=inspector:toggle
keybind = super+r=reload_config
# This doesn't work when in tmux, if outside tmux the regular ctrl+l works
# keybind = super+k=clear_screen
# When not running tmux I see what C-enter sends
# I can do `/bin/cat -v` and then pressed C-enter
# Ghostty sends: ^[[27;5;13~
#
# The problem is that when I run tmux, nothing is sent, so I'm sending those
# keys in my tmux.conf file
# Customize the macOS app icon.
#
# This only affects the icon that appears in the dock, application
# switcher, etc. This does not affect the icon in Finder because
# that is controlled by a hardcoded value in the signed application
# bundle and can't be changed at runtime. For more details on what
# exactly is affected, see the `NSApplication.icon` Apple documentation;
# that is the API that is being used to set the icon.
#
# WARNING: The `custom-style` option is _experimental_. We may change
# the format of the custom styles in the future. We're still finalizing
# the exact layers and customization options that will be available.
#
# Other caveats:
#
# * The icon in the update dialog will always be the official icon.
# This is because the update dialog is managed through a
# separate framework and cannot be customized without significant
# effort.
#
# Valid values:
#
# * `official` - Use the official Ghostty icon.
# * `blueprint`, `chalkboard`, `microchip`, `glass`, `holographic`,
# `paper`, `retro`, `xray` - Official variants of the Ghostty icon
# hand-created by artists (no AI).
# * `custom-style` - Use the official Ghostty icon but with custom
# styles applied to various layers. The custom styles must be
# specified using the additional `macos-icon`-prefixed configurations.
# The `macos-icon-ghost-color` and `macos-icon-screen-color`
# configurations are required for this style.
#
macos-icon = glass
# The opacity level (opposite of transparency) of the background. A value of
# 1 is fully opaque and a value of 0 is fully transparent. A value less than 0
# or greater than 1 will be clamped to the nearest valid value.
#
# On macOS, background opacity is disabled when the terminal enters native
# fullscreen. This is because the background becomes gray and it can cause
# widgets to show through which isn't generally desirable.
#
# On macOS, changing this configuration requires restarting Ghostty completely.
background-opacity = 0.9
background-blur = true
unfocused-split-opacity = 0.7