8161 Commits

Author SHA1 Message Date
Isaac Mills
39fbd7db4b Prevent GTK from initializing Vulkan. This improves startup time 2024-11-26 11:10:00 -07:00
Mitchell Hashimoto
e95b2eaace Merge pull request #2821 from gpanders/push-wvnqywotosxu
termio: fixes to kitty color reporting
2024-11-26 09:38:10 -08:00
Gregory Anders
2cbc2833d1 termio: fixes to kitty color reporting
The kitty color report response is an OSC, not a CSI, so change `[` to
`]`. Colors which are unset should be reported with `{key}=`.
2024-11-26 09:01:31 -06:00
Mitchell Hashimoto
518f8b1048 Merge pull request #2797 from kyswtn/application-support-dir
Support loading config from "Application Support" directory on macOS
2024-11-25 16:15:59 -08:00
Mitchell Hashimoto
b9345e8d6a try to abstract bundle ID to a zig file 2024-11-25 16:11:02 -08:00
Mitchell Hashimoto
adc59be977 os: more error handling on reading the app support dir 2024-11-25 16:04:41 -08:00
Mitchell Hashimoto
4a44700f2a Merge pull request #2815 from ghostty-org/push-olmltxtzxvsn
apprt/gtk: only show config reload toast if app config changes
2024-11-25 15:19:01 -08:00
Mitchell Hashimoto
a39aa7e89d apprt/gtk: only show config reload toast if app config changes
This resolves the toast showing up every time the surface config changes
which can be relatively frequent under certain circumstances such as
theme changes.
2024-11-25 15:13:23 -08:00
Mitchell Hashimoto
b2db1a8df6 Merge pull request #2814 from ghostty-org/push-ryuwyrlsssyv
config: only change conditional state if there are relevant changes
2024-11-25 13:58:32 -08:00
Mitchell Hashimoto
6c615046ba config: only change conditional state if there are relevant changes
Related to #2775

This makes it so that `changeConditionalState` only does something if
the conditional state (1) has changes and (2) those changes are relevant
to the current conditional state.

By "relevant" we mean that the conditional state being changed is state
that is actually used by the configuration.
2024-11-25 13:55:16 -08:00
Mitchell Hashimoto
4c2d462000 Merge pull request #2796 from anmolw/fish-completions-themes
Strip theme location in fish completions
2024-11-24 09:44:56 -08:00
Kyaw
10e37a3dee config: support loading from "Application Support" directory on macOS 2024-11-24 17:08:07 +07:00
Anmol Wadhwani
2d3709f354 Strip theme location in fish completions
Co-authored-by: trag1c <trag1cdev@yahoo.com>
2024-11-24 12:11:41 +05:30
Mitchell Hashimoto
c24ca3d9fb Merge pull request #2794 from gpanders/push-lsmkzutmutol
termio: track whether fg/bg color is explicitly set
2024-11-23 19:05:19 -08:00
Gregory Anders
4042041b61 termio: track whether fg/bg color is explicitly set
Make the foreground_color and background_color fields in the Terminal
struct optional values so that we can determine if a foreground or
background color was explicitly set with an OSC 10 or OSC 11 sequence.
This makes the logic a bit simpler to reason about (i.e.
`foreground_color` is now always "the color set by an OSC 10 sequence"
while `default_foreground_color` is always "the color set by the config
file") and also fixes an issue where an OSC 10 or OSC 11 query would not
report the correct color after a config update changed the foreground or
background color.

The `cursor_color` field was already optional, with the same semantics
(it is only non-null when explicitly set with an OSC 12) so this brings
all three of these fields into alignment.
2024-11-23 19:48:24 -06:00
Mitchell Hashimoto
f14e8d989c Merge pull request #2793 from ghostty-org/push-tnvvnouxlwqy
config: clone() needs to preserve conditionals of replay steps
2024-11-23 15:27:18 -08:00
Mitchell Hashimoto
e031eb17f4 config: clone() needs to preserve conditionals of replay steps
Fixes #2791

This goes back to the previous implementation of clone that directly
cloned values rather than using replay steps, because replay steps don't
preserve conditionals on the iterator.

This works.

Another fix will be when we support some sort of conditional syntax and
the replay iterator can yield that information. We have a unit test here
so we can verify that then.
2024-11-23 15:22:05 -08:00
Mitchell Hashimoto
8dd00b4254 Merge pull request #2789 from ghostty-org/push-tzxvvzpytvwt
apprt/embedded: update our cached config on config_change action
2024-11-23 10:27:46 -08:00
Mitchell Hashimoto
f7e1d0b83b apprt/embedded: update our cached config on config_change action
Fixes #2784
2024-11-23 10:22:11 -08:00
Mitchell Hashimoto
dca3cd7c10 Merge pull request #2788 from ghostty-org/push-rxpmmzxptqwt
surface needs to preserve original config working-directory
2024-11-23 10:05:16 -08:00
Mitchell Hashimoto
2b30186259 surface needs to preserve original config working-directory
Fixes #2785
2024-11-23 09:54:19 -08:00
Mitchell Hashimoto
6658aae21f Merge pull request #2771 from ghostty-org/push-quwzwysosskr
mode 2031 should send updates on any color palette change
2024-11-23 09:53:53 -08:00
Mitchell Hashimoto
1051291289 Merge pull request #2787 from ghostty-org/push-swmnnoxotlrw
termio: copy input command to avoid memory corruption
2024-11-23 09:49:29 -08:00
Mitchell Hashimoto
70cc2d9793 termio: copy input command to avoid memory corruption
Fixes #2779
2024-11-23 09:40:18 -08:00
Mitchell Hashimoto
873ebc368c Merge pull request #2772 from jparise/todo-sixel
doc: remove sixel support from the TODO list
2024-11-22 21:49:56 -08:00
Mitchell Hashimoto
8deefca7f3 Merge pull request #2777 from ghostty-org/push-zulksrrwpxyx
config: clone must preserve conditional state
2024-11-22 20:05:23 -08:00
Mitchell Hashimoto
1e16f30309 config: clone must preserve conditional state
This fixes an issue where once the app config is updated, it'd revert
back to the default state.
2024-11-22 20:02:35 -08:00
Mitchell Hashimoto
b04f31f5c6 config: clone() should run the replay steps
This preserves replay steps for future use. Previously, clone copied
values but failed to copy the replay steps.
2024-11-22 15:10:44 -08:00
Mitchell Hashimoto
f1043d5fad Merge pull request #2774 from ghostty-org/push-qtvoskmxulyu
App applies conditional state, supports theme setting
2024-11-22 14:21:57 -08:00
Mitchell Hashimoto
cd49015243 App applies conditional state, supports theme setting
The prior light/dark mode awareness work works on surface-level APIs. As
a result, configurations used at the app-level (such as split divider
colors, inactive split opacity, etc.) are not aware of the current theme
configurations and default to the "light" theme.

This commit adds APIs to specify app-level color scheme changes. This
changes the configuration for the app and sets the default conditional
state to use that new theme. This latter point makes it so that future
surfaces use the correct theme on load rather than requiring some apprt
event loop ticks. Some users have already reported a short "flicker" to
load the correct theme, so this should help alleviate that.
2024-11-22 14:08:35 -08:00
Jon Parise
41d64d886a doc: remove sixels from the TODO list
Per https://github.com/ghostty-org/ghostty/discussions/2496
2024-11-22 16:41:24 -05:00
Mitchell Hashimoto
1c6adf4065 mode 2031 should send updates on any color palette change
Related #2755

From the mode 2031 spec[1]:

> Send CSI ? 2031 h to the terminal to enable unsolicited DSR (device status
> report) messages for color palette updates and CSI ? 2031 l respectively to
> disable it again.
>
> The sent out DSR looks equivalent to the already above mentioned. This
> notification is not just sent when dark/light mode has been changed by the
> operating system / desktop, but also if the user explicitly changed color
> scheme, e.g. by configuration.

My reading of this paired with the original discussion is that this is
meant to be sent out for anything that could possibly change terminal
colors.

Previous to this commit, we only sent out the DSR when the actual system
light/dark mode changed. This commit changes it to send out the DSR on
any operation that _may_ change the terminal colors.

[1]: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/#example-source-code
2024-11-22 13:14:12 -08:00
Mitchell Hashimoto
958316d851 Merge pull request #2770 from ghostty-org/push-xptpwxwxvwxs
macos: update recommended Xcode settings
2024-11-22 12:37:19 -08:00
Mitchell Hashimoto
a46cda18f1 Merge pull request #2769 from ghostty-org/reload-config
Use apprt action system to trigger config reload
2024-11-22 12:05:00 -08:00
Mitchell Hashimoto
523307e958 macos: update recommended Xcode settings
I genuinely don't know what they do, but Xcode recommended it and
cursory docs reading seems to indicate its safe. I don't think it'll
result in any noticeable changes.
2024-11-22 12:00:38 -08:00
Mitchell Hashimoto
0bb4ca269c macos: use Ghostty logger not AppDelegate 2024-11-22 11:53:52 -08:00
Mitchell Hashimoto
f20b20bd6a apprt/gtk: fix build 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
00c62708d3 apprt: remove change conditional state action 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
266e4781fb apprt/gtk: update for new reload config API 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
0a794addf1 apprt/glfw: update to new reload config action 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
a191f3c396 apprt: switch to reload_config action that calls update_config API 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
6371af0d8e config: need to apply window-theme for light/dark after loading theme 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
ddde68d1f4 macos: add NSAppearance.isDark 2024-11-22 10:31:31 -08:00
Mitchell Hashimoto
7bae9e1d20 Merge pull request #2768 from ghostty-org/push-pzzwlvwumwpq
config: fix invalid memory access on theme loading
2024-11-22 09:48:08 -08:00
Mitchell Hashimoto
048d4c80dc Merge pull request #2765 from trag1c/doc-proxy-icon
docs: include valid values for `macos-titlebar-proxy-icon`
2024-11-22 09:46:01 -08:00
Mitchell Hashimoto
e53eb9bd6f config: fix invalid memory access on theme loading
Fixes GHOSTTY-1X in Sentry

The comment explains.
2024-11-22 09:45:32 -08:00
Mitchell Hashimoto
49581ae8fc Merge pull request #2766 from vprigent/fix-url-regex
Add two edge cases to the url regex
2024-11-22 09:17:39 -08:00
Vincent Prigent
96bda270a2 Add two edge cases to the url regex 2024-11-22 22:57:45 +13:00
trag1c
03f06431a7 docs: include valid values for macos-titlebar-proxy-icon 2024-11-22 01:07:56 +01:00
Mitchell Hashimoto
a733ea381b macos: OSColor.hexString must be able to compile with UIKit 2024-11-21 14:50:03 -08:00