576 Commits

Author SHA1 Message Date
Mitchell Hashimoto
96b3db0b8c docs: update copy-on-select documentation (#4909)
As per discussion in
https://github.com/ghostty-org/ghostty/discussions/4898, this updates
the docs for `copy-on-select` to correct the middle-click paste behavior
change as per https://github.com/ghostty-org/ghostty/pull/4733. I also
opted to remove the multiple "if supported by OS/ for supported systems"
statements since it's supported everywhere now, AFAIK.
2025-01-10 13:13:12 -08:00
Onno Siemens
19cfd99439 docs: update copy-on-select documentation 2025-01-10 18:11:57 +01:00
Leah Amelia Chen
405a897230 gtk(x11): implement background blur for KDE/KWin on X11 2025-01-09 14:57:02 -08:00
Leah Amelia Chen
03fee2ac33 gtk: unify Wayland and X11 platforms 2025-01-09 14:57:02 -08:00
Mitchell Hashimoto
90d1023783 correct default keybinding cmd+backspace for macOS (#4249)
This produces the following keybind, which I believe was intended.
> keybind = cmd+backspace=text:\x15

Matches the cmd+left and cmd+right which are a few lines up.

#3679 
#3646
2025-01-08 13:32:08 -08:00
Mitchell Hashimoto
e4033ca4df config: close_tab on macOS should be cmd+opt+w to match iTerm2 2025-01-08 11:47:37 -08:00
Mitchell Hashimoto
0d679951bc fix (macOS): Show quick terminal on full-screen app (#4049)
closes #2721  

This PR resolves the issue where the Quick Terminal was not visible when
pressing the global keybind while a full-screen app was active.

### Changes  
- Added new configuration options for `quick-terminal-space-behavior`
- The Quick Terminal will now overlay properly on top of full-screen
applications

#### Behavior

##### `quick-terminal-space-behavior = remain`

- The Quick Terminal will be remain open on the space when switching
spaces.

##### `quick-terminal-space-behavior = move`

- The Quick Terminal will be moved to active space when switching
spaces.
2025-01-08 11:43:58 -08:00
Mitchell Hashimoto
6e54589db4 misc cleanups 2025-01-08 11:28:09 -08:00
Sabarigirish Manikandan
306c7ea2be close_tab keybind (gtk apprt only) (#4033)
Title. Adds a close_tab keybind that essentially behaves the exact same
as clicking the tab close button on the tab bar.
2025-01-08 19:07:00 +00:00
Soh Satoh
0ddc1a21a6 fix the comment (quick-terminal-space-behavior) 2025-01-08 11:03:18 -08:00
Soh Satoh
e2523c25cb Add quick-terminal-space-behavior option 2025-01-08 11:02:19 -08:00
Mitchell Hashimoto
34a0b206f8 apprt/gtk: use a subtitle to mark the current working directory (#3570)
If the title is already the current working directory, hide the
subtitle. Otherwise show the current working directory, like if a
command is running for instance.

This is a re-opening of my original PR because I had to delete my fork
and re-fork it.
2025-01-08 10:10:19 -08:00
Wes Campaigne
e86b9a112e Implement "Paste Selection" on macOS like Terminal.app 2025-01-08 09:26:13 -08:00
Qwerasd
540fcc0b69 refactor(font): move Metrics out of face
in preparation to move ownership of metrics from faces to collections
2025-01-06 20:13:45 -05:00
Mitchell Hashimoto
359c390218 config: unbind keybind triggers unbinds both translated and physical
Fixes #4703

This changes `unbind` so it always removes all keybinds with the given
trigger pattern regardless of if it is translated or physical.

The previous behavior was technically correct, but this implements the pattern
of least surprise. I can't think of a scenario where you really want to
be exact about what key you're unbinding. And if that scenario does
exist, you can always fix it by rebinding after unbind.
2025-01-06 09:47:21 -08:00
Tristan Partin
3698b37588 apprt/gtk: use a subtitle to mark the current working directory
If the title is already the current working directory, hide the
subtitle. Otherwise show the current working directory, like if
a command is running for instance.

Signed-off-by: Tristan Partin <tristan@partin.io>
2025-01-06 08:05:24 -06:00
Mitchell Hashimoto
f6d85baadb config: store non-reproducible diagnostics in replay steps
Fixes #4509

Our config has a replay system so that we can make changes and reproduce
the configuration as if we were reloading all the files. This is useful
because it lets us "reload" the config under various conditions (system
theme change, etc.) without risking failures due to world state changing
(i.e. config files change or disappear).

The replay system assumed that all diagnostics were reproducible, but
this is not the case. For example, we don't reload `config-file` so we
can't reproduce diagnostics that come from it.

This commit adds a new `diagnostic` replay step that can be used to
store non-reproducible diagnostics and `config-file` is updated to use
it.
2025-01-05 13:59:38 -08:00
Mitchell Hashimoto
f14c0f5a63 gtk(wayland): add support for background blur on KDE Plasma (#4403)
Also establishes a foundation for Wayland support and fixes a minor bug
(GTK windows remaining opaque when `background-opacity` is set to 1 on
startup and later updated to less than 1 with a config reload)

Can't update the Zig cache hash myself since I'm currently in China and
my proxy's broken for some reason :(

See also #4361, part of #4626
2025-01-05 12:53:39 -08:00
Mitchell Hashimoto
62dd468500 font(coretext): add config to adjust strength of font-thicken. (#4531)
This is achieved by rendering to an alpha-only context rather than a
normal single-channel context, and adjusting the brightness at which
CoreText thinks it's drawing the glyph, which affects how it applies
font smoothing (which is what `font-thicken` enables).
2025-01-05 12:53:14 -08:00
Mitchell Hashimoto
bb83a14d7a config: minor config changes 2025-01-05 12:35:50 -08:00
Leah Amelia Chen
f2c357a209 config: allow booleans for background-blur-radius 2025-01-05 12:27:11 -08:00
Leah Amelia Chen
9184395cba gtk(wayland): add support for background blur on KDE Plasma 2025-01-05 12:27:11 -08:00
Tim Culverhouse
9cf9e0639f config: rearrange default copy_to_clipboard keybinds
Move the newly added *+insert keybinds to before the ctrl+shift+*
keybinds. This is needed to have the ctrl+shift keybinds be the ones
that show up in the menu.
2025-01-05 09:37:47 -06:00
Mitchell Hashimoto
948cbfbf0e gtk: enable window-title-font-family (#4560) 2025-01-04 20:35:44 -08:00
Jeffrey C. Ollie
51c42795fc gtk: enable window-title-font-family 2025-01-04 20:20:52 -08:00
Christian Schneider
da80531c22 Implement configuration option split-divider-color for macOS 2025-01-04 20:18:00 -08:00
Jeffrey C. Ollie
f3cb95ac1f gtk: add split-separator-color config
Fixes #4326 for GTK
2025-01-04 16:56:52 -06:00
Qwerasd
25a112469c font(coretext): add config to adjust strength of font-thicken.
This is achieved by rendering to an alpha-only context rather than a
normal single-channel context, and adjusting the brightness at which
coretext thinks it's drawing the glyph, which affects how it applies
font smoothing (which is what `font-thicken` enables).
2025-01-03 14:19:19 -05:00
Peter Cock
6459e5c8ca Fixing a few typos in the source code comments (#4529) 2025-01-03 11:00:45 -08:00
Mitchell Hashimoto
cde8b7e810 chore: fix typos (#4407)
Fixes:

- te -> the
- require you restart -> require you to restart
- neovim -> Neovim
2025-01-02 16:15:42 -08:00
Mitchell Hashimoto
7e1b7bb8b3 performable: prefix (#4345)
closes #4328
closes #3970

makes this possible now
```
keybind = performable:ctrl+c=copy_to_clipboard # copy if theres a selection else send sigint
keybind = ctrl+v=paste_from_clipboard
```
2025-01-02 16:11:24 -08:00
Mitchell Hashimoto
bcd4b3a680 config: improve adw-toast docs 2025-01-02 16:07:58 -08:00
Mitchell Hashimoto
e6399c947a update our default bindings that are performable 2025-01-02 15:54:09 -08:00
Mitchell Hashimoto
95b73f197f Add docs for performable 2025-01-02 15:41:01 -08:00
roshal
fe9bbec92e config: allow other base numbers for palette indexes 2025-01-02 15:21:57 -08:00
Mitchell Hashimoto
602e4eb606 Implement loading custom css in the GTK app (#4200)
Closes https://github.com/ghostty-org/ghostty/issues/4089
Gave it a shot and implemented the custom css loading.
My general idea is to use a provider for each stylesheet the user wants
to load and then when the config changes unload them and create new
providers.
A separate provider has to be used for each stylesheet the user wants to
load, since when the provider loads the css it clears all the previously
loaded styles, so in effect we cannot use one provider to load multiple
stylesheets, but maybe there is a better way to overcome this limitation
which I'm not seeing.
2025-01-02 14:34:28 -08:00
Mitchell Hashimoto
8c74b80704 config: Add the option toast_on_clipboard_copy (#4185)
Add a config option to enable/disable the toast shown on clipboard copy

Also suggested in
https://github.com/ghostty-org/ghostty/discussions/4165
2025-01-02 14:31:13 -08:00
Mitchell Hashimoto
509cf306f5 config: improve documentation for color configuration (#4184)
The documentation used to say e.g. "The format of the color is the same
as the `background` configuration; see that for more information.", yet
`background` left the format actually undocumented.

To avoid people having to jump around the docs to find out the supported
formats, the prose for the formats is repeated for each color.

I dug around a bit to find out that named colors from the default X11
map are also a supported format (`cursor-color = purple` works fine), so
that's now documented too.
2025-01-02 14:23:09 -08:00
Mitchell Hashimoto
fb8c83e07c config: change toast config to packed struct 2025-01-02 14:15:16 -08:00
Yotam Gurfinkel
e6bb1a56eb config: Add the option toast_on_clipboard_copy
Add a config option to enable/disable the toast shown on clipboard copy
2025-01-02 14:09:29 -08:00
Mitchell Hashimoto
5293e8a819 Merge branch 'patch-1' 2025-01-02 14:06:41 -08:00
Mitchell Hashimoto
bed37ac844 update wording 2025-01-02 14:06:23 -08:00
Mitchell Hashimoto
e7354e7308 Update src/config/Config.zig
Co-authored-by: Aarni Koskela <akx@iki.fi>
2025-01-02 14:05:49 -08:00
Mitchell Hashimoto
18001c3251 font: allow non-boolean font feature settings (#4139)
\+ much more flexible syntax and lenient parser
\+ allows comma-separated list as a single config value

This allows, e.g. `cv01 = 2` to select the second variant of `cv01`.

Resolves #3128 

Parser could probably be a little smaller than it is- would be a lot
cleaner with the labeled switch continue pattern from Zig 0.14. Maybe
should've put it in its own file too...

I spent *much* too long trying to test this with `cv01` with
[monaspace](https://github.com/githubnext/monaspace) before realizing
that the README refers to v1.2 but the latest released version (and
hence the one I had installed) was v1.101 -- I installed the v1.2
version and tested with both CoreText and HarfBuzz and successfully set
`cv01 = 2` and got the expected result.

Feel free to make any stylistic changes you feel necessary before
merging.
2025-01-02 14:04:20 -08:00
Mitchell Hashimoto
7eb6b29d4c macos: make auto-update optional (#4436)
When unset, we use Sparkle's default behavior, which is based on the
user's preference stored in the standard user defaults.

The rest of the previous behavior is preserved:
- When SUEnableAutomaticChecks is explicitly false, auto-updates are
disabled.
- When 'auto-update' is set, use its value to set Sparkle's auto-update
behavior.

Fixes #4433
2025-01-02 13:38:15 -08:00
Mitchell Hashimoto
898d988799 Set an initial start position (#3929)
Allow the ability to set an initial start position from the config. Adds
`window-initial-position-{x,y}` to the config as an optional i16 value
(see swift docs in [this
comment](https://github.com/ghostty-org/ghostty/pull/3929#discussion_r1899266607)
for the reasoning behind this if needed) and handles setting the
position when the initial window is created

Closes https://github.com/ghostty-org/ghostty/issues/3362
2025-01-02 13:35:13 -08:00
Mitchell Hashimoto
29b96be84f tweaks to window position 2025-01-02 13:18:53 -08:00
Adam Wolf
f9250e28b5 chore: rename window-position-{x,y} to window-initial-position-{x,y} 2025-01-02 12:58:40 -08:00
Adam Wolf
16bf3b8820 docs: update config docs to reflect window positioning changes 2025-01-02 12:58:40 -08:00
Adam Wolf
970e45559b apprt/glfw: handle setting initial window position when window is
created
2025-01-02 12:58:40 -08:00