diff --git a/include/ghostty.h b/include/ghostty.h
index a6283170d..cef635867 100644
--- a/include/ghostty.h
+++ b/include/ghostty.h
@@ -489,6 +489,8 @@ void ghostty_surface_split_equalize(ghostty_surface_t);
bool ghostty_surface_binding_action(ghostty_surface_t, const char *, uintptr_t);
void ghostty_surface_complete_clipboard_request(ghostty_surface_t, const char *, void *, bool);
uintptr_t ghostty_surface_pwd(ghostty_surface_t, char *, uintptr_t);
+bool ghostty_surface_has_selection(ghostty_surface_t);
+uintptr_t ghostty_surface_selection(ghostty_surface_t, char *, uintptr_t);
ghostty_inspector_t ghostty_surface_inspector(ghostty_surface_t);
void ghostty_inspector_free(ghostty_surface_t);
diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift
index 1aa27387e..d3d3e1f4b 100644
--- a/macos/Sources/App/macOS/AppDelegate.swift
+++ b/macos/Sources/App/macOS/AppDelegate.swift
@@ -17,7 +17,8 @@ class AppDelegate: NSObject,
category: String(describing: AppDelegate.self)
)
- /// Various menu items so that we can programmatically sync the keyboard shortcut with the Ghostty config.
+ /// Various menu items so that we can programmatically sync the keyboard shortcut with the Ghostty config
+ @IBOutlet private var menuServices: NSMenu?
@IBOutlet private var menuCheckForUpdates: NSMenuItem?
@IBOutlet private var menuOpenConfig: NSMenuItem?
@IBOutlet private var menuReloadConfig: NSMenuItem?
@@ -108,9 +109,11 @@ class AppDelegate: NSObject,
// Initial config loading
configDidReload(ghostty)
- // Register our service provider. This must happen after everything
- // else is initialized.
+ // Register our service provider. This must happen after everything is initialized.
NSApp.servicesProvider = ServiceProvider()
+
+ // This registers the Ghostty => Services menu to exist.
+ NSApp.servicesMenu = menuServices
// Configure user notifications
let actions = [
diff --git a/macos/Sources/App/macOS/MainMenu.xib b/macos/Sources/App/macOS/MainMenu.xib
index 2e6041bed..ca9cd1f35 100644
--- a/macos/Sources/App/macOS/MainMenu.xib
+++ b/macos/Sources/App/macOS/MainMenu.xib
@@ -40,6 +40,7 @@
+
@@ -76,6 +77,11 @@
+
+