summaryrefslogtreecommitdiff
path: root/src/config
AgeCommit message (Collapse)Author
2025-10-04input: use std.Io.Writer for key encoder, new API, expose via libghosttyMitchell Hashimoto
This modernizes `KeyEncoder` to a new `std.Io.Writer`-based API. Additionally, instead of a single struct, it is now an `encode` function that takes a series of more focused options. This is more idiomatic Zig while also making it easier to expose via libghostty-vt. libghostty-vt also gains access to key encoding APIs.
2025-10-04Remove incorrect note from config docsDaniel Wennberg
2025-10-03Zig 0.15: zig build test Mitchell Hashimoto
2025-10-03core: add 'command finished' notifications (#8992)Mitchell Hashimoto
Fixes #8991 Uses OSC 133 esc sequences to keep track of how long commands take to execute. If the user chooses, commands that take longer than a user specified limit will trigger a notification. The user can choose between a bell notification or a desktop notification.
2025-10-02core: add 'command finished' notificationsJeffrey C. Ollie
Fixes #8991 Uses OSC 133 esc sequences to keep track of how long commands take to execute. If the user chooses, commands that take longer than a user specified limit will trigger a notification. The user can choose between a bell notification or a desktop notification.
2025-10-02fix(config): Make macos-custom-icon null-terminatedDaniel Wennberg
2025-09-30feat: add GHOSTTY_BIN_DIR to path via shell integrationMatthew Hrehirchuk
2025-09-29Rewrite constraint code for improved icon scaling/alignmentDaniel Wennberg
2025-09-29config: modify MouseScrollMultiplier to lean on args parsingMitchell Hashimoto
2025-09-29add: unit tests for MouseScrollMultiplier parsing and formattingToufiq Shishir
2025-09-29feat: enable separate scaling for precision and discrete mouse scrollingToufiq Shishir
2025-09-24config: smarter parsing in autoParseStruct (#8873)Mitchell Hashimoto
Fixes #8849 Previously, the `parseAutoStruct` function that was used to parse generic structs for the config simply split the input value on commas without taking into account quoting or escapes. This led to problems because it was impossible to include a comma in the value of config entries that were parsed by `parseAutoStruct`. This is particularly problematic because `ghostty +show-config --default` would produce output like the following: ``` command-palette-entry = title:Focus Split: Next,description:Focus the next split, if any.,action:goto_split:next ``` Because the `description` contains a comma, Ghostty is unable to parse this correctly. The value would be split into four parts: ``` title:Focus Split: Next description:Focus the next split if any. action:goto_split:next ``` Instead of three parts: ``` title:Focus Split: Next description:Focus the next split, if any. action:goto_split:next ``` Because `parseAutoStruct` simply looked for commas to split on, no amount of quoting or escaping would allow that to be parsed correctly. This is fixed by (1) introducing a parser that will split the input to `parseAutoStruct` into fields while taking into account quotes and escaping. And (2) changing the `ghostty +show-config` output to put the values in `command-palette-entry` into quotes so that Ghostty can parse it's own output. `parseAutoStruct` will also now parse double quoted values as a Zig string literal. This makes it easier to embed control codes, whitespace, and commas in values.
2025-09-24fix: file creation when directory already existsCoderJoshDK
2025-09-23config: smarter parsing in autoParseStructJeffrey C. Ollie
Fixes #8849 Previously, the `parseAutoStruct` function that was used to parse generic structs for the config simply split the input value on commas without taking into account quoting or escapes. This led to problems because it was impossible to include a comma in the value of config entries that were parsed by `parseAutoStruct`. This is particularly problematic because `ghostty +show-config --default` would produce output like the following: ``` command-palette-entry = title:Focus Split: Next,description:Focus the next split, if any.,action:goto_split:next ``` Because the `description` contains a comma, Ghostty is unable to parse this correctly. The value would be split into four parts: ``` title:Focus Split: Next description:Focus the next split if any. action:goto_split:next ``` Instead of three parts: ``` title:Focus Split: Next description:Focus the next split, if any. action:goto_split:next ``` Because `parseAutoStruct` simply looked for commas to split on, no amount of quoting or escaping would allow that to be parsed correctly. This is fixed by (1) introducing a parser that will split the input to `parseAutoStruct` into fields while taking into account quotes and escaping. And (2) changing the `ghostty +show-config` output to put the values in `command-palette-entry` into quotes so that Ghostty can parse it's own output. `parseAutoStruct` will also now parse double quoted values as a Zig string literal. This makes it easier to embed control codes, whitespace, and commas in values.
2025-09-21start extracting core terminal zig moduleMitchell Hashimoto
2025-09-21Default config template be explicit that you do not copy the default values ↵Leah Amelia Chen
(#8701)
2025-09-20nicer comment on why you shouldn't copy the defaults into your config ↵rhodes-b
specifically that some options will conflict with each other
2025-09-19build: generate various resources at build run, not build graphMitchell Hashimoto
This is stomping towards minimizing our build.zig dependencies so that it can be cached more often. Right now, touching almost any file in the project forces the build.zig to rebuild which is destroying my productivity.
2025-09-18documentation: fix MacOSDockDropBehavior valid valuesMatthias von Arx
2025-09-17more info on do NOT copy default configrhodes-b
2025-09-16font-size reloads at runtime if the font wasn't manually setMitchell Hashimoto
This was a very common pitfall for users. The new logic will reload the font-size at runtime, but only if the font wasn't manually set by the user using actions such as `increase_font_size`, `decrease_font_size`, or `set_font_size`. The `reset_font_size` action will reset our state to assume the font-size wasn't manually set. I also updated a comment about `font-family` not reloading at runtime; this wasn't true even prior to this commit.
2025-09-16config: update theme names in docs (#8655)Mitchell Hashimoto
They were renamed, see: https://github.com/mbadolato/iTerm2-Color-Schemes/commits/master/ghostty/Rose%20Pine
2025-09-16config: update theme names in docsSimon Olofsson
They were renamed, see: https://github.com/mbadolato/iTerm2-Color-Schemes/commits/master/ghostty/Rose%20Pine
2025-09-16docs: add lacking version informationカワリミ人形
`quick-terminal-size` option is available since 1.2.0
2025-09-11Add default bindings for the "copy" and "paste" keyboard keys.Yaacov Akiba Slama
These keys are present in some old unix keyboards, but more importantly, their keycodes can be mapped to physical keys in modern programmable keyboards. Using them in Linux is a way to be able to have the same keys for copy/pasting in GUI apps and in terminal apps instead of switching between ctrl-c/ctrl-v and ctrl-shift-c/ctrl-shift-v.
2025-09-06config: probable cli should return false on macOS for desktop launchMitchell Hashimoto
Fixes #8542 The comment explains why this is needed.
2025-09-05apprt/gtk-ng: clean up our single instance, new window interactionsMitchell Hashimoto
This removes `launched-from` entirely and moves our `gtk-single-instance` detection logic to assume true unless we detect CLI instead of assume false unless we detect desktop/dbus/systemd. The "assume true" scenario for single instance is desirable because detecting a CLI instance is much more reliable. Removing `launched-from` fixes an issue where we had a difficult-to-understand relationship between `launched-from`, `gtk-single-instance`, and `initial-window`. Now, only `gtk-single-instance` has some hueristic logic. And `initial-window` ALWAYS sends a GTK activation signal regardless of single instance or not. As a result, we need to be explicit in our systemd, dbus, desktop files about what we want Ghostty to do, but everything works as you'd mostly expect. Now, if you put plain old `ghostty` in your terminal, you get a new Ghostty instance. If you put it anywhere else, you get a GTK single instance activation call (either creates a first instance or opens a new window in the existing instance). Works for launchers and so on.
2025-09-05gtk-ng: deprecate detection of launch sourceJeffrey C. Ollie
Detecting the launch source frequently failed because various launchers fail to sanitize the environment variables that Ghostty used to detect the launch source. For example, if your desktop environment was launched by `systemd`, but your desktop environment did not sanitize the `INVOCATION_ID` or the `JOURNAL_STREAM` environment variables, Ghostty would assume that it had been launched by `systemd` and behave as such. This led to complaints about Ghostty not creating new windows when users expected that it would. To remedy this, Ghostty no longer does any detection of the launch source. If your launch source is something other than the CLI, it must be explicitly speciflied on the CLI. All of Ghostty's default desktop and service files do this. Users or packagers that create custom desktop or service files will need to take this into account. On GTK, the `desktop` setting for `gtk-single-instance` is replaced with `detect`. `detect` behaves as `gtk-single-instance=true` if one of the following conditions is true: 1. If no CLI arguments have been set. 2. If `--launched-from` has been set to `desktop`, `dbus`, or `systemd`. Otherwise `detect` behaves as `gtk-single-instance=false`.
2025-09-05gtk: the Future is NowLeah Amelia Chen
2025-09-05gtk: nuke the legacy apprt from orbitLeah Amelia Chen
We don't really have any large outstanding regressions on -ng to warrant keeping this alive anymore. ¡Adiós!
2025-09-03config: make default copy_to_clipboard binds performableTim Culverhouse
Make the default keybind for copy_to_clipboard performable. This allows TUIs to receive events when keybinds aren't used, for example cmd+c on macos for copy, or ctrl+shift+c elsewhere. Disclosure: This commit was made with the assistance of AI (ampcode.com)
2025-09-03gtk-ng/wayland: allow more quick terminal configs (#8484)Mitchell Hashimoto
We should at least be on par with what Kitty's panels could do in terms of customization
2025-09-03gtk-ng/wayland: allow more quick terminal configsLeah Amelia Chen
2025-09-02feat: add `selection-clear-on-copy` configurationToufiq Shishir
2025-09-02config: bind both physical digit plus unicode digit for `goto_tab`Mitchell Hashimoto
Fixes #8478 The comments explain this.
2025-08-31fix: changed default faint-opacity value to 0.5Pavel Ivanov
2025-08-31refactor: move faint-opacity clamping to config finalizationPavel Ivanov
2025-08-31feat: added faint-opacity optionPavel Ivanov
2025-08-26config: add entry for scroll-to-bottomJeffrey C. Ollie
Fixes #8408
2025-08-26macos: style changes for quick terminal sizingMitchell Hashimoto
2025-08-26config: change quick terminal size C layout to tagged unionMitchell Hashimoto
2025-08-26use decl literals as suggested Friedrich Stoltzfus
Applied from the code review Co-authored-by: Leah Amelia Chen <github@acc.pluie.me>
2025-08-26macOS: update zig and c structs for quick terminal sizeFriedrich Stoltzfus
Applying the feedback given by @pluiedev to use an enum to specify the type of quick terminal size configuration given (pixels or percentage). Updated the Swift code to work with the enum as well.
2025-08-26macOS: Add support for quick terminal sizing configurationFriedrich Stoltzfus
Added C bindings for the already existing quick-terminal-size configuration. Created a new QuickTerminalSize struct to hold these values in Swift. Updated the QuickTerminal implementation to use the user's configuration if supplied. Retains defaults. Also adds support to customize the width of the quick terminal (height if quick terminal is set to right or left).
2025-08-25parameterize close_tabJeffrey C. Ollie
- Add mode (`this`/`other`) parameter to `close_tab` keybind/apprt action. - Keybinds will default to `this` if not specified, eliminating backward compatibility issues (`keybind=x=close_tab` === `keybind=x=close_tab:this`). - Remove `close_other_tabs` keybind and apprt action.
2025-08-23feat: add option to disable the "Reloaded the configuration" notificationdy0gu
2025-08-21macos: have macos-dock-drop-behavior apply to all dropsMitchell Hashimoto
2025-08-21Add macos-dock-drop-folder-behavior configuration optionDavid Keegan
This adds a new configuration option that controls whether folders dropped onto the Ghostty dock icon open in a new tab (default) or a new window. The option accepts two values: - tab: Opens folders in a new tab in the main window (default) - window: Opens folders in a new window This is useful for users who prefer window-based workflows over tab-based workflows when opening folders via drag and drop.
2025-08-21Add support for 'custom' on 'macos_icon' to support a completely custom app iconNicholas Mata
2025-08-19Configurable right click behavior (#8254)Mitchell Hashimoto
This MR addresses #4404 following the approach suggested [here](https://github.com/ghostty-org/ghostty/issues/4404#issuecomment-2708410143). Implementing the behavior known e.g. from Putty or Windows Terminal. The following configuration values for `right-click-action` are provided: * `context-menu` - Show the context menu. * `paste` - Paste the contents of the clipboard. * `copy` - Copy the selected text to the clipboard. * `copy-and-paste` - Copy the selected text to the clipboard, paste if nothing is selected. * `ignore` - Do nothing, ignore the right-click. I followed #5935 for getting an idea on where to start. I hope this to be a temporary solution until "bindable mouse bindings" are introduced. This is my first time writing Zig code, so I am happy to incorporate any feedback. Thank you all very much for your work!