diff --git a/include/ghostty.h b/include/ghostty.h
index 702a88ecc..a75fdc245 100644
--- a/include/ghostty.h
+++ b/include/ghostty.h
@@ -573,6 +573,12 @@ typedef enum {
GHOSTTY_QUIT_TIMER_STOP,
} ghostty_action_quit_timer_e;
+// apprt.action.Readonly
+typedef enum {
+ GHOSTTY_READONLY_OFF,
+ GHOSTTY_READONLY_ON,
+} ghostty_action_readonly_e;
+
// apprt.action.DesktopNotification.C
typedef struct {
const char* title;
@@ -837,6 +843,7 @@ typedef enum {
GHOSTTY_ACTION_END_SEARCH,
GHOSTTY_ACTION_SEARCH_TOTAL,
GHOSTTY_ACTION_SEARCH_SELECTED,
+ GHOSTTY_ACTION_READONLY,
} ghostty_action_tag_e;
typedef union {
@@ -874,6 +881,7 @@ typedef union {
ghostty_action_start_search_s start_search;
ghostty_action_search_total_s search_total;
ghostty_action_search_selected_s search_selected;
+ ghostty_action_readonly_e readonly;
} ghostty_action_u;
typedef struct {
diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift
index 8baee3d89..043d85e1e 100644
--- a/macos/Sources/App/macOS/AppDelegate.swift
+++ b/macos/Sources/App/macOS/AppDelegate.swift
@@ -69,6 +69,7 @@ class AppDelegate: NSObject,
@IBOutlet private var menuResetFontSize: NSMenuItem?
@IBOutlet private var menuChangeTitle: NSMenuItem?
@IBOutlet private var menuChangeTabTitle: NSMenuItem?
+ @IBOutlet private var menuReadonly: NSMenuItem?
@IBOutlet private var menuQuickTerminal: NSMenuItem?
@IBOutlet private var menuTerminalInspector: NSMenuItem?
@IBOutlet private var menuCommandPalette: NSMenuItem?
@@ -544,6 +545,7 @@ class AppDelegate: NSObject,
self.menuQuickTerminal?.setImageIfDesired(systemSymbolName: "apple.terminal")
self.menuChangeTabTitle?.setImageIfDesired(systemSymbolName: "pencil.line")
self.menuTerminalInspector?.setImageIfDesired(systemSymbolName: "scope")
+ self.menuReadonly?.setImageIfDesired(systemSymbolName: "eye.fill")
self.menuToggleFullScreen?.setImageIfDesired(systemSymbolName: "square.arrowtriangle.4.outward")
self.menuToggleVisibility?.setImageIfDesired(systemSymbolName: "eye")
self.menuZoomSplit?.setImageIfDesired(systemSymbolName: "arrow.up.left.and.arrow.down.right")
diff --git a/macos/Sources/App/macOS/MainMenu.xib b/macos/Sources/App/macOS/MainMenu.xib
index d009b9c62..a321061dd 100644
--- a/macos/Sources/App/macOS/MainMenu.xib
+++ b/macos/Sources/App/macOS/MainMenu.xib
@@ -47,6 +47,7 @@
+
@@ -328,6 +329,12 @@
+