Commit Graph

645 Commits

Author SHA1 Message Date
Mitchell Hashimoto
f23806effe macos: fix various iOS build errors 2025-12-27 14:42:29 -08:00
Mitchell Hashimoto
e5b4705cb3 macos: drag preview is an image of the surface 2025-12-27 14:38:17 -08:00
Mitchell Hashimoto
67c5e0d13d macOS: work on drop destination 2025-12-27 13:05:17 -08:00
Mitchell Hashimoto
b13ac575e6 macos: move grab handle to separate file 2025-12-27 12:51:39 -08:00
Mitchell Hashimoto
ad7460c256 surfaceview as transferable 2025-12-27 12:51:37 -08:00
Mitchell Hashimoto
ca37f3a0e7 macOS: add handle to the top of surfaces that can be used to drag
UI only
2025-12-26 13:59:50 -08:00
Mitchell Hashimoto
c24a053980 macos: move Ghostty surface view into dedicated folder 2025-12-26 13:49:55 -08:00
Mitchell Hashimoto
14f592b8d4 macOS: Don't duplicate command palette entries for terminal commands
This is a regression introduced when we added macOS support for custom
entries. I mistakingly thought that only custom entries were in the
config, but we do initialize it with all!
2025-12-26 11:03:50 -08:00
Mitchell Hashimoto
2415116ad0 Revert "macOS: move NSGlassEffectView into TerminalViewContainer (#10046)"
This reverts commit b8490f40c5, reversing
changes made to 050278feae.
2025-12-25 13:52:59 -08:00
Mitchell Hashimoto
b8490f40c5 macOS: move NSGlassEffectView into TerminalViewContainer (#10046)
Fixes #9991, modifying the subview of `NSThemeFrame` seems "dangerous"
and unpredictable.

> [!NOTE]
> AI Proofread some of my comments



https://github.com/user-attachments/assets/c443cf71-8a00-4c37-b008-d89b7f1564a3
2025-12-25 12:51:47 -08:00
rezky_nightky
bf73f75304 chore: fixed some typo
Author: rezky_nightky <with dot rezky at gmail dot com>
Repository: ghostty
Branch: main
Signing: GPG (4B65AAC2)
HashAlgo: BLAKE3

[ Block Metadata ]
BlockHash: c37f4ee817412728a8058ba6087f5ca6aaff5a845560447d595d8055972d0eac
PrevHash: 3510917a780936278debe21786b7bae3a2162cb3857957314c3b8702e921b3d4
PatchHash: 5e5bb4ab35df304ea13c3d297c6d9a965156052c82bccf852b1f00b7bcaa7dd4

FilesChanged: 18
Lines: +92 / -92

Timestamp: 2025-12-25T17:27:08Z
Signature1: c1970dbb94600d1e24dfe8efcc00f001664db7b777902df9632a689b1d9d1498
Signature2: 30babb1e3ca07264931e067bfe36c676fb7988c2e06f8c54e0c9538fe7c7fc9a
2025-12-26 00:27:08 +07:00
Mitchell Hashimoto
12523ca61c macOS: command-palette-entry is now visible in macOS 2025-12-24 14:33:21 -08:00
Lukas
574ee470bd macOS: move NSGlassEffectView into TerminalViewContainer 2025-12-24 23:10:31 +01:00
Yasu Flores
5bd814adf8 move guard down to keep surfaceModel logic together 2025-12-22 08:53:43 -06:00
Yasu Flores
2215b731da Address warning and add guard clause 2025-12-21 20:47:56 -06:00
Yasu Flores
ab352b5af9 macos: Support native actions to move to beginning of document and move to end of document 2025-12-21 20:26:57 -06:00
Mitchell Hashimoto
39481453fe macos: show the key sequence overlay if no tables are active 2025-12-21 13:32:24 -08:00
Lukas
7d3db17396 macOS: key table animations and cleanup 2025-12-21 09:29:47 +01:00
Mitchell Hashimoto
dc8f082392 macos: copy the key table action bytes 2025-12-20 20:36:35 -08:00
Mitchell Hashimoto
eac0ec14fd macOS: revamped key table/sequence UI 2025-12-20 20:27:56 -08:00
Mitchell Hashimoto
901618cd8f macOS: hook up key table apprt action to state 2025-12-20 20:01:38 -08:00
Mitchell Hashimoto
63422f4d4e add the catch_all binding key
Part of #9963

This adds a new special key `catch_all` that can be used in keybinding
definitions to match any key that is not explicitly bound. For example:
`keybind = catch_all=new_window` (chaos!). 

`catch_all` can be used in combination with modifiers, so if you want to
catch any non-bound key with Ctrl held down, you can do:
`keybind = ctrl+catch_all=new_window`.

`catch_all` can also be used with trigger sequences, so you can do:
`keybind = ctrl+a>catch_all=new_window` to catch any key pressed after
`ctrl+a` that is not explicitly bound and make a new window!

And if you want to remove the catch all binding, it is like any other:
`keybind = catch_all=unbind`.
2025-12-19 15:03:38 -08:00
Mitchell Hashimoto
842583b628 macos: fix uikit build 2025-12-17 10:26:02 -08:00
Mitchell Hashimoto
e1356538ac macos: show a highlight animation when a terminal is presented 2025-12-17 10:12:44 -08:00
Mitchell Hashimoto
5d11bdddc3 macos: implement the present terminal action so we can use that 2025-12-17 09:04:51 -08:00
himura467
4c6d3f8ed2 macos: add toggle_background_opacity keybind action 2025-12-16 11:32:10 -08:00
lorenries
d364e421a8 introduce split-preserve-zoom config to maintain zoomed splits during navigation 2025-12-16 11:14:09 -08:00
Mitchell Hashimoto
a6ddf03a2e remove the macos-background-style config 2025-12-15 10:54:35 -08:00
Mitchell Hashimoto
bb23071166 config: change macos-background-style to be enums on background-blur 2025-12-15 10:42:21 -08:00
Justy Null
45aceace72 fix: disable renderer background when macOS effects are enabled 2025-12-15 10:12:11 -08:00
Justy Null
d40af61960 refactor: migrate background glass effect to new macos-background-style config 2025-12-15 10:10:51 -08:00
Justy Null
a02364cbef feat: add liquid glass background effect support 2025-12-15 10:10:51 -08:00
Mitchell Hashimoto
05ee9ae733 macos: implement goto_window:next/previousu 2025-12-13 14:33:17 -08:00
Mitchell Hashimoto
19e0864688 macos: unintended change 2025-12-12 14:14:15 -08:00
Mitchell Hashimoto
43b4ed5bc0 macos: only show readonly badge on AppKit 2025-12-12 14:12:05 -08:00
Mitchell Hashimoto
22b8809858 macos: add a popover to the readonly badge with info 2025-12-12 14:02:45 -08:00
Mitchell Hashimoto
173d8efd90 macos: add to context menu 2025-12-12 13:55:03 -08:00
Mitchell Hashimoto
ceb1b5e587 macos: add a read-only menu item in View 2025-12-12 13:53:08 -08:00
Mitchell Hashimoto
ec2638b3c6 macos: readonly badge 2025-12-12 13:46:28 -08:00
Mitchell Hashimoto
6105344c31 macos: add change tab title to right click menu 2025-12-11 16:30:06 -08:00
Mitchell Hashimoto
65cf124e2c core: change apprt action to enum value instead of a new one 2025-12-11 16:09:45 -08:00
Mitchell Hashimoto
e93a4a911f macos: implement prompt_tab_title 2025-12-11 16:03:30 -08:00
George Papadakis
625d7274bf Add close tabs on the right action 2025-12-10 20:14:27 -08:00
Daniel Wennberg
93d77ae436 Always use overlay scroller, flash when mouse moved 2025-12-10 13:33:18 -08:00
Lars
0c9082eb72 macOS: fix theme reloading
### Background
After #9344, the Ghostty theme won't change after switching systems', and reverting #9344 will bring back the issue it fixed.

The reason these two issues are related is because the scheme change is based on changes of `effectiveAppearance`, which is also affected by setting the window's `appearance` or changing `NSAppearance.currentDrawing()`.

### Changes
Instead of observing `effectiveAppearance`, we now explicitly update the color scheme of surfaces, so that we can control when it happens to avoid callback loops and redundant updates.

### Regression Tests

- [x] #8282
- [x] Reloading with `window-theme = light` should update Ghostty with the default dark theme with a dark window theme (break before [#83104ff](83104ff27a))
- [x] `window-theme = light \n macos-titlebar-style = native` should update Ghostty with the default dark theme with a light window theme
- [x] Reloading from the default config to `theme=light:3024 Day,dark:3024 Night \n window-theme = light`, should update Ghostty with the theme `3024 Day` with a light window theme (break on [#d39cc6d](d39cc6d478))
- [x] Using `theme=light:3024 Day,dark:3024 Night`; Switching the system's appearance should change Ghostty's appearance (break on [#d39cc6d](d39cc6d478))
- [x] Reloading from `theme=light:3024 Day,dark:3024 Night` with a light window theme to the default config, should update Ghostty with the default dark theme with a dark window theme
- [x] Reloading from the default config to `theme=light:3024 Day,dark:3024 Night \n window-theme=dark`, should update Ghostty with the theme `3024 Night` with a dark window theme
- [x] Reloading from `theme=light:3024 Day,dark:3024 Night \n window-theme=dark` to `theme=light:3024 Day,dark:3024 Night` with light system appearance, should update Ghostty from dark to light
- [x] Reload with quick terminal open

# Conflicts:
#	macos/Sources/Features/Terminal/BaseTerminalController.swift
2025-12-07 09:18:45 +01:00
Mitchell Hashimoto
5c1679209d macos: add hover styles to search buttons, cursor changes 2025-11-27 13:01:51 -08:00
Lukas
dc08d057fe macOS: use ConcentricRectangle on Tahoe 2025-11-26 21:00:14 +01:00
Lukas
cbcd52846c macOS: fix search dragging animation when corner is not changed 2025-11-26 21:00:14 +01:00
Qwerasd
4b01163c79 fix(macos): use strings' utf-8 lengths for libghostty calls
Swift conveniently converts strings to UTF-8 encoded cstrings when
passing them to external functions, however our libghostty functions
also take a length and we were using String.count for that, which
returns the number of _characters_ not the byte length, which caused
searches with multi-byte characters to get truncated.

I went ahead and changed _all_ invocations that pass a string length to
use the utf-8 byte length even if the string is comptime-known and all
ASCII, just so that it's proper and if someone copies one of the calls
in the future for user-inputted data they don't reproduce this bug.

ref:
https://developer.apple.com/documentation/swift/string/count
https://developer.apple.com/documentation/swift/stringprotocol/lengthofbytes(using:)
2025-11-26 12:00:58 -07:00
avarayr
f5b923573d macOS: move search result counter inside text field
Move the search result counter (e.g. "1/30") inside the search text
field using an overlay, preventing layout shift when results appear.

This PR was authored with Claude Code.
2025-11-26 13:04:05 -05:00