Skip to content

armgit / cra

Public Imported from GitHub
0

The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.

Arc parity: Show Little Window “Open In” Menu (⇧⌘O)

Victore8675b21420d
diff --git a/Sources/Cra/App/AppDelegate.swift b/Sources/Cra/App/AppDelegate.swift
index 60c1bc4..fea53b9 100644
--- a/Sources/Cra/App/AppDelegate.swift
+++ b/Sources/Cra/App/AppDelegate.swift
@@ -1111,7 +1111,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {
return !SystemIntegration.shared.isDefaultBrowser
case "pictureInPicture":
item.title = main.currentBrowser?.isInPictureInPicture == true ? "Exit Picture in Picture" : "Picture in Picture"
- case "promoteLittleWindow": return keyLittleWindow?.hasPage ?? false
+ case "promoteLittleWindow", "littleWindowOpenInMenu": return keyLittleWindow?.hasPage ?? false
case "checkForUpdates": return SoftwareUpdater.shared.validateMenuItem(item)
case "closeSplitPane", "separateFromSplit", "flipSplitOrientation":
return store.selectedTabID.flatMap { store.splitContaining($0) } != nil
@@ -1240,7 +1240,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {
switch id {
case "newLittleWindow": openLittleWindow(url: "")
case "closeLittleWindows": closeLittleWindows()
- case "promoteLittleWindow": break // only meaningful while a little window is key
+ case "promoteLittleWindow", "littleWindowOpenInMenu": break // only meaningful while a little window is key
case "newTab": main.openCommandBar(.newTab)
case "newWindow": openNewWindow()
case "newIncognitoWindow": openNewWindow(incognito: true)
@@ -1597,7 +1597,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {
window.addItem(.separator())
window.addItem(item("openLibrary")); window.addItem(item("viewDownloads")); window.addItem(item("viewMedia"))
window.addItem(.separator())
- window.addItem(item("promoteLittleWindow")); window.addItem(item("closeLittleWindows"))
+ window.addItem(item("promoteLittleWindow")); window.addItem(item("littleWindowOpenInMenu")); window.addItem(item("closeLittleWindows"))
window.addItem(.separator())
window.addItem(std("Bring All to Front", #selector(NSApplication.arrangeInFront(_:))))
menubar.addItem(submenu: window, title: "Window")
diff --git a/Sources/Cra/App/KeyBindings.swift b/Sources/Cra/App/KeyBindings.swift
index 50780be..ea90656 100644
--- a/Sources/Cra/App/KeyBindings.swift
+++ b/Sources/Cra/App/KeyBindings.swift
@@ -235,6 +235,9 @@ final class KeyBindingRegistry {
KeyAction(id: "stayOnTop", name: "Stay On Top", section: .window, shortcuts: [], triggers: ["stay on top", "float", "always on top", "pin window"]),
// Arc's Little Arc "Open in Space" button (LittleBrowserMoveButton) and "Close Little Arc Windows".
KeyAction(id: "promoteLittleWindow", name: "Open Little Window in Space", section: .window, shortcuts: [Shortcut("o", cmd)], inCommandBar: false),
+ // Arc: Show Little Arc "Open In" Menu ⇧⌘O.
+ KeyAction(id: "littleWindowOpenInMenu", name: "Show Little Window “Open In” Menu", section: .window,
+ shortcuts: [Shortcut("o", cmdShift)], inCommandBar: false),
KeyAction(id: "closeLittleWindows", name: "Close Little Windows", section: .window, shortcuts: [], triggers: ["close little"]),
// App
KeyAction(id: "settings", name: "Settings…", section: .app, shortcuts: [Shortcut(",", cmd)], triggers: ["preferences", "settings"]),
diff --git a/Sources/Cra/UI/Windows/LittleWindowController.swift b/Sources/Cra/UI/Windows/LittleWindowController.swift
index 5f59281..f7711ec 100644
--- a/Sources/Cra/UI/Windows/LittleWindowController.swift
+++ b/Sources/Cra/UI/Windows/LittleWindowController.swift
@@ -934,6 +934,8 @@ final class LittleWindowController: NSWindowController, NSWindowDelegate, @preco
browser?.showDevTools()
case "print": browser?.print()
case "promoteLittleWindow": promote(to: nil)
+ // Arc's Show Little Arc "Open In" Menu (⇧⌘O): the ⌄ button's list of spaces.
+ case "littleWindowOpenInMenu": if hasPage, !isPeek { togglePopup() }
// Move Tab to Space N (⌃⌘N, #86) sends the page there, as the spaces popup does (#92).
case let id where id.hasPrefix("moveTabToSpace"):
if let n = Int(id.dropFirst(14)), n >= 1, n <= store.spaceOrder.count { promote(to: store.spaceOrder[n - 1]) }
diff --git a/docs/arc-parity.md b/docs/arc-parity.md
index 6613352..79d806b 100644
--- a/docs/arc-parity.md
+++ b/docs/arc-parity.md
@@ -59,7 +59,7 @@ Arc's actions (Settings ▸ Shortcuts, 106 rows) that Cra has no action for:
| Switch to Split View 1–4 | ⌃⇧1…4 | done |
| Expand Current Split | — | missing (Cra has Flip orientation) |
| Open Extensions | ⌘E | done |
-| Show Little Arc "Open In" Menu | ⇧⌘O | missing |
+| Show Little Arc "Open In" Menu | ⇧⌘O | done |
| Open Little Arc or Peek in… | ⌘O | partial (Window menu) |
| Network Inspector | — | *skip* (DevTools has it) |
| Exit | ⎋ | n/a |
@@ -118,6 +118,7 @@ in this sweep (Essential Shortcuts window, Library pages).
- View ▸ Cast… and Help ▸ Troubleshooting ▸ Open Task Manager, Chrome's own (ExecuteChromeCommand).
- Sidebar tab menu: Change Icon… and Share ▸.
- Settings ▸ Advanced ▸ "When opening Cra, restore windows from previous session".
+- Show Little Window "Open In" Menu (⇧⌘O): the Little Window's list of spaces.
## Left for later, and why