Gregory Anders
98b43007a0
core: use ClipboardRequestType instead of ClipboardPromptReason
...
Instead of making a separate enum that must be translated from the
ClipboardRequest type, simply re-use ClipboardRequest to determine the
clipboard confirmation reason.
2023-11-10 23:12:39 -05:00
Gregory Anders
86245ff0cf
macos: add option to prompt user for confirmation on OSC 52 commands
2023-11-10 23:12:39 -05:00
Mitchell Hashimoto
dd1faf5e50
macos: handle preedit in AppKit, enables Korean input
2023-11-10 09:53:56 -08:00
Mitchell Hashimoto
d482fed7f2
simplify some swift
2023-11-07 15:26:41 -08:00
Gregory Anders
cd01340cce
macos: add key binding for equalizing split sizes
2023-11-07 16:23:28 -06:00
Gregory Anders
dc7c313166
macos: pass split as a binding to SplitView
...
Fixes: https://github.com/mitchellh/ghostty/issues/833
2023-11-07 11:55:29 -06:00
Mitchell Hashimoto
4e3ab4879d
Merge pull request #822 from gpanders/split-resizing
...
macos: implement split resizing
2023-11-06 09:35:43 -08:00
Mitchell Hashimoto
bc0d1a9255
macos: remove focused cell size resize increment setter
2023-11-06 09:11:50 -08:00
Mitchell Hashimoto
1ff0573518
macos: use normal swiftui parameters for resizable publisher/inc
2023-11-06 09:06:20 -08:00
Mitchell Hashimoto
f8b0654a19
Merge pull request #816 from Raiden1411/feat/options
...
feat: add support for `--fullscreen`, `--title` and `--class` values
2023-11-06 08:55:33 -08:00
Mitchell Hashimoto
efe9721c98
macos: honor fullscreen setting
2023-11-06 08:52:36 -08:00
Gregory Anders
582df33083
macos: use Ghostty.AppState as @EnvironmentObject
...
This is a small cleanup change. This provides the Ghostty.AppState
object to any view that needs it within the TerminalSplit view hierarchy
without needing to explicitly define EnvironmentKeys.
2023-11-05 20:42:59 -06:00
Gregory Anders
9b14398153
macos: support resizing splits
2023-11-05 20:42:59 -06:00
Gregory Anders
3b2799ce97
macos: refactor SplitNode
...
This commit does two things: adds a weak reference to the parent
container of each SplitNode.Container and SplitNode.Leaf and moves the
"direction" of a split out of the SplitNode enum and into the
SplitNode.Container struct as a field.
Both changes are required for supporting split resizing. A reference to
the parent in each leaf and split container is needed in order to
traverse upwards through the split tree. If the focused split is not
part of a container that is split along the direction that was requested
to be resized, then we instead try and resize the parent. If the parent
is split along the requested direction, then it is resized
appropriately; otherwise, repeat until the root of the tree is reached.
The direction is needed inside the SplitNode.Container object itself so
that the container knows whether or not it is able to resize itself in
the direction requested by the user. Once the split direction was moved
inside of SplitNode.Container, it became redundant to also have it as
part of the SplitNode enum, so this simplifies things.
2023-11-05 20:20:39 -06:00
Gregory Anders
f614d45e28
macos: set id on nested terminal splits
...
This fixes https://github.com/mitchellh/ghostty/issues/761 for terminal
splits that are not at the root.
2023-11-05 19:37:20 -06:00
Mitchell Hashimoto
ef44551522
apprt/embedded: hook up paste confirmation
2023-11-05 09:20:16 -08:00
Mitchell Hashimoto
c6ce9aea4a
macos: do not set window initial size if fullscreen
...
Fixes #798
2023-11-03 09:06:17 -07:00
Mitchell Hashimoto
ae104111d7
macos: fix some split focus issues
2023-10-30 22:48:35 -07:00
Mitchell Hashimoto
3cb0846d8c
macos: regressed #761
2023-10-30 19:25:02 -07:00
Mitchell Hashimoto
c18cf207d6
macos: rename all the 2-suffix
2023-10-30 14:40:45 -07:00
Mitchell Hashimoto
f6d98ae40f
macos: delete Ghostty.SplitView
2023-10-30 14:39:26 -07:00
Mitchell Hashimoto
b40245f01d
macos: remove old primary window stuff
2023-10-30 14:36:20 -07:00
Mitchell Hashimoto
c86faa37c2
macos: terminal controller owns split data
2023-10-30 14:31:04 -07:00
Mitchell Hashimoto
cd18f3455b
macos: add needsConfirmQuit helper to surface and split structs
2023-10-30 09:06:23 -07:00
Mitchell Hashimoto
c28a0e9ef0
macos: SplitNode must be hashable to detect change
...
Fixes #761
SplitNode not being hashable meant that when it was set to a value of
the same enum case, SwiftUI could not detect a change for re-render.
2023-10-29 17:39:07 -07:00
Gregory Anders
add2b675bd
config: add window-step-resize option
2023-10-27 09:33:56 -05:00
Gregory Anders
0f73bf32e6
macos: document SurfaceView.cellSize property
2023-10-27 09:23:17 -05:00
Gregory Anders
2ee80a52df
macos: set window resizeIncrements when cell size changes
...
The resizeIncrements property is only modified when the cell size of the
focused window changes. If two splits have the same cell size then the
property is not modified when focusing between the two splits.
2023-10-26 20:27:58 -05:00
Mitchell Hashimoto
be46bea40f
macos: fix warning from xcode
2023-10-26 14:45:55 -07:00
Mitchell Hashimoto
1696cf76b6
macos: free inspector when it is hidden
2023-10-25 09:09:10 -07:00
Mitchell Hashimoto
fc549978b9
macos: update inspector size in draw call
2023-10-24 15:27:16 -07:00
Mitchell Hashimoto
5e2bed62b3
macos: terminal inspector control
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
29bbcbbf92
core: add input binding to control terminal inspector
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
92d172377e
macos: don't do full surface-style key translation for imgui
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
b2fd3fae6c
macos: proper title when focusing the inspector
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
52ccef3b8e
macos: only re-render the inspector when requested
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
d50ff6ece7
macos: complete cimgui events
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
2c40183c3c
macos: rendering basic imgui
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
f15aaf3b9e
macos: use a MTKView subclass for the inspector
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
69cc6d11dc
macos: MetalView, render an MTKView
2023-10-24 15:27:14 -07:00
Jon Parise
d63c0df582
macos: always apply initial size to new windows
...
We would previously exit early for non-transparent windows, which
skipped the call to setInitialWindowSize().
2023-10-21 08:21:58 -07:00
Jon Parise
17b63f7617
config: add quit-after-last-window-closed
...
Whether or not to quit after the last window is closed. This defaults
to false. Currently only supported on macOS.
2023-10-18 14:03:32 -07:00
Mitchell Hashimoto
4341428c18
macos: make xcode 14 compatible, do not use switch expr
2023-10-16 20:05:32 -07:00
Gregory Anders
f966a5a163
macos: add menu items to modify font size
...
Add a new "View" menu to the menu bar with items to increase, decrease,
or reset the font size.
2023-10-16 20:32:33 -05:00
Mitchell Hashimoto
6990c1572a
macos: insertText should not include null char
2023-10-14 21:06:34 -07:00
Mitchell Hashimoto
f987a36fce
macos: escape shell-sensitive characters on filepath drop
2023-10-04 10:49:32 -07:00
Mitchell Hashimoto
2aacf6e130
macos: support dropping file urls onto surfaces
2023-10-04 08:01:13 -07:00
Mitchell Hashimoto
ee832aa361
apprt/embedded: ghostty_surface_text function, remove _char
2023-10-04 07:56:56 -07:00
Mitchell Hashimoto
e471228f6b
macos: surfaceview supports dropping file URLs, just logs for now
2023-10-03 22:40:56 -07:00
Mitchell Hashimoto
6249621d71
macos: support drag and drop with no windows
2023-10-03 22:03:04 -07:00