428 Commits

Author SHA1 Message Date
Mitchell Hashimoto
423f58c24c Merge pull request #2843 from ghostty-org/push-lqkuvlyttoul
config: need to dupe filepath for diagnostics
2024-11-27 08:51:51 -08:00
Mitchell Hashimoto
5b01cb353d config: need to dupe filepath for diagnostics
Fixes #2800

The source string with the filepath is not guaranteed to exist beyond
the lifetime of the parse operation. We must copy it.
2024-11-27 08:46:47 -08:00
Mitchell Hashimoto
ba4185f6b7 macos: disable background opacity/blur in native fullscreen
See #2840
2024-11-27 08:35:13 -08:00
Mitchell Hashimoto
2e939b617e config: clone should copy diagnostics
Fixes #2800
2024-11-26 15:13:32 -08:00
Mitchell Hashimoto
9171cb5c29 config: implement clone for RepeatableLink
Fixes #2819
2024-11-26 10:50:13 -08: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
adc59be977 os: more error handling on reading the app support dir 2024-11-25 16:04:41 -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
Kyaw
10e37a3dee config: support loading from "Application Support" directory on macOS 2024-11-24 17:08:07 +07: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
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
6371af0d8e config: need to apply window-theme for light/dark after loading theme 2024-11-22 11:52:34 -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
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
trag1c
03f06431a7 docs: include valid values for macos-titlebar-proxy-icon 2024-11-22 01:07:56 +01:00
Mitchell Hashimoto
36a57826a6 macos: only color the titlebar of surfaces that border the top 2024-11-21 14:07:39 -08:00
Mitchell Hashimoto
f722e30bf5 macos: terminal controller reacts to surface config changes 2024-11-21 12:46:46 -08:00
Mitchell Hashimoto
f8a8b0464c renderer/opengl: fix memory leak when copying font features 2024-11-20 14:08:00 -08:00
Mitchell Hashimoto
67d5eaa6af config: update some docs 2024-11-19 16:06:39 -08:00
Mitchell Hashimoto
243b6f8c8d config: macos-titlebar-style transparent disabled with light/dark mode 2024-11-19 16:00:30 -08:00
Mitchell Hashimoto
0e006dbd8d config: disable window-theme=auto if light/dark mode theme is configured 2024-11-19 15:51:35 -08:00
Mitchell Hashimoto
b7f1eaa145 apprt: action to change conditional state, implement for embedded 2024-11-19 15:36:31 -08:00
Mitchell Hashimoto
d2566287e9 config: load dark/light theme based on conditional state 2024-11-19 13:34:22 -08:00
Mitchell Hashimoto
13d5f37e50 config: theme parses light/dark but only loads light for now 2024-11-19 11:16:47 -08:00
Mitchell Hashimoto
df4e616e71 config: theme loading unit tests 2024-11-19 10:17:03 -08:00
Mitchell Hashimoto
04a61e753a config: some docs updates 2024-11-19 10:17:03 -08:00
Mitchell Hashimoto
234e3986f9 config: function to change conditional state 2024-11-19 10:17:03 -08:00
Mitchell Hashimoto
f016c5028c config: Replay.Step supports a conditional arg 2024-11-19 10:17:03 -08:00
Mitchell Hashimoto
29c3a52e96 config: clarify config-file behavior
No one has actually ever complained about this but I wanted to
explicitly call it out.
2024-11-18 15:14:57 -08:00
Mitchell Hashimoto
954c4d7b56 macos: swap out pointerVisible with NSCursor.setHiddenUntilMouseMoves
Fixes #2695

We had various issues with the pointerVisible property on macOS,
including the pointer not being hidden when it should be. Our only use
case today is mouse hide while typing so
NSCursor.setHiddenUntilMouseMoves is a better fit!
2024-11-15 19:05:51 -08:00
Mitchell Hashimoto
8b2980284d Merge pull request #2636 from jcollie/unifi-adwaita
core/gtk: unify libadwaita/adwaita options in the code
2024-11-09 11:56:58 -08:00
Mitchell Hashimoto
3ee6577154 some tweaks 2024-11-09 11:03:02 -08:00
Nadir Fejzic
08720a6d23 chore: fix typo 2024-11-09 12:49:53 +01:00
Jeffrey C. Ollie
b353ddf46d core/gtk: unify libadwaita/adwaita options in the code
Fixes #2574
2024-11-08 22:19:04 -06:00
Nadir Fejzic
945a715b08 refactor: handle freetype load flags in face instead of renderer 2024-11-09 00:42:18 +01:00
Nadir Fejzic
74bda5a6eb feat: implement configurable freetype load flags 2024-11-08 20:38:38 +01:00
Mitchell Hashimoto
65f1cefb4e config: add "initial-command" config, "-e" sets that
Fixes #2601

It is more expected behavior that `-e` affects only the first window. By
introducing a dedicated configuration we avoid making `-e` too magical:
its simply syntax sugar for setting the "initial-command" configuration.
2024-11-05 16:58:20 -08:00
Mitchell Hashimoto
734c8cec55 Merge pull request #2490 from futurepaul/quick-terminal-improvements
macos: quick terminal animate duration
2024-10-25 20:48:40 -07:00
Mitchell Hashimoto
3c8fc86d6f small rename 2024-10-25 19:23:17 -07:00
Paul Miller
f4ba95b2c5 add quick-terminal-animate-duration option 2024-10-25 19:17:38 -05:00
Mitchell Hashimoto
495925355a config: make the proxy icon documentation more detailed 2024-10-24 20:56:45 -07:00
johnseth97
93f70ce237 added macos-titlebar-proxy-icon to config 2024-10-24 21:52:13 -04:00
Mitchell Hashimoto
5e001fcb64 Revert "config: change macos-option-as-alt default to left"
This reverts commit 31b6833ea1b0871eaa25512bcc82e3037d427ee1.
2024-10-22 08:34:52 -04:00
Mitchell Hashimoto
31b6833ea1 config: change macos-option-as-alt default to left
As suggested: https://github.com/ghostty-org/ghostty/discussions/2363#discussioncomment-10824847

This allows users of non-US keyboard layouts to continue to use the
right option key for input methods, while still being able to use the
the left option key as alt for keybindings.

This is a bit of an experiment to see if this is a good default for
everyone. This is in response to very common confusion of US keyboard
layouts where "alt" doesn't work along with the very common use of
non-US layouts where the right option key is used for input methods.
I think this will strike the right balance for most users.
2024-10-18 14:53:13 -07:00
Mitchell Hashimoto
c90ed29341 cli: skip argv0 and actions when parsing CLI flags
This fixes a regression from #2454. In that PR, we added an error when
positional arguments are detected. I believe that's correct, but we
were silently relying on the previous behavior in the CLI commands.

This commit changes the CLI commands to use a new argsIterator function
that creates an iterator that skips the first argument (argv0). This is
the same behavior that the config parsing does and now uses this shared
logic.

This also makes it so the argsIterator ignores actions (`+things`)
and we document that we expect those to be handled earlier.
2024-10-18 12:59:16 -07:00
Mitchell Hashimoto
70c175e2a6 c: remove the config load string API
It was unused and doesn't match our diagnostic API.
2024-10-18 08:11:11 -07:00
Mitchell Hashimoto
a12b33662c config: track the location of CLI argument errors 2024-10-18 08:11:11 -07:00
Mitchell Hashimoto
f24098cbd8 config: show filepath and line numbers for config errors
Fixes #1063
2024-10-18 08:11:11 -07:00
Mitchell Hashimoto
a4e14631ef config: richer diagnostics for errors
Rather than storing a list of errors we now store a list of
"diagnostics." Each diagnostic has a richer set of structured
information, including a message, a key, the location where it occurred.

This lets us show more detailed messages, more human friendly messages, and
also let's us filter by key or location. We don't take advantage of
all of this capability in this initial commit, but we do use every field
for something.
2024-10-18 08:11:11 -07:00