412 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto
3f1d6eb301 expand explicit error set usage
This continues our work to improve the amount of explicit error sets
we use in the codebase. Explicit error sets make it easier to understand
possible failure scenarios, allow us to use exhaustive matching, create
compiler errors if errors are unexpectedly added or removed, etc.

The goal eventually is 100% coverage but we're not even close yet.
This just moves us a little closer.
2024-10-18 08:10:41 -07:00
Justin Su
203110355d Fix "external affects" typo in documentation 2024-10-17 14:59:20 -04:00
Mitchell Hashimoto
115e14f19f macos: NSProcessInfo-based arg iterator
Fixes #2432

On macOS, processes with an NSApplicationMain entrypoint do not have
access to libc argc/argv. Instead, we must use NSProcessInfo. This
commit introduces an args iterator that uses NSProcessInfo, giving us
access to the args.

This also fixes an issue where we were not properly skipping argv0 when
iterating over the args. This happened to be fine because we happened to
ignore invalid args but it introduces a config error.
2024-10-14 17:08:33 -07:00
Mitchell Hashimoto
c26d1cb28e config: add accidentally removed keybinding 2024-10-10 16:47:35 -07:00
Mitchell Hashimoto
ed2cd6d436 macos: remove the ability to bind fn/globe
This was recently introduced a few days ago. Unfortunately, this doesn't
work as expected. The "function" modifier is not actually the fn key
but used by macOS to represent a variety of "functional" key presses.
This breaks other bindings such as #2411.

I can't find a source on the internet that reliably tells me how we
can detect fn key presses, but I do find a number of sources that tell
us we can't.
2024-10-07 14:36:12 -10:00
Mitchell Hashimoto
b9fa6b1b83 config: more caveats for fn 2024-10-05 10:11:25 -10:00
Mitchell Hashimoto
6fdfa9d491 Make the function/globe key available as a modifier on macOS 2024-10-05 09:39:55 -10:00
Mitchell Hashimoto
a278022e5d Bind ctrl+tab and ctrl+shift+tab by default
This matches default behaviors on native apps for macOS and GTK so we
should always bind it.
2024-10-05 09:34:46 -07:00
Lucy Davinhart
a109b8d755 Implements initial-window=false for macOS
Closes https://github.com/ghostty-org/ghostty/issues/2361
2024-10-03 19:09:37 +01:00
Mitchell Hashimoto
66f2d75ddd Change copy-on-select behavior to be more idiomatic for Linux
Fixes #2345

The new docs for `copy-on-select`:

Whether to automatically copy selected text to the clipboard. `true`
will prefer to copy to the selection clipboard if supported by the
OS, otherwise it will copy to the system clipboard.

The value `clipboard` will always copy text to the system clipboard
(for supported systems) as well as the system clipboard. This is sometimes
a preferred behavior on Linux.

Middle-click paste will always use the selection clipboard on Linux
and the system clipboard on macOS. Middle-click paste is always enabled
even if this is `false`.

The default value is true on Linux and false on macOS. macOS copy on
select behavior is not typical for applications so it is disabled by
default. On Linux, this is a standard behavior so it is enabled by
default.
2024-10-01 20:38:27 -07:00
Mitchell Hashimoto
22b9f24978 macos: clarify comments, clean up notifications for fullscreen 2024-09-30 20:10:23 -07:00
Mitchell Hashimoto
045ecacd8c macos: fullscreen mode can be changed at runtime 2024-09-30 10:31:11 -07:00
Mitchell Hashimoto
4f9d49b380 macos: handle multiple monitors properly 2024-09-28 20:52:22 -07:00
Mitchell Hashimoto
1f3c3dde10 input: note fullscreen isn't supported by quick terminal 2024-09-28 18:51:47 -07:00
Mitchell Hashimoto
11d5ec7dc1 config: support quick terminal position 2024-09-28 18:42:25 -07:00
Mitchell Hashimoto
bea24f7725 config: clarify docs 2024-09-24 16:41:29 -07:00