Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions GhosttyTabs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
8C4BBF2DEF6DF93F395A9EE7 /* TerminalControllerSocketSecurityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491751CE2321474474F27DCF /* TerminalControllerSocketSecurityTests.swift */; };
2BB56A710BB1FC50367E5BCF /* TabManagerSessionSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10D684CFFB8CDEF89CE2D9E1 /* TabManagerSessionSnapshotTests.swift */; };
/* End PBXBuildFile section */
A5001651 /* ChromeCookieImporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001650 /* ChromeCookieImporter.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
A5001020 /* Embed Frameworks */ = {
Expand Down Expand Up @@ -292,6 +294,7 @@
EE0171AF1F49F7547191CEE5 /* SidebarWidthPolicyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarWidthPolicyTests.swift; sourceTree = "<group>"; };
491751CE2321474474F27DCF /* TerminalControllerSocketSecurityTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TerminalControllerSocketSecurityTests.swift; sourceTree = "<group>"; };
10D684CFFB8CDEF89CE2D9E1 /* TabManagerSessionSnapshotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabManagerSessionSnapshotTests.swift; sourceTree = "<group>"; };
A5001650 /* ChromeCookieImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Browser/ChromeCookieImporter.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -458,6 +461,7 @@
A5001222 /* WindowAccessor.swift */,
A5001611 /* SessionPersistence.swift */,
A5001641 /* RemoteRelayZshBootstrap.swift */,
A5001650 /* ChromeCookieImporter.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand Down Expand Up @@ -753,6 +757,7 @@
A500120C /* WindowAccessor.swift in Sources */,
A5001610 /* SessionPersistence.swift in Sources */,
A5001640 /* RemoteRelayZshBootstrap.swift in Sources */,
A5001651 /* ChromeCookieImporter.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
170 changes: 170 additions & 0 deletions Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -38453,6 +38453,23 @@
}
}
},
"menu.view.importChromeSessions": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Import Chrome Sessions"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "Chromeセッションをインポート"
}
}
}
},
"menu.view.jumpToUnread": {
"extractionState": "manual",
"localizations": {
Expand Down Expand Up @@ -51100,6 +51117,142 @@
}
}
},
"settings.browser.chromeCookie.autoImport": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Import Chrome Sessions on Launch"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "起動時にChromeセッションをインポート"
}
}
}
},
"settings.browser.chromeCookie.autoImport.subtitle": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Copies your Chrome login cookies into cmux's browser so you're already signed in."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "Chromeのログインクッキーをcmuxのブラウザにコピーし、すでにサインインした状態にします。"
}
}
}
},
"settings.browser.chromeCookie.importButton": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Import Now"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "今すぐインポート"
}
}
}
},
"settings.browser.chromeCookie.importNow": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Chrome Sessions"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "Chromeセッション"
}
}
}
},
"settings.browser.chromeCookie.importNow.subtitle": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Import cookies from Chrome now."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "今すぐChromeからクッキーをインポートします。"
}
}
}
},
"settings.browser.chromeCookie.importSuccess": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Imported %lld cookies from Chrome."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "Chromeから%lld個のクッキーをインポートしました。"
}
}
}
},
"settings.browser.chromeCookie.profile": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Chrome Profile"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "Chromeプロファイル"
}
}
}
},
"settings.browser.chromeCookie.profile.subtitle": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Which Chrome profile to import cookies from."
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "クッキーをインポートするChromeプロファイル。"
}
}
}
},
"settings.browser.externalPatterns": {
"extractionState": "manual",
"localizations": {
Expand Down Expand Up @@ -56903,6 +57056,23 @@
}
}
},
"settings.section.chromeSessions": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Chrome Sessions"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "Chromeセッション"
}
}
}
},
"settings.section.keyboardShortcuts": {
"extractionState": "manual",
"localizations": {
Expand Down
12 changes: 12 additions & 0 deletions Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2341,6 +2341,18 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
installBrowserAddressBarFocusObservers()
installShortcutMonitor()
installShortcutDefaultsObserver()

// Import Chrome cookies if enabled — run early so cookies are ready before browser panels open.
if !isRunningUnderXCTest && UserDefaults.standard.bool(forKey: ChromeCookieSettings.autoImportEnabledKey) {
ChromeCookieImporter.importCookies { result in
if let error = result.error {
NSLog("[ChromeCookieImporter] auto-import failed: \(error.localizedDescription)")
} else if result.cookieCount > 0 {
NSLog("[ChromeCookieImporter] auto-imported \(result.cookieCount) cookies from Chrome")
}
}
}

NSApp.servicesProvider = self
#if DEBUG
UpdateTestSupport.applyIfNeeded(to: updateController.viewModel)
Expand Down
Loading