diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 9bb3e8596..abd7f2594 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -12,7 +12,7 @@ on: jobs: pre-release: name: Development Build - runs-on: macos-26 + runs-on: xcode-27 permissions: contents: write pull-requests: write @@ -44,7 +44,7 @@ jobs: echo "FROM_TAG=$FROM_TAG" >> $GITHUB_ENV - name: 🔧 Select Xcode - run: sudo xcode-select -s "/Applications/Xcode_26.4.app" + run: sudo xcode-select -s "/Applications/Xcode_27.0.app" - name: 🎟️ Install Development & Developer ID Certificate env: diff --git a/Loop.xcodeproj/project.pbxproj b/Loop.xcodeproj/project.pbxproj index 3b7b21931..be782c1c3 100644 --- a/Loop.xcodeproj/project.pbxproj +++ b/Loop.xcodeproj/project.pbxproj @@ -7,13 +7,13 @@ objects = { /* Begin PBXBuildFile section */ - 2A28492B2F22B4B700F6CE42 /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2A28492A2F22B4B700F6CE42 /* Scribe */; }; + 2A03B7272FFD8ECC00B2243F /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2A03B7262FFD8ECC00B2243F /* Scribe */; }; + 2A03B7292FFD8EDC00B2243F /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2A03B7282FFD8EDC00B2243F /* Scribe */; }; 2A28B6292EE5050C00A1E26B /* Defaults in Frameworks */ = {isa = PBXBuildFile; productRef = 2A28B6282EE5050C00A1E26B /* Defaults */; }; + 2A504E822FFD8E5400694B30 /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2A504E812FFD8E5400694B30 /* Scribe */; }; + 2A504E872FFD8E7700694B30 /* Luminare in Frameworks */ = {isa = PBXBuildFile; productRef = 2A504E862FFD8E7700694B30 /* Luminare */; }; + 2A504E8A2FFD8E8800694B30 /* Subsurface in Frameworks */ = {isa = PBXBuildFile; productRef = 2A504E892FFD8E8800694B30 /* Subsurface */; }; 2A86890D2F80968A005B521B /* LoopDockTile.plugin in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2A8689072F809625005B521B /* LoopDockTile.plugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 2AC4F4A82FDCAF1F00CB2FBE /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2AF9238D2F540B1300F467FD /* Scribe */; }; - 2AC4F62C2FDCAF7100CB2FBE /* Luminare in Frameworks */ = {isa = PBXBuildFile; productRef = 2AC4F62B2FDCAF7100CB2FBE /* Luminare */; }; - 2AE091C72F81A22800EF6149 /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2AE091C62F81A22800EF6149 /* Scribe */; }; - 2AF923902F540B2200F467FD /* Scribe in Frameworks */ = {isa = PBXBuildFile; productRef = 2AF9238F2F540B2200F467FD /* Scribe */; }; 3ED0A7B92F21DF6800A58629 /* ZIPFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = 3ED0A7B82F21DF6800A58629 /* ZIPFoundation */; }; B1AA00412F30000100AABBCC /* LoopUpdaterHelper in CopyFiles */ = {isa = PBXBuildFile; fileRef = B1AA00012F30000100AABBCC /* LoopUpdaterHelper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; F06D768A2DFF7A77007EEDA9 /* SkyLight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F06D76892DFF7A77007EEDA9 /* SkyLight.framework */; }; @@ -129,7 +129,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2AE091C72F81A22800EF6149 /* Scribe in Frameworks */, + 2A03B7272FFD8ECC00B2243F /* Scribe in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -144,12 +144,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2AC4F4A82FDCAF1F00CB2FBE /* Scribe in Frameworks */, 2A28B6292EE5050C00A1E26B /* Defaults in Frameworks */, - 2A28492B2F22B4B700F6CE42 /* Scribe in Frameworks */, + 2A504E8A2FFD8E8800694B30 /* Subsurface in Frameworks */, F06D768A2DFF7A77007EEDA9 /* SkyLight.framework in Frameworks */, + 2A504E822FFD8E5400694B30 /* Scribe in Frameworks */, + 2A504E872FFD8E7700694B30 /* Luminare in Frameworks */, 3ED0A7B92F21DF6800A58629 /* ZIPFoundation in Frameworks */, - 2AC4F62C2FDCAF7100CB2FBE /* Luminare in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -157,7 +157,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2AF923902F540B2200F467FD /* Scribe in Frameworks */, + 2A03B7292FFD8EDC00B2243F /* Scribe in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -222,7 +222,7 @@ ); name = LoopDockTile; packageProductDependencies = ( - 2AE091C62F81A22800EF6149 /* Scribe */, + 2A03B7262FFD8ECC00B2243F /* Scribe */, ); productName = LoopDockTile; productReference = 2A8689072F809625005B521B /* LoopDockTile.plugin */; @@ -275,9 +275,9 @@ packageProductDependencies = ( 2A28B6282EE5050C00A1E26B /* Defaults */, 3ED0A7B82F21DF6800A58629 /* ZIPFoundation */, - 2A28492A2F22B4B700F6CE42 /* Scribe */, - 2AF9238D2F540B1300F467FD /* Scribe */, - 2AC4F62B2FDCAF7100CB2FBE /* Luminare */, + 2A504E812FFD8E5400694B30 /* Scribe */, + 2A504E862FFD8E7700694B30 /* Luminare */, + 2A504E892FFD8E8800694B30 /* Subsurface */, ); productName = WindowManager; productReference = A8E59C35297F5E9A0064D4BA /* Loop.app */; @@ -300,7 +300,7 @@ ); name = LoopUpdaterHelper; packageProductDependencies = ( - 2AF9238F2F540B2200F467FD /* Scribe */, + 2A03B7282FFD8EDC00B2243F /* Scribe */, ); productName = LoopUpdaterHelper; productReference = B1AA00012F30000100AABBCC /* LoopUpdaterHelper */; @@ -355,8 +355,9 @@ packageReferences = ( 2A28B6272EE5050C00A1E26B /* XCRemoteSwiftPackageReference "Defaults" */, 3ED0A7B72F21DF6800A58629 /* XCRemoteSwiftPackageReference "ZIPFoundation" */, - 2AF9238C2F540B1300F467FD /* XCRemoteSwiftPackageReference "Scribe" */, - 2AC4F62A2FDCAF7100CB2FBE /* XCRemoteSwiftPackageReference "Luminare" */, + 2A504E802FFD8E5400694B30 /* XCRemoteSwiftPackageReference "Scribe" */, + 2A504E852FFD8E7700694B30 /* XCRemoteSwiftPackageReference "Luminare" */, + 2A504E882FFD8E8800694B30 /* XCRemoteSwiftPackageReference "Subsurface" */, ); productRefGroup = A8E59C36297F5E9A0064D4BA /* Products */; projectDirPath = ""; @@ -1064,17 +1065,25 @@ minimumVersion = 9.0.0; }; }; - 2AC4F62A2FDCAF7100CB2FBE /* XCRemoteSwiftPackageReference "Luminare" */ = { + 2A504E802FFD8E5400694B30 /* XCRemoteSwiftPackageReference "Scribe" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/MrKai77/Luminare"; + repositoryURL = "https://github.com/SenpaiHunters/Scribe"; requirement = { branch = main; kind = branch; }; }; - 2AF9238C2F540B1300F467FD /* XCRemoteSwiftPackageReference "Scribe" */ = { + 2A504E852FFD8E7700694B30 /* XCRemoteSwiftPackageReference "Luminare" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/SenpaiHunters/Scribe"; + repositoryURL = "https://github.com/mrkai77/Luminare"; + requirement = { + branch = main; + kind = branch; + }; + }; + 2A504E882FFD8E8800694B30 /* XCRemoteSwiftPackageReference "Subsurface" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/mrkai77/Subsurface"; requirement = { branch = main; kind = branch; @@ -1091,8 +1100,14 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 2A28492A2F22B4B700F6CE42 /* Scribe */ = { + 2A03B7262FFD8ECC00B2243F /* Scribe */ = { isa = XCSwiftPackageProductDependency; + package = 2A504E802FFD8E5400694B30 /* XCRemoteSwiftPackageReference "Scribe" */; + productName = Scribe; + }; + 2A03B7282FFD8EDC00B2243F /* Scribe */ = { + isa = XCSwiftPackageProductDependency; + package = 2A504E802FFD8E5400694B30 /* XCRemoteSwiftPackageReference "Scribe" */; productName = Scribe; }; 2A28B6282EE5050C00A1E26B /* Defaults */ = { @@ -1100,25 +1115,20 @@ package = 2A28B6272EE5050C00A1E26B /* XCRemoteSwiftPackageReference "Defaults" */; productName = Defaults; }; - 2AC4F62B2FDCAF7100CB2FBE /* Luminare */ = { - isa = XCSwiftPackageProductDependency; - package = 2AC4F62A2FDCAF7100CB2FBE /* XCRemoteSwiftPackageReference "Luminare" */; - productName = Luminare; - }; - 2AE091C62F81A22800EF6149 /* Scribe */ = { + 2A504E812FFD8E5400694B30 /* Scribe */ = { isa = XCSwiftPackageProductDependency; - package = 2AF9238C2F540B1300F467FD /* XCRemoteSwiftPackageReference "Scribe" */; + package = 2A504E802FFD8E5400694B30 /* XCRemoteSwiftPackageReference "Scribe" */; productName = Scribe; }; - 2AF9238D2F540B1300F467FD /* Scribe */ = { + 2A504E862FFD8E7700694B30 /* Luminare */ = { isa = XCSwiftPackageProductDependency; - package = 2AF9238C2F540B1300F467FD /* XCRemoteSwiftPackageReference "Scribe" */; - productName = Scribe; + package = 2A504E852FFD8E7700694B30 /* XCRemoteSwiftPackageReference "Luminare" */; + productName = Luminare; }; - 2AF9238F2F540B2200F467FD /* Scribe */ = { + 2A504E892FFD8E8800694B30 /* Subsurface */ = { isa = XCSwiftPackageProductDependency; - package = 2AF9238C2F540B1300F467FD /* XCRemoteSwiftPackageReference "Scribe" */; - productName = Scribe; + package = 2A504E882FFD8E8800694B30 /* XCRemoteSwiftPackageReference "Subsurface" */; + productName = Subsurface; }; 3ED0A7B82F21DF6800A58629 /* ZIPFoundation */ = { isa = XCSwiftPackageProductDependency; diff --git a/Loop.xcodeproj/xcshareddata/xcschemes/Loop (GH ACTIONS).xcscheme b/Loop.xcodeproj/xcshareddata/xcschemes/Loop (GH ACTIONS).xcscheme index cec07c51f..2e16e408f 100644 --- a/Loop.xcodeproj/xcshareddata/xcschemes/Loop (GH ACTIONS).xcscheme +++ b/Loop.xcodeproj/xcshareddata/xcschemes/Loop (GH ACTIONS).xcscheme @@ -35,6 +35,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "2ACE2DE83043A6F600C4FECB" BuildableName = "LoopTests.xctest" + BlueprintName = "LoopTests" ReferencedContainer = "container:Loop.xcodeproj"> diff --git a/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme b/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme index cfe4a5520..bd543dfc1 100644 --- a/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme +++ b/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme @@ -73,6 +73,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "2ACE2DE83043A6F600C4FECB" BuildableName = "LoopTests.xctest" + BlueprintName = "LoopTests" ReferencedContainer = "container:Loop.xcodeproj"> @@ -104,6 +105,11 @@ value = "1" isEnabled = "NO"> + + = [ + "com.apple.dock", + "com.apple.WindowManager" + ] + /// Takes a screenshot of the main display. /// - Returns: An NSImage of the screenshot or nil if the operation fails. /// /// This method attempts to capture the desktop wallpaper using three approaches: - /// 1. First, it tries to find and capture the Dock's wallpaper window directly that matches our screen dimensions - /// 2. If that fails, it tries to capture any wallpaper window from the Dock (even if not on our exact screen) + /// 1. First, it tries to find and capture the system wallpaper window directly that matches our screen dimensions + /// 2. If that fails, it tries to capture any system wallpaper window (even if not on our exact screen) /// 3. As a last resort, it falls back to capturing the entire screen /// /// The direct wallpaper capture is preferred as it gets only the wallpaper without desktop icons, @@ -24,13 +31,13 @@ final class WallpaperImageFetcher { let screen = NSScreen.screenWithMouse ?? NSScreen.main ?? NSScreen.screens[0] let screenFrame = screen.displayBounds - // First try to get the wallpaper window from the Dock app that matches our screen dimensions - if let wallpaperImage = try? await captureWallpaperFromDock(screenFrame: screenFrame, matchFrame: true) { + // First try to get the wallpaper window from the system that matches our screen dimensions + if let wallpaperImage = try? await captureSystemWallpaper(screenFrame: screenFrame, matchFrame: true) { return wallpaperImage } - // Second fallback: try to get any wallpaper window from the Dock, regardless of screen dimensions - if let anyWallpaperImage = try? await captureWallpaperFromDock(screenFrame: screenFrame, matchFrame: false) { + // Second fallback: try to get any wallpaper window, regardless of screen dimensions + if let anyWallpaperImage = try? await captureSystemWallpaper(screenFrame: screenFrame, matchFrame: false) { return anyWallpaperImage } @@ -42,22 +49,30 @@ final class WallpaperImageFetcher { throw WallpaperProcessorError.screenshotFailed } - /// Attempts to capture the wallpaper window from the Dock app. + /// Attempts to capture the wallpaper window from the Dock or WindowManager. /// - Parameters: /// - screenFrame: The frame of the screen to capture. /// - matchFrame: Whether to match the exact screen frame dimensions or get any wallpaper window. /// - Returns: An NSImage of the wallpaper or nil if the operation fails. /// - /// This approach uses window capturing APIs to specifically target the Dock's wallpaper window. + /// This approach uses window capturing APIs to specifically target the systems wallpaper window. /// It requires appropriate permissions, but provides the cleanest capture of just the wallpaper. - /// The method identifies the wallpaper window by filtering window properties from the Dock process. - private func captureWallpaperFromDock(screenFrame: CGRect, matchFrame: Bool) async throws -> NSImage? { - // Get all windows and filter for the Dock's wallpaper windows + /// The method identifies the wallpaper window by filtering window properties from the Dock/WindowManager process. + private func captureSystemWallpaper(screenFrame: CGRect, matchFrame: Bool) async throws -> NSImage? { + // Get all windows and filter for the wallpaper windows let windows = CGWindowListCopyWindowInfo(.optionAll, kCGNullWindowID) as! [[CFString: Any]] var wallpaperWindows = windows - .filter { $0[kCGWindowOwnerName] as? String == "Dock" } + .filter { window in + guard let pid = window[kCGWindowOwnerPID] as? pid_t, + let bundleIdentifier = NSRunningApplication(processIdentifier: pid)?.bundleIdentifier + else { + return false + } + return Self.wallpaperOwnerBundleIDs.contains(bundleIdentifier) + } .filter { ($0[kCGWindowName] as? String ?? "").contains("Wallpaper") } .filter { $0[kCGWindowIsOnscreen] as? Int == 1 } + .filter { ($0[kCGWindowLayer] as? Int ?? 0) <= CGWindowLevelForKey(.desktopWindow) } // Apply additional frame filtering only if matchFrame is true if matchFrame { diff --git a/Loop/App/AppDelegate+UNNotifications.swift b/Loop/App/AppDelegate+UNNotifications.swift index fb3c08fd9..470714876 100644 --- a/Loop/App/AppDelegate+UNNotifications.swift +++ b/Loop/App/AppDelegate+UNNotifications.swift @@ -49,7 +49,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate { private static func registerNotificationCategories() { let setIconAction = UNNotificationAction( identifier: "setIconAction", - title: String(localized: "Set Current Icon", comment: "Label for a button that lets the user set their icon for Loop"), + title: String(localized: "Use This Icon", comment: "Notification action button that sets the newly unlocked icon as Loop's icon"), options: .destructive ) let notificationCategory = UNNotificationCategory( diff --git a/Loop/App/AppDelegate.swift b/Loop/App/AppDelegate.swift index 119fdb424..29458cf77 100644 --- a/Loop/App/AppDelegate.swift +++ b/Loop/App/AppDelegate.swift @@ -27,12 +27,14 @@ final class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_: Notification) { configureLogging() + DefaultsiCloudSyncRegistrar.register() // Register before broadcasting so other instances can receive the signal registerTerminateObserver() - Task { + let dataPatcherTask = Task { @MainActor in await Defaults.iCloud.waitForSyncCompletion() + DataPatcher.run() } // Show settings window only if not launched as login item AND startHidden is disabled @@ -43,7 +45,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate { SettingsWindowManager.shared.close() } - DataPatcher.run() IconManager.refreshCurrentAppIcon() LaunchAtLoginManager.shared.start() @@ -58,10 +59,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate { andEventID: AEEventID(kAEGetURL) ) - let stalePIDs = broadcastTerminateToOtherInstances() - // Wait for other instances to fully exit before installing event taps to prevent conflicts Task { @MainActor in + await dataPatcherTask.value + + let stalePIDs = broadcastTerminateToOtherInstances() await waitForInstancesToExit(pids: stalePIDs, timeout: .seconds(3)) LoopManager.shared.start() WindowDragManager.shared.addObservers() diff --git a/Loop/App/DataPatcher.swift b/Loop/App/DataPatcher.swift index ab269979c..e4ba90a46 100644 --- a/Loop/App/DataPatcher.swift +++ b/Loop/App/DataPatcher.swift @@ -40,6 +40,28 @@ enum DataPatcher { Defaults[.hideOnNoSelection] = Defaults[.hideUntilDirectionIsChosen] Defaults.reset(.hideUntilDirectionIsChosen) } + + runPatchIfNeeded(patch: .splitRadialMenuPresentationPolicies, initialPatches: initialPatches) { + let hideOnNoSelection = Defaults[.hideOnNoSelection] || Defaults[.hideUntilDirectionIsChosen] + Defaults[.hideOnNoSelectionForKeybinds] = hideOnNoSelection + Defaults[.hideOnNoSelectionForGestures] = hideOnNoSelection + Defaults.reset(.hideOnNoSelection) + Defaults.reset(.hideUntilDirectionIsChosen) + } + + runPatchIfNeeded(patch: .keepCustomizedPreviewBackground, initialPatches: initialPatches) { + // Users who changed the blur or accent opacity keep the custom background + let blurKey = Defaults.Keys.previewBackgroundEnableBlur + let accentKey = Defaults.Keys.previewBackgroundAccentOpacity + let customizedBlur = UserDefaults.standard.object(forKey: blurKey.name) != nil + && Defaults[blurKey] != blurKey.defaultValue + let customizedAccent = UserDefaults.standard.object(forKey: accentKey.name) != nil + && Defaults[accentKey] != accentKey.defaultValue + + if customizedBlur || customizedAccent { + Defaults[.previewBackgroundStyle] = .custom + } + } } private static func runPatchIfNeeded(patch: Patches, initialPatches: Patches, with callback: () -> ()) { @@ -62,6 +84,12 @@ enum DataPatcher { /// Key was renamed from `hideUntilDirectionIsChosen` to `hideOnNoSelection` with slightly different behavior static let changeTohideOnNoSelection = Self(rawValue: 1 << 2) + + /// Split the global no-selection setting into trigger-specific presentation policies. + static let splitRadialMenuPresentationPolicies = Self(rawValue: 1 << 3) + + /// The preview background now defaults to the system style, so users who customized it keep the custom style. + static let keepCustomizedPreviewBackground = Self(rawValue: 1 << 4) } } @@ -77,5 +105,6 @@ private extension Defaults.Keys { static let processWallpaper = Key("processWallpaper", default: false) // IndicatorService + static let hideOnNoSelection = Key("hideOnNoSelection", default: false) static let hideUntilDirectionIsChosen = Key("hideUntilDirectionIsChosen", default: false) } diff --git a/Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/Contents.json b/Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/Contents.json new file mode 100644 index 000000000..a5720cbe6 --- /dev/null +++ b/Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "arrow.trianglehead.swap.rotated.svg", + "idiom" : "universal" + } + ] +} diff --git a/Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/arrow.trianglehead.swap.rotated.svg b/Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/arrow.trianglehead.swap.rotated.svg new file mode 100644 index 000000000..b5e04e479 --- /dev/null +++ b/Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/arrow.trianglehead.swap.rotated.svg @@ -0,0 +1,89 @@ + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.7.0 + Requires Xcode 17 or greater + Generated from arrow.trianglehead.swap + Typeset at 100.0 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Loop/Core/LoopManager.swift b/Loop/Core/LoopManager.swift index 2879b26c8..6feadc7d1 100644 --- a/Loop/Core/LoopManager.swift +++ b/Loop/Core/LoopManager.swift @@ -25,12 +25,14 @@ final class LoopManager { private let updater = Updater.shared private var accessibilityCheckerTask: Task<(), Never>? + private var gestureToggleTask: Task<(), Never>? /// Opening prepares resizeContext asynchronously. We track that setup separately /// so rapid trigger events cannot act on the previous/default context. private var isLoopOpening: Bool = false private var pendingOpeningAction: WindowAction? private var shouldCancelOpening: Bool = false + private var hideIndicatorOnNoSelection = false private var actionRevision: UInt64 = 0 private(set) var isLoopActive: Bool = false { @@ -60,7 +62,10 @@ final class LoopManager { windowActionCache: windowActionCache, openCallback: { [weak self] action in Task { - await self?.openLoop(startingAction: action) + try? await self?.openLoop( + startingAction: action, + hideIndicatorOnNoSelection: Defaults[.hideOnNoSelectionForKeybinds] + ) } }, closeCallback: { [weak self] forceClose in @@ -76,7 +81,10 @@ final class LoopManager { private(set) lazy var middleClickTrigger = MiddleClickTrigger( openCallback: { [weak self] action in Task { - await self?.openLoop(startingAction: action) + try? await self?.openLoop( + startingAction: action, + hideIndicatorOnNoSelection: Defaults[.hideOnNoSelectionForKeybinds] + ) } }, closeCallback: { [weak self] forceClose in @@ -87,6 +95,36 @@ final class LoopManager { checkIfLoopOpen: { [weak self] in self?.isLoopActiveAtomic ?? false } ) + private(set) lazy var multitouchTrigger = MultitouchTrigger( + windowActionCache: windowActionCache, + openCallback: { [weak self] action, window in + guard let self else { return .cancelled } + return try await openLoop( + startingAction: action, + window: window, + hideIndicatorOnNoSelection: Defaults[.hideOnNoSelectionForGestures] + ) + }, + closeCallback: { [weak self] forceClose in + Task { + await self?.closeLoop(forceClose: forceClose) + } + }, + changeAction: { [weak self] action, reverse, canAdvanceCycle in + Task { + await self?.changeAction( + action, + canAdvanceCycle: canAdvanceCycle, + resumeCycleProgress: true, + reverse: reverse + ) + } + }, + checkIfLoopOpen: { [weak self] in + self?.isLoopActive ?? false + } + ) + private(set) lazy var mouseInteractionObserver = MouseInteractionObserver( windowActionCache: windowActionCache, changeAction: { [weak self] newAction in @@ -96,10 +134,26 @@ final class LoopManager { await self?.changeAction(newAction, canAdvanceCycle: false) } }, - selectNextCycleItem: { [weak self] in + advanceSelectedAction: { [weak self] selectedAction in Task { - if let parent = self?.resizeContext.parentAction { - await self?.changeAction(parent, disableHapticFeedback: true) + guard let self else { return } + + if let selectedAction, selectedAction.id != self.resizeContext.action.id { + return + } + + if let selectedAction { + await self.changeAction( + selectedAction, + disableHapticFeedback: true, + canAdvanceCycle: false + ) + } else if let parent = self.resizeContext.parentAction { + await self.changeAction( + parent, + disableHapticFeedback: true, + canAdvanceCycle: true + ) } } }, @@ -119,9 +173,25 @@ final class LoopManager { if status { await keybindTrigger.start() middleClickTrigger.start() + if Defaults[.enableGestures] { + multitouchTrigger.start() + } } else { keybindTrigger.stop() middleClickTrigger.stop() + multitouchTrigger.stop() + } + } + } + + gestureToggleTask = Task(priority: .background) { [weak self] in + for await enabled in Defaults.updates(.enableGestures, initial: false) { + guard let self, !Task.isCancelled else { break } + + if enabled, AccessibilityManager.shared.isGranted { + multitouchTrigger.start() + } else { + multitouchTrigger.stop() } } } @@ -132,12 +202,15 @@ final class LoopManager { accessibilityCheckerTask?.cancel() accessibilityCheckerTask = nil + gestureToggleTask?.cancel() + gestureToggleTask = nil indicatorService.closeAll() keybindTrigger.stop() middleClickTrigger.stop() mouseInteractionObserver.stop() + multitouchTrigger.shutdown() triggerKeyTimeoutTimer.cancel() isLoopOpening = false @@ -148,19 +221,54 @@ final class LoopManager { } } +enum LoopManagerError: LocalizedError { + case accessibilityNotGranted + case appExcluded + case fullscreenWindow + case missionControlShowing + + var errorDescription: String? { + switch self { + case .accessibilityNotGranted: + "Cannot open Loop: accessibility permission not granted" + case .appExcluded: + "Cannot open Loop: app is excluded" + case .fullscreenWindow: + "Cannot open Loop: target window is fullscreen" + case .missionControlShowing: + "Cannot open Loop: Mission Control or App Exposé is showing" + } + } +} + +enum LoopOpenResult { + case opened + case alreadyOpening + case alreadyOpen + case cancelled +} + // MARK: - Opening/Closing Loop extension LoopManager { - private func openLoop(startingAction: WindowAction) async { + private func openLoop( + startingAction: WindowAction, + window: Window? = nil, + hideIndicatorOnNoSelection: Bool + ) async throws -> LoopOpenResult { guard AccessibilityManager.shared.isGranted else { - return + throw LoopManagerError.accessibilityNotGranted + } + + guard !MissionControl.isShowing else { + throw LoopManagerError.missionControlShowing } guard !isLoopOpening else { if startingAction.direction != .noSelection { pendingOpeningAction = startingAction } - return + return .alreadyOpening } guard !isLoopActive else { @@ -172,20 +280,22 @@ extension LoopManager { await changeAction(startingAction, disableHapticFeedback: true) } - return + return .alreadyOpen } - let window = WindowUtility.userDefinedTargetWindow() + let window = window ?? WindowUtility.userDefinedTargetWindow() - guard - window?.isAppExcluded != true, - (window?.fullscreen ?? false && Defaults[.ignoreFullscreen]) == false - else { - return + guard window?.isAppExcluded != true else { + throw LoopManagerError.appExcluded + } + + guard (window?.fullscreen ?? false && Defaults[.ignoreFullscreen]) == false else { + throw LoopManagerError.fullscreenWindow } actionRevision += 1 isLoopOpening = true + self.hideIndicatorOnNoSelection = hideIndicatorOnNoSelection pendingOpeningAction = nil shouldCancelOpening = false hasParentCycleActionMirror.withLock { $0 = false } @@ -220,7 +330,7 @@ extension LoopManager { await resizeContext.refreshResolvedState() guard !shouldCancelOpening else { - return + return .cancelled } if !Defaults[.disableCursorInteraction] { @@ -228,11 +338,12 @@ extension LoopManager { } isLoopActive = true - indicatorService.openAndUpdate(context: resizeContext) + indicatorService.openAndUpdate(context: resizeContext, hideOnNoSelection: hideIndicatorOnNoSelection) await changeAction(pendingOpeningAction ?? startingAction, disableHapticFeedback: true) triggerKeyTimeoutTimer.start() + return .opened } private func closeLoop(forceClose: Bool) async { @@ -287,12 +398,22 @@ extension LoopManager { /// - triggeredFromScreenChange: If this action was triggered from a screen change, this will prevent cycle keybinds from infinitely changing screens. /// - disableHapticFeedback: This will prevent haptic feedback. /// - canAdvanceCycle: This will prevent the cycle from advancing if set to false. This is currently used when changing actions via the radial menu. + /// - resumeCycleProgress: When the cycle can't advance, resumes its stored progress instead of restarting it. Used by gestures. + /// - reverse: Steps a cycle backwards, or performs the opposite of any other action, such as smaller for larger. private func changeAction( _ newAction: WindowAction, triggeredFromScreenChange: Bool = false, disableHapticFeedback: Bool = false, - canAdvanceCycle: Bool = true + canAdvanceCycle: Bool = true, + resumeCycleProgress: Bool = false, + reverse: Bool = false ) async { + var newAction = newAction + if reverse, newAction.direction != .cycle { + guard let opposite = newAction.direction.opposite else { return } + newAction = WindowAction(opposite) + } + let originatingContext = resizeContext guard @@ -305,19 +426,15 @@ extension LoopManager { return } - if StashManager.shared.handleIfStashed(newAction, screen: currentScreen) { - actionRevision += 1 - return - } + let incomingAllowsRepeatedSelection = newAction.allowsRepeatedSelection - guard originatingContext.action.id != newAction.id || newAction.canRepeat else { + guard originatingContext.action.id != newAction.id || incomingAllowsRepeatedSelection else { return } actionRevision += 1 let originatingRevision = actionRevision - var newAction: WindowAction = newAction var newParentAction: WindowAction? = nil var cycleProposal: CycleActionCoordinator.Proposal? @@ -326,7 +443,12 @@ extension LoopManager { if newAction.direction == .cycle { newParentAction = newAction - cycleProposal = proposeCycleAction(newAction, canAdvance: canAdvanceCycle) + cycleProposal = proposeCycleAction( + newAction, + canAdvance: canAdvanceCycle, + resumeProgress: resumeCycleProgress, + reverse: reverse + ) if let cycleProposal { newAction = cycleProposal.action } else if !canAdvanceCycle { @@ -357,7 +479,7 @@ extension LoopManager { newAction == resizeContext.action, !canAdvanceCycle || ( !newAction.direction.willChangeScreen && - !newAction.canRepeat + !newAction.allowsRepeatedSelection ), let newParentAction { if resizeContext.parentAction != newParentAction { @@ -370,6 +492,18 @@ extension LoopManager { newParentAction = nil } + if let stashedWindow = StashManager.shared.stashedWindow(for: newAction, on: currentScreen) { + let preparedTarget = await ResizeContext.prepareWindowTarget(stashedWindow.window) + + guard resizeContext === originatingContext, + actionRevision == originatingRevision + else { + return + } + + originatingContext.commitWindowTarget(preparedTarget) + } + if newAction.direction.willChangeScreen { var newScreen: NSScreen = currentScreen @@ -449,7 +583,7 @@ extension LoopManager { } resizeContext.setScreen(to: newScreen) - indicatorService.openAndUpdate(context: resizeContext) + indicatorService.openAndUpdate(context: resizeContext, hideOnNoSelection: hideIndicatorOnNoSelection) if let parent = newParentAction { setResizeAction(to: newAction, parent: newParentAction) @@ -461,7 +595,7 @@ extension LoopManager { } Task { - _ = try await WindowActionEngine.shared.apply(context: resizeContext) + _ = try? await WindowActionEngine.shared.apply(context: resizeContext) } } } @@ -471,7 +605,7 @@ extension LoopManager { return } - if newAction != resizeContext.action || newAction.canRepeat { + if newAction != resizeContext.action || newAction.allowsRepeatedSelection { if !disableHapticFeedback { performHapticFeedback() } @@ -481,7 +615,7 @@ extension LoopManager { if !Defaults[.previewVisibility], !previousActionWasNoOp { await resizeContext.refreshResolvedState() } - indicatorService.openAndUpdate(context: resizeContext) + indicatorService.openAndUpdate(context: resizeContext, hideOnNoSelection: hideIndicatorOnNoSelection) Task { [weak self, originatingContext] in // If the action is to focus a window in a specific direction, find and activate that window @@ -515,7 +649,9 @@ extension LoopManager { private func proposeCycleAction( _ action: WindowAction, - canAdvance: Bool + canAdvance: Bool, + resumeProgress: Bool, + reverse: Bool ) -> CycleActionCoordinator.Proposal? { // Allow cycling backwards only if: // - Shift is not part of the action's keybind (eligibleForReverseCycle) @@ -526,9 +662,11 @@ extension LoopManager { && Defaults[.cycleBackwardsOnShiftPressed] let mode: CycleActionCoordinator.SelectionMode = if canAdvance { - allowReverseCycle && keybindTrigger.effectiveEventFlags.contains(.maskShift) + reverse || (allowReverseCycle && keybindTrigger.effectiveEventFlags.contains(.maskShift)) ? .advance(.backward) : .advance(.forward) + } else if resumeProgress { + .resumeCurrent } else { .selectCurrent } @@ -572,7 +710,7 @@ extension LoopManager { if !resizeContext.action.direction.isNoOp { // If a screen was previously not selected, then the preview needs to be opened. - indicatorService.openAndUpdate(context: resizeContext) + indicatorService.openAndUpdate(context: resizeContext, hideOnNoSelection: hideIndicatorOnNoSelection) } return targetScreen diff --git a/Loop/Core/Multitouch/Debug/GestureDebugOverlayController.swift b/Loop/Core/Multitouch/Debug/GestureDebugOverlayController.swift new file mode 100644 index 000000000..e931ccd12 --- /dev/null +++ b/Loop/Core/Multitouch/Debug/GestureDebugOverlayController.swift @@ -0,0 +1,123 @@ +#if DEBUG + + import AppKit + import Subsurface + import SwiftUI + + @MainActor + final class GestureDebugOverlayController { + static let isEnabled = ProcessInfo.processInfo.isEnvironmentFlagEnabled("LOOP_GESTURE_DEBUG_OVERLAY") + + let model = GestureDebugOverlayModel() + private var windowController: NSWindowController? + private var preserveDuringSwipeReset = false + + func begin( + originCentroid: CGPoint, + fingerCount: Int, + recognitionThreshold: CGFloat, + actionCount: Int, + swipeStep: CGFloat, + magnifyStep: CGFloat, + screenCenter: CGPoint + ) { + model.begin( + originCentroid: originCentroid, + fingerCount: fingerCount, + recognitionThreshold: recognitionThreshold, + actionCount: actionCount, + swipeStep: swipeStep, + magnifyStep: magnifyStep + ) + + let size = CGSize(width: 520, height: 520) + let panel: ActivePanel + if let existing = windowController?.window as? ActivePanel { + panel = existing + } else { + panel = ActivePanel( + contentRect: CGRect(origin: .zero, size: size), + styleMask: [.borderless, .nonactivatingPanel], + backing: .buffered, + defer: true + ) + panel.ignoresMouseEvents = true + panel.becomesKeyOnlyIfNeeded = false + panel.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary] + panel.hasShadow = false + panel.backgroundColor = .clear + panel.isOpaque = false + panel.level = NSWindow.Level(rawValue: NSWindow.Level.screenSaver.rawValue + 1) + panel.contentView = NSHostingView(rootView: GestureDebugOverlayView(model: model)) + windowController = NSWindowController(window: panel) + } + + panel.setContentSize(size) + panel.setFrameOrigin( + CGPoint(x: screenCenter.x - size.width / 2, y: screenCenter.y - size.height / 2) + ) + panel.orderFrontRegardless() + } + + func updateDetermining(centroid: CGPoint, fingerCount: Int) { + model.updateDetermining(centroid: centroid, fingerCount: fingerCount) + } + + func updateSwipe( + centroid: CGPoint, + translation: CGPoint, + angle: CGFloat, + distance: CGFloat, + fingerCount: Int + ) { + model.updateSwipe( + centroid: centroid, + translation: translation, + angle: angle, + distance: distance, + fingerCount: fingerCount + ) + } + + func recordSwipeCommit(distance: CGFloat, slot: Int? = nil) { + model.recordSwipeCommit(distance: distance, slot: slot) + } + + func recordSwipeActionReset() { + preserveDuringSwipeReset = true + model.recordSwipeActionReset() + } + + func updateMagnify( + centroid: CGPoint, + distance: CGFloat, + originDistance: CGFloat, + fingerCount: Int + ) { + model.updateMagnify( + centroid: centroid, + distance: distance, + originDistance: originDistance, + fingerCount: fingerCount + ) + } + + func recordMagnifyCommit(distance: CGFloat) { + model.recordMagnifyCommit(distance: distance) + } + + func updateRawContacts(_ contacts: [MTContact]) { + model.updateRawContacts(contacts) + } + + func close(force: Bool = false) { + guard force || !preserveDuringSwipeReset else { return } + preserveDuringSwipeReset = false + model.clear() + windowController?.window?.orderOut(nil) + windowController?.close() + windowController = nil + } + } + +#endif diff --git a/Loop/Core/Multitouch/Debug/GestureDebugOverlayModel.swift b/Loop/Core/Multitouch/Debug/GestureDebugOverlayModel.swift new file mode 100644 index 000000000..66be7894c --- /dev/null +++ b/Loop/Core/Multitouch/Debug/GestureDebugOverlayModel.swift @@ -0,0 +1,211 @@ +#if DEBUG + + import CoreGraphics + import Subsurface + import SwiftUI + + let gestureDebugPointsPerNormalizedUnit: CGFloat = 500 + + struct GestureDebugFinger: Identifiable, Equatable { + let id: Int32 + let position: CGPoint + } + + enum GestureDebugKind: String { + case determining + case swipe + case magnify + } + + struct GestureDebugSnapshot { + static let empty = Self() + + var visible = false + var kind: GestureDebugKind = .determining + var originCentroid: CGPoint? + var processedCentroid: CGPoint? + var translation: CGPoint = .zero + var radialDistance: CGFloat = 0 + var swipeAngle: CGFloat = 0 + var fingerCount = 0 + var fingers: [GestureDebugFinger] = [] + var recognitionThreshold: CGFloat = 0 + var swipeStep: CGFloat = 0 + var swipeBaseline: CGFloat? + var swipeActionReset = false + var swipeSlot: Int? + var swipeActionCount = 0 + var swipeBoundaries: [CGFloat] = [] + var magnifyDistance: CGFloat? + var magnifyOriginDistance: CGFloat? + var magnifyBaseline: CGFloat? + var magnifyStep: CGFloat = 0 + var scale: CGFloat = gestureDebugPointsPerNormalizedUnit + } + + @MainActor + final class GestureDebugOverlayModel: ObservableObject { + @Published private(set) var snapshot = GestureDebugSnapshot.empty + private var rawContacts: [GestureDebugFinger] = [] + private var activeFingerCount = 0 + + func begin( + originCentroid: CGPoint, + fingerCount: Int, + recognitionThreshold: CGFloat, + actionCount: Int, + swipeStep: CGFloat, + magnifyStep: CGFloat + ) { + activeFingerCount = fingerCount + rawContacts = [] + snapshot = GestureDebugSnapshot( + visible: true, + originCentroid: originCentroid, + recognitionThreshold: recognitionThreshold, + swipeStep: swipeStep, + swipeBaseline: recognitionThreshold > 0 ? recognitionThreshold : nil, + swipeActionCount: actionCount, + swipeBoundaries: RadialGestureGeometry.slotBoundaryAngles(actionCount: actionCount), + magnifyStep: magnifyStep + ) + snapshot.fingerCount = fingerCount + applyRawContacts() + } + + func updateDetermining(centroid: CGPoint, fingerCount: Int) { + if snapshot.originCentroid == nil { + begin( + originCentroid: centroid, + fingerCount: fingerCount, + recognitionThreshold: snapshot.recognitionThreshold, + actionCount: snapshot.swipeActionCount, + swipeStep: snapshot.swipeStep, + magnifyStep: snapshot.magnifyStep + ) + } + snapshot.kind = .determining + snapshot.processedCentroid = centroid + snapshot.translation = relativePosition(of: centroid) + snapshot.radialDistance = hypot(snapshot.translation.x, snapshot.translation.y) + snapshot.fingerCount = fingerCount + } + + func updateSwipe( + centroid: CGPoint, + translation: CGPoint, + angle: CGFloat, + distance: CGFloat, + fingerCount: Int + ) { + if snapshot.originCentroid == nil { + begin( + originCentroid: CGPoint(x: centroid.x - translation.x, y: centroid.y - translation.y), + fingerCount: fingerCount, + recognitionThreshold: snapshot.recognitionThreshold, + actionCount: snapshot.swipeActionCount, + swipeStep: snapshot.swipeStep, + magnifyStep: snapshot.magnifyStep + ) + } + snapshot.kind = .swipe + snapshot.processedCentroid = centroid + snapshot.translation = translation + snapshot.radialDistance = distance + snapshot.swipeAngle = angle + snapshot.fingerCount = fingerCount + } + + func recordSwipeCommit(distance: CGFloat, slot: Int? = nil) { + let firstActionDistance = snapshot.recognitionThreshold > 0 + ? snapshot.recognitionThreshold + : distance + let baseline = snapshot.swipeBaseline ?? firstActionDistance + snapshot.swipeBaseline = baseline + snapshot.swipeActionReset = false + snapshot.swipeSlot = slot + } + + func recordSwipeActionReset() { + snapshot.swipeActionReset = true + } + + func updateMagnify( + centroid: CGPoint, + distance: CGFloat, + originDistance: CGFloat, + fingerCount: Int + ) { + if snapshot.originCentroid == nil { + begin( + originCentroid: centroid, + fingerCount: fingerCount, + recognitionThreshold: snapshot.recognitionThreshold, + actionCount: snapshot.swipeActionCount, + swipeStep: snapshot.swipeStep, + magnifyStep: snapshot.magnifyStep + ) + } + snapshot.kind = .magnify + snapshot.processedCentroid = centroid + snapshot.translation = relativePosition(of: centroid) + snapshot.radialDistance = hypot(snapshot.translation.x, snapshot.translation.y) + snapshot.magnifyDistance = distance + snapshot.magnifyOriginDistance = originDistance + snapshot.fingerCount = fingerCount + } + + func recordMagnifyCommit(distance: CGFloat) { + snapshot.magnifyBaseline = distance + } + + func updateRawContacts(_ contacts: [MTContact]) { + let active = SubsurfaceContactFilter.activeTouches( + from: SubsurfaceContactFilter.removePalms(from: contacts) + ) + guard activeFingerCount > 0, active.count == activeFingerCount else { return } + + rawContacts = active.map { + GestureDebugFinger( + id: $0.id, + position: CGPoint( + x: CGFloat($0.normalizedVector.position.x), + y: CGFloat($0.normalizedVector.position.y) + ) + ) + } + applyRawContacts() + } + + func clear() { + rawContacts = [] + activeFingerCount = 0 + snapshot = .empty + } + + func displayOffset( + for point: CGPoint, + origin: CGPoint, + scale: CGFloat = gestureDebugPointsPerNormalizedUnit + ) -> CGPoint { + CGPoint( + x: (point.x - origin.x) * scale, + y: (point.y - origin.y) * scale + ) + } + + private func applyRawContacts() { + guard snapshot.originCentroid != nil else { + snapshot.fingers = rawContacts + return + } + snapshot.fingers = rawContacts + } + + private func relativePosition(of point: CGPoint) -> CGPoint { + guard let origin = snapshot.originCentroid else { return .zero } + return CGPoint(x: point.x - origin.x, y: point.y - origin.y) + } + } + +#endif diff --git a/Loop/Core/Multitouch/Debug/GestureDebugOverlayView.swift b/Loop/Core/Multitouch/Debug/GestureDebugOverlayView.swift new file mode 100644 index 000000000..76ff70521 --- /dev/null +++ b/Loop/Core/Multitouch/Debug/GestureDebugOverlayView.swift @@ -0,0 +1,214 @@ +#if DEBUG + + import Foundation + import SwiftUI + + struct GestureDebugOverlayView: View { + @ObservedObject var model: GestureDebugOverlayModel + + private let canvasSize: CGFloat = 520 + + var body: some View { + ZStack(alignment: .topLeading) { + Canvas { context, size in + drawReference(in: &context, size: size) + drawRings(in: &context, size: size) + drawMagnificationRing(in: &context, size: size) + drawContacts(in: &context, size: size) + } + +// diagnostics +// .padding(10) +// .background(.black.opacity(0.45), in: .rect(cornerRadius: 8)) +// .padding(10) + } + .frame(width: canvasSize, height: canvasSize) + .allowsHitTesting(false) + } + + private var diagnostics: some View { + let snapshot = model.snapshot + let translation = snapshot.translation + let magnifyDelta = if let distance = snapshot.magnifyDistance, + let origin = snapshot.magnifyOriginDistance { + String(format: "%.4f", distance - origin) + } else { + "-" + } + + return VStack(alignment: .leading, spacing: 2) { + Text("DEBUG TRACKPAD GESTURE") + .fontWeight(.semibold) + Text("kind: \(snapshot.kind.rawValue) fingers: \(snapshot.fingerCount)") + Text("scale: \(Int(snapshot.scale)) pt/unit") + Text("centroid marker: Subsurface event") + Text("centroid: \(format(snapshot.processedCentroid))") + Text("translation: \(format(translation)) r: \(format(snapshot.radialDistance))") + Text("angle: \(format(snapshot.swipeAngle))") + Text("recognition: \(format(snapshot.recognitionThreshold))") + Text("swipe baseline: \(format(snapshot.swipeBaseline)) step: \(format(snapshot.swipeStep))") + Text("swipe action reset: \(snapshot.swipeActionReset ? "yes" : "no")") + Text("slot: \(snapshot.swipeSlot.map(String.init) ?? "-")") + Text("magnify: \(format(snapshot.magnifyDistance)) / origin \(format(snapshot.magnifyOriginDistance))") + Text("magnify Δ: \(magnifyDelta)") + Text("magnify activation: abs(Δ) >= \(format(snapshot.magnifyStep))") + Text("magnify committed: \(format(snapshot.magnifyBaseline))") + } + .font(.caption) + .foregroundStyle(.white) + .fixedSize() + } + + private func drawReference(in context: inout GraphicsContext, size: CGSize) { + let center = CGPoint(x: size.width / 2, y: size.height / 2) + let snapshot = model.snapshot + let maxRadius = min(size.width, size.height) / 2 - 6 + + for angle in snapshot.swipeBoundaries { + let endpoint = point(from: center, angle: angle, radius: maxRadius) + var path = Path() + path.move(to: center) + path.addLine(to: endpoint) + context.stroke(path, with: .color(.cyan.opacity(0.32)), lineWidth: 1.5) + } + + let recognitionRadius = snapshot.recognitionThreshold * snapshot.scale + if recognitionRadius > 0, recognitionRadius <= maxRadius { + context.stroke( + Path(ellipseIn: CGRect( + x: center.x - recognitionRadius, + y: center.y - recognitionRadius, + width: recognitionRadius * 2, + height: recognitionRadius * 2 + )), + with: .color(.yellow.opacity(0.7)), + lineWidth: 1.5 + ) + } + } + + private func drawRings(in context: inout GraphicsContext, size: CGSize) { + guard let baseline = model.snapshot.swipeBaseline else { return } + let center = CGPoint(x: size.width / 2, y: size.height / 2) + let maxRadius = min(size.width, size.height) / 2 - 6 + let radii = RadialGestureGeometry.thresholdRadii( + baseline: baseline, + step: model.snapshot.swipeStep, + maximum: maxRadius / model.snapshot.scale + ) + + for radius in radii { + let renderedRadius = radius * model.snapshot.scale + let isBaseline = abs(radius - baseline) < 0.0001 + let isNext = abs(abs(radius - baseline) - model.snapshot.swipeStep) < 0.0001 + let color: Color = isBaseline ? .green : (isNext ? .orange : .purple) + let lineWidth: CGFloat = 1.5 + + context.stroke( + Path(ellipseIn: CGRect( + x: center.x - renderedRadius, + y: center.y - renderedRadius, + width: renderedRadius * 2, + height: renderedRadius * 2 + )), + with: .color(color.opacity(isBaseline || isNext ? 0.8 : 0.35)), + lineWidth: lineWidth + ) + } + } + + private func drawMagnificationRing(in context: inout GraphicsContext, size: CGSize) { + let snapshot = model.snapshot + guard let distance = snapshot.magnifyDistance, + let originDistance = snapshot.magnifyOriginDistance, + let baseline = snapshot.swipeBaseline, + let radius = RadialGestureGeometry.magnificationDisplayRadius( + distance: distance, + originDistance: originDistance, + activationRadius: baseline, + ringStep: snapshot.swipeStep, + magnificationStep: snapshot.magnifyStep + ) + else { + return + } + + let renderedRadius = radius * snapshot.scale + let maxRadius = min(size.width, size.height) / 2 - 6 + guard renderedRadius > 0, renderedRadius <= maxRadius else { return } + + let center = CGPoint(x: size.width / 2, y: size.height / 2) + context.stroke( + Path(ellipseIn: CGRect( + x: center.x - renderedRadius, + y: center.y - renderedRadius, + width: renderedRadius * 2, + height: renderedRadius * 2 + )), + with: .color(.teal.opacity(0.9)), + lineWidth: 1.5 + ) + } + + private func drawContacts(in context: inout GraphicsContext, size: CGSize) { + let center = CGPoint(x: size.width / 2, y: size.height / 2) + let snapshot = model.snapshot + + for (index, finger) in snapshot.fingers.enumerated() { + let point = plot(finger.position, origin: snapshot.originCentroid, center: center, scale: snapshot.scale) + let color = [Color.red, .blue, .green, .pink, .mint, .indigo][index % 6] + context.fill( + Path(ellipseIn: CGRect(x: point.x - 5, y: point.y - 5, width: 10, height: 10)), + with: .color(color.opacity(0.75)) + ) + context.stroke( + Path(ellipseIn: CGRect(x: point.x - 8, y: point.y - 8, width: 16, height: 16)), + with: .color(color.opacity(0.45)), + lineWidth: 1.5 + ) + } + + if let centroid = snapshot.processedCentroid { + let point = plot(centroid, origin: snapshot.originCentroid, center: center, scale: snapshot.scale) + var crosshair = Path() + crosshair.move(to: CGPoint(x: point.x - 9, y: point.y)) + crosshair.addLine(to: CGPoint(x: point.x + 9, y: point.y)) + crosshair.move(to: CGPoint(x: point.x, y: point.y - 9)) + crosshair.addLine(to: CGPoint(x: point.x, y: point.y + 9)) + context.stroke(crosshair, with: .color(.white.opacity(0.95)), lineWidth: 1.5) + } + } + + private func plot( + _ point: CGPoint, + origin: CGPoint?, + center: CGPoint, + scale: CGFloat + ) -> CGPoint { + guard let origin else { return center } + let offset = model.displayOffset(for: point, origin: origin, scale: scale) + return CGPoint( + x: center.x + offset.x, + y: center.y - offset.y + ) + } + + private func point(from center: CGPoint, angle: CGFloat, radius: CGFloat) -> CGPoint { + CGPoint( + x: center.x + sin(angle) * radius, + y: center.y - cos(angle) * radius + ) + } + + private func format(_ point: CGPoint?) -> String { + guard let point else { return "-" } + return String(format: "%.4f, %.4f", point.x, point.y) + } + + private func format(_ value: CGFloat?) -> String { + guard let value else { return "-" } + return String(format: "%.4f", value) + } + } + +#endif diff --git a/Loop/Core/Multitouch/MultitouchGestureBlocker.swift b/Loop/Core/Multitouch/MultitouchGestureBlocker.swift new file mode 100644 index 000000000..74c5707ee --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchGestureBlocker.swift @@ -0,0 +1,164 @@ +// +// MultitouchGestureBlocker.swift +// Loop +// +// Created by Kai Azim on 2026-04-05. +// + +import AppKit +import os +import Scribe + +/// Stops trackpad scrolls and gestures from reaching apps while a Loop gesture is active. +/// Reference-counted, so one gesture ending doesn't stop blocking for another. +@Loggable +final class MultitouchGestureBlocker { + private var monitor: ActiveEventMonitor? + + private let activeCount = OSAllocatedUnfairLock(initialState: 0) + + /// `magnify` is left out, as its raw value (30) collides with `dockControl` + private static let gestureEventTypes: Set = [ + UInt32(NSEvent.EventType.gesture.rawValue), + UInt32(NSEvent.EventType.rotate.rawValue), + UInt32(NSEvent.EventType.swipe.rawValue), + UInt32(NSEvent.EventType.smartMagnify.rawValue) + ] + + private static let scrollPhaseEnded: Int64 = 4 + private static let scrollPhaseCancelled: Int64 = 8 + private static let momentumPhaseEnd: Int64 = 3 + private static let scrollDeltaFields: [CGEventField] = [ + .scrollWheelEventDeltaAxis1, + .scrollWheelEventDeltaAxis2, + .scrollWheelEventDeltaAxis3, + .scrollWheelEventPointDeltaAxis1, + .scrollWheelEventPointDeltaAxis2, + .scrollWheelEventPointDeltaAxis3 + ] + + private static let scrollFixedDeltaFields: [CGEventField] = [ + .scrollWheelEventFixedPtDeltaAxis1, + .scrollWheelEventFixedPtDeltaAxis2, + .scrollWheelEventFixedPtDeltaAxis3 + ] + + func start() { + guard monitor == nil else { return } + + log.info("Starting gesture blocker") + startMonitor() + } + + /// Also resets the reference count, as every gesture has been stopped by then. This clears any leaked `acquire()`. + func stop() { + activeCount.withLock { $0 = 0 } + + guard let monitor else { return } + + monitor.stop() + self.monitor = nil + + log.info("Stopped gesture blocker") + } + + func acquire() { + let count = activeCount.withLock { count in + count += 1 + return count + } + + if count == 1 { + if monitor == nil { + log.warn("Gesture blocker activated without an event tap; trackpad events won't be suppressed") + } + log.debug("Gesture blocker activated") + } + } + + func release() { + let count = activeCount.withLock { count in + count = max(0, count - 1) + return count + } + + if count == 0 { + log.debug("Gesture blocker deactivated") + } + } + + private func startMonitor() { + let eventTypes: [CGEventType] = [.scrollWheel] + Self.gestureEventTypes.compactMap(CGEventType.init(rawValue:)) + + let newMonitor = ActiveEventMonitor( + "gesture_blocker", + events: eventTypes, + callback: Self.makeEventHandler(activeCount: activeCount) + ) + + newMonitor.start() + + // Left unset on failure, so the next `start()` tries again + guard newMonitor.isEnabled else { + log.warn("Failed to start gesture blocker event tap") + newMonitor.stop() + return + } + + monitor = newMonitor + } + + private static func makeEventHandler( + activeCount: OSAllocatedUnfairLock + ) -> (CGEvent) -> Unmanaged? { + { event in + guard activeCount.withLock({ $0 > 0 }) else { + return Unmanaged.passUnretained(event) + } + + if event.type == .scrollWheel { + return handleScroll(event) + } + + if gestureEventTypes.contains(event.type.rawValue) { + return handleGesture(event) + } + + return Unmanaged.passUnretained(event) + } + } + + private static func handleScroll(_ event: CGEvent) -> Unmanaged? { + let isContinuous = event.getIntegerValueField(.scrollWheelEventIsContinuous) != 0 + let phase = event.getIntegerValueField(.scrollWheelEventScrollPhase) + let momentumPhase = event.getIntegerValueField(.scrollWheelEventMomentumPhase) + + // Mouse wheel scrolls are discrete and phaseless + guard isContinuous || phase != 0 || momentumPhase != 0 else { + return Unmanaged.passUnretained(event) + } + + // Let ends through, so apps don't stay mid-scroll + let isEnd = phase == scrollPhaseEnded || phase == scrollPhaseCancelled || momentumPhase == momentumPhaseEnd + guard isEnd else { return nil } + + for field in scrollDeltaFields { + event.setIntegerValueField(field, value: 0) + } + for field in scrollFixedDeltaFields { + event.setDoubleValueField(field, value: 0) + } + + return Unmanaged.passUnretained(event) + } + + private static func handleGesture(_ event: CGEvent) -> Unmanaged? { + // Let ends through, so apps don't stay mid-zoom + let phase = CGEventField.GesturePhase(rawValue: event.getIntegerValueField(.gesturePhase)) + if phase == .ended || phase == .cancelled { + return Unmanaged.passUnretained(event) + } + + return nil + } +} diff --git a/Loop/Core/Multitouch/MultitouchGestureSession.swift b/Loop/Core/Multitouch/MultitouchGestureSession.swift new file mode 100644 index 000000000..baa3ffc99 --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchGestureSession.swift @@ -0,0 +1,452 @@ +// +// MultitouchGestureSession.swift +// Loop +// +// Created by Kai Azim on 2026-01-30. +// + +import SwiftUI + +@MainActor +final class MultitouchGestureSession { + enum ActionKey: Hashable { + case radialSlot(Int) + case radialCenter + case gesture(UUID) + } + + private(set) var didOpenLoopWithThisGesture = false + private(set) var isGestureRejected = false + private(set) var hasActivated = false + private(set) var hasGestureBegun = false + private(set) var ownsGestureBlocker = false + /// The gesture currently driving this stroke. Swapped on direction reversal + private(set) var resolvedGesture: GestureBinding? + private(set) var pendingTargetWindow: Window? + private var activationContext: MultitouchGestureActivationContext? + /// Set once Loop rejects or abandons the stroke, as the Dock may already be acting on it + private var isStrokeLocked = false + /// Bindings excluded by their activation zone, treated as unbound so another direction can still begin + private var ineligibleGestureIDs: Set = [] + + private var lastCommittedAction: ActionKey? + private var visitedActions: Set = [] + /// Returning to an action this gesture already committed shouldn't advance its cycle + private(set) var isRevisitingAction = false + private var lastCommittedSwipeStepIndex: Int? + private var swipeStepDistance: CGFloat? + private var swipeActivationDistance: CGFloat? + private var firstCommitSwipeDistance: CGFloat? + private var swipeMoveBackResetActive = false + private var swipeActionResetActive = false + private var lastCommittedMagnifyStepIndex: Int? + private var magnifyOriginDistance: CGFloat? + private var magnifyStepDistance: CGFloat? + private var magnificationKind: GestureBinding.Kind? + private var magnifyActionResetActive = false + + func reset(endsStroke: Bool = true) { + didOpenLoopWithThisGesture = false + isGestureRejected = false + hasActivated = false + hasGestureBegun = false + ownsGestureBlocker = false + resolvedGesture = nil + pendingTargetWindow = nil + activationContext = nil + if endsStroke { + isStrokeLocked = false + ineligibleGestureIDs.removeAll() + } + lastCommittedAction = nil + visitedActions.removeAll() + isRevisitingAction = false + lastCommittedSwipeStepIndex = nil + swipeStepDistance = nil + swipeActivationDistance = nil + firstCommitSwipeDistance = nil + swipeMoveBackResetActive = false + swipeActionResetActive = false + lastCommittedMagnifyStepIndex = nil + magnifyOriginDistance = nil + magnifyStepDistance = nil + magnificationKind = nil + magnifyActionResetActive = false + } + + func begin( + activationContext: MultitouchGestureActivationContext, + gesture: GestureBinding, + loopWasAlreadyOpen: Bool + ) -> Bool { + guard shouldAttemptBegin(with: gesture) else { return false } + + reset(endsStroke: false) + self.activationContext = activationContext + + guard activationContext.allows(gesture) else { + ineligibleGestureIDs.insert(gesture.id) + isGestureRejected = true + return false + } + + guard activationContext.targetWindow != nil || loopWasAlreadyOpen else { + reject() + return false + } + + pendingTargetWindow = activationContext.targetWindow + resolvedGesture = gesture + hasGestureBegun = true + // Loop is already on screen, so no activation threshold to cross. + hasActivated = loopWasAlreadyOpen + return true + } + + func shouldAttemptBegin(with gesture: GestureBinding) -> Bool { + !isStrokeLocked && !ineligibleGestureIDs.contains(gesture.id) + } + + func reject() { + isGestureRejected = true + isStrokeLocked = true + } + + func abandonStroke() { + reset(endsStroke: false) + isStrokeLocked = true + } + + func acquireGestureBlocker() { + ownsGestureBlocker = true + } + + func releaseGestureBlocker() -> Bool { + guard ownsGestureBlocker else { return false } + ownsGestureBlocker = false + return true + } + + func markActivated(openedLoop: Bool) { + if openedLoop { + didOpenLoopWithThisGesture = true + } + hasActivated = true + } + + /// Tracks the fixed ring interval occupied by the swipe. Crossing a ring + /// outward advances once; crossing that same ring inward reverses once. + func commitSwipe( + distance: CGFloat, + newKey: ActionKey, + step: CGFloat, + fire: (_ reverse: Bool) -> () + ) { + swipeStepDistance = step + + // `shouldSuppressSwipeAction` owns leaving the move-back zone. Until + // the caller observes that exit, no action may recommit. + if swipeMoveBackResetActive { return } + + if lastCommittedAction == newKey { + guard let firstCommitSwipeDistance else { return } + let newStepIndex = swipeStepIndex( + for: distance, + baseline: firstCommitSwipeDistance, + step: step + ) + let previousStepIndex = lastCommittedSwipeStepIndex ?? newStepIndex + let crossedStepCount = newStepIndex - previousStepIndex + guard crossedStepCount != 0 else { return } + + lastCommittedSwipeStepIndex = newStepIndex + isRevisitingAction = false + for _ in 0 ..< abs(crossedStepCount) { + fire(crossedStepCount < 0) + } + } else { + lastCommittedAction = newKey + enterAction(newKey) + let initialDistance = firstCommitSwipeDistance ?? swipeActivationDistance ?? distance + if firstCommitSwipeDistance == nil { + firstCommitSwipeDistance = initialDistance + } + lastCommittedSwipeStepIndex = swipeStepIndex( + for: distance, + baseline: initialDistance, + step: step + ) + swipeActionResetActive = false + fire(false) + } + } + + private func enterAction(_ key: ActionKey) { + isRevisitingAction = !visitedActions.insert(key).inserted + } + + func setSwipeActivationDistance(_ distance: CGFloat?) { + swipeActivationDistance = distance + } + + /// Clears the committed swipe action when the processed swipe returns to the + /// move-back zone. The zone is the full first action's commit distance. + func resetSwipeActionIfNeeded(distance: CGFloat) -> Bool { + guard let firstCommitSwipeDistance, + !swipeMoveBackResetActive, + lastCommittedAction != nil, + distance <= firstCommitSwipeDistance + else { + return false + } + + lastCommittedAction = nil + lastCommittedSwipeStepIndex = nil + swipeMoveBackResetActive = true + swipeActionResetActive = true + return true + } + + /// Clears the committed swipe action when the fingers move into an unbound direction. + func clearSwipeAction() -> Bool { + guard lastCommittedAction != nil else { return false } + lastCommittedAction = nil + lastCommittedSwipeStepIndex = nil + swipeActionResetActive = true + return true + } + + /// Whether this swipe has been reset to no selection and should remain + /// active while the fingers travel through an unbound direction + var hasSwipeActionReset: Bool { + swipeActionResetActive + } + + var hasCommittedSwipeAction: Bool { + lastCommittedAction != nil + } + + var hasCommittedMagnifyAction: Bool { + lastCommittedMagnifyStepIndex != nil + } + + /// Clears the committed magnify action when the gesture returns inside its + /// activation ring + func resetMagnifyActionIfNeeded( + distance: CGFloat, + originDistance: CGFloat, + step: CGFloat + ) -> Bool { + guard abs(distance - originDistance) <= step else { + magnifyActionResetActive = false + return false + } + + guard !magnifyActionResetActive, + lastCommittedMagnifyStepIndex != nil + else { + return magnifyActionResetActive + } + + lastCommittedAction = nil + lastCommittedMagnifyStepIndex = nil + magnifyActionResetActive = true + return true + } + + func shouldSuppressSwipeAction(distance: CGFloat) -> Bool { + guard swipeMoveBackResetActive, + let firstCommitSwipeDistance + else { + return false + } + + if distance <= firstCommitSwipeDistance { + return true + } + swipeMoveBackResetActive = false + return false + } + + func commitRadialMagnify( + distance: CGFloat, + originDistance: CGFloat, + step: CGFloat, + fire: (_ reverse: Bool) -> () + ) { + magnifyOriginDistance = originDistance + magnifyStepDistance = step + let newStepIndex = signedMagnifyStepIndex( + for: distance, + originDistance: originDistance, + step: step + ) + + if lastCommittedAction != .radialCenter { + lastCommittedAction = .radialCenter + enterAction(.radialCenter) + lastCommittedMagnifyStepIndex = newStepIndex + fire(distance < originDistance) + return + } + + let previousStepIndex = lastCommittedMagnifyStepIndex ?? newStepIndex + let crossedStepCount = newStepIndex - previousStepIndex + guard crossedStepCount != 0 else { return } + + lastCommittedMagnifyStepIndex = newStepIndex + isRevisitingAction = false + for _ in 0 ..< abs(crossedStepCount) { + fire(crossedStepCount < 0) + } + } + + func commitMagnify( + gesture: GestureBinding, + distance: CGFloat, + originDistance: CGFloat, + step: CGFloat, + allowsRapidRepeat: Bool, + fire: (_ reverse: Bool) -> () + ) { + let newKey = ActionKey.gesture(gesture.id) + magnifyOriginDistance = originDistance + magnifyStepDistance = step + let newStepIndex = directionalMagnifyStepIndex( + for: distance, + originDistance: originDistance, + kind: gesture.kind, + step: step + ) + + if lastCommittedAction != newKey { + magnificationKind = gesture.kind + lastCommittedAction = newKey + enterAction(newKey) + lastCommittedMagnifyStepIndex = newStepIndex + fire(false) + return + } + + guard allowsRapidRepeat else { return } + + let previousStepIndex = lastCommittedMagnifyStepIndex ?? newStepIndex + let crossedStepCount = newStepIndex - previousStepIndex + guard crossedStepCount != 0 else { return } + + lastCommittedMagnifyStepIndex = newStepIndex + isRevisitingAction = false + for _ in 0 ..< abs(crossedStepCount) { + fire(crossedStepCount < 0) + } + } + + func canActivate(_ gesture: GestureBinding) -> Bool { + hasGestureBegun && + !isGestureRejected && + activationContext?.allows(gesture) == true + } + + func switchSwipeGesture(to gesture: GestureBinding, distance: CGFloat) -> Bool { + guard canActivate(gesture) else { return false } + resolvedGesture = gesture + lastCommittedAction = .gesture(gesture.id) + enterAction(.gesture(gesture.id)) + swipeActionResetActive = false + let initialDistance = firstCommitSwipeDistance ?? swipeActivationDistance ?? distance + if firstCommitSwipeDistance == nil { + firstCommitSwipeDistance = initialDistance + } + if let swipeStepDistance { + lastCommittedSwipeStepIndex = swipeStepIndex( + for: distance, + baseline: initialDistance, + step: swipeStepDistance + ) + } else { + lastCommittedSwipeStepIndex = 0 + } + return true + } + + func switchMagnifyGesture(to gesture: GestureBinding, distance: CGFloat) -> Bool { + guard canActivate(gesture) else { return false } + resolvedGesture = gesture + lastCommittedAction = .gesture(gesture.id) + enterAction(.gesture(gesture.id)) + magnificationKind = gesture.kind + if let magnifyOriginDistance, let magnifyStepDistance { + lastCommittedMagnifyStepIndex = directionalMagnifyStepIndex( + for: distance, + originDistance: magnifyOriginDistance, + kind: gesture.kind, + step: magnifyStepDistance + ) + } else { + lastCommittedMagnifyStepIndex = 0 + } + return true + } + + func synchronizeSwipeStepIndex(distance: CGFloat) { + guard let firstCommitSwipeDistance, let swipeStepDistance else { return } + lastCommittedSwipeStepIndex = swipeStepIndex( + for: distance, + baseline: firstCommitSwipeDistance, + step: swipeStepDistance + ) + } + + func synchronizeMagnifyStepIndex(distance: CGFloat, step: CGFloat) { + guard let magnifyOriginDistance, let magnificationKind else { return } + lastCommittedMagnifyStepIndex = directionalMagnifyStepIndex( + for: distance, + originDistance: magnifyOriginDistance, + kind: magnificationKind, + step: step + ) + } + + private func swipeStepIndex(for distance: CGFloat, baseline: CGFloat, step: CGFloat) -> Int { + guard step > 0 else { return 0 } + let normalizedDistance = (distance - baseline) / step + return max(Int(floor(normalizedDistance + 0.000_001)), 0) + } + + private func signedMagnifyStepIndex( + for distance: CGFloat, + originDistance: CGFloat, + step: CGFloat + ) -> Int { + guard step > 0 else { return 0 } + let normalizedDistance = (distance - originDistance) / step + if normalizedDistance >= 0 { + return Int(floor(normalizedDistance + 0.000_001)) + } + return Int(ceil(normalizedDistance - 0.000_001)) + } + + private func directionalMagnifyStepIndex( + for distance: CGFloat, + originDistance: CGFloat, + kind: GestureBinding.Kind, + step: CGFloat + ) -> Int { + guard step > 0, let direction = kind.magnificationDirection else { return 0 } + let normalizedDistance = (distance - originDistance) * direction / step + return max(Int(floor(normalizedDistance + 0.000_001)), 0) + } +} + +private extension GestureBinding.Kind { + var magnificationDirection: CGFloat? { + switch self { + case .magnifyOut: + -1 + case .magnifyIn: + 1 + default: + nil + } + } +} diff --git a/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift b/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift new file mode 100644 index 000000000..ea3fb9861 --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift @@ -0,0 +1,183 @@ +// +// MultitouchRecognizerRegistry.swift +// Loop +// +// Created by Kai Azim on 2026-07-06. +// + +import Foundation +import Scribe +import Subsurface + +@Loggable +@MainActor +final class MultitouchRecognizerRegistry { + typealias EventHandler = @MainActor (SubsurfaceGestureEvent, Int) async -> () + + struct Entry { + let recognizer: SubsurfaceGestureRecognizer + let session: MultitouchGestureSession + var task: Task<(), Never>? + var radialMenuGesture: GestureBinding? + var directionalGestures: [GestureBinding] + var magnifyOutGesture: GestureBinding? + var magnifyInGesture: GestureBinding? + + static func categorize( + _ gestures: [GestureBinding] + ) -> (radial: GestureBinding?, directionals: [GestureBinding], magnifyOut: GestureBinding?, magnifyIn: GestureBinding?) { + let radial = gestures.first { $0.kind == .radialMenu } + let gesturesByPriority = gestures.sortedByActionability + let directionals = gesturesByPriority.filter(\.kind.isDirectionalSwipe) + let magnifyOut = gesturesByPriority.first { $0.kind == .magnifyOut } + let magnifyIn = gesturesByPriority.first { $0.kind == .magnifyIn } + return (radial, directionals, magnifyOut, magnifyIn) + } + } + + struct StopResult { + let didOpenLoopWithGesture: Bool + let didAcquireGestureBlocker: Bool + } + + private let gestureMonitor: SubsurfaceMonitor + private let handleEvent: EventHandler + private var entries: [Int: Entry] = [:] + /// Logged only when they change, as rebuilds also follow unrelated keybind edits + private var conflictingGestureIDs: Set = [] + + init( + gestureMonitor: SubsurfaceMonitor, + handleEvent: @escaping EventHandler + ) { + self.gestureMonitor = gestureMonitor + self.handleEvent = handleEvent + } + + func entry(for fingerCount: Int) -> Entry? { + entries[fingerCount] + } + + func session(for fingerCount: Int) -> MultitouchGestureSession? { + entries[fingerCount]?.session + } + + func rebuild(with gestures: [GestureBinding]) -> [StopResult] { + logConflictingGestures(in: gestures) + + let gesturesByFingerCount = Dictionary(grouping: GestureBinding.activeGestures(in: gestures), by: \.fingerCount) + let neededFingerCounts = Set(gesturesByFingerCount.keys) + + var stopResults: [StopResult] = [] + for fingerCount in Array(entries.keys) where !neededFingerCounts.contains(fingerCount) { + if let stopResult = stopRecognizer(for: fingerCount) { + stopResults.append(stopResult) + } + entries.removeValue(forKey: fingerCount) + } + + for (fingerCount, gestures) in gesturesByFingerCount { + let (radial, directionals, magnifyOut, magnifyIn) = Entry.categorize(gestures) + if entries[fingerCount] == nil { + startRecognizer(for: fingerCount, radial: radial, directionals: directionals, magnifyOut: magnifyOut, magnifyIn: magnifyIn) + } else { + entries[fingerCount]?.radialMenuGesture = radial + entries[fingerCount]?.directionalGestures = directionals + entries[fingerCount]?.magnifyOutGesture = magnifyOut + entries[fingerCount]?.magnifyInGesture = magnifyIn + } + } + + return stopResults + } + + func stopAll() -> [StopResult] { + var stopResults: [StopResult] = [] + for fingerCount in Array(entries.keys) { + if let stopResult = stopRecognizer(for: fingerCount) { + stopResults.append(stopResult) + } + } + entries.removeAll() + return stopResults + } + + func contains(session: MultitouchGestureSession, for fingerCount: Int) -> Bool { + entries[fingerCount]?.session === session + } + + var hasRecognizers: Bool { + !entries.isEmpty + } + + private func logConflictingGestures(in gestures: [GestureBinding]) { + let conflictingIDs = GestureBinding.conflictingActionableIDs(in: gestures) + guard conflictingIDs != conflictingGestureIDs else { return } + conflictingGestureIDs = conflictingIDs + + guard !conflictingIDs.isEmpty else { + log.info("No gestures are disabled by finger count conflicts") + return + } + + let conflictingGestures = gestures + .filter { conflictingIDs.contains($0.id) } + .map { "\($0.fingerCount)-finger \($0.kind)" } + log.warn("Disabled gestures that conflict on the same finger count: \(conflictingGestures.joined(separator: ", "))") + } + + private func startRecognizer( + for fingerCount: Int, + radial: GestureBinding?, + directionals: [GestureBinding], + magnifyOut: GestureBinding?, + magnifyIn: GestureBinding? + ) { + let recognizer = SubsurfaceGestureRecognizer( + fingerCount: fingerCount, + recognizedGestureTypes: [.swipe, .magnify], + requiresExactFingerCountToContinue: true + ) + + entries[fingerCount] = Entry( + recognizer: recognizer, + session: MultitouchGestureSession(), + task: nil, + radialMenuGesture: radial, + directionalGestures: directionals, + magnifyOutGesture: magnifyOut, + magnifyInGesture: magnifyIn + ) + + let task = Task { [weak self] in + guard let self else { return } + for await event in recognizer.events(from: gestureMonitor) { + guard !Task.isCancelled else { break } + await handleEvent(event, fingerCount) + } + } + entries[fingerCount]?.task = task + } + + private func stopRecognizer(for fingerCount: Int) -> StopResult? { + guard let entry = entries[fingerCount] else { return nil } + entry.task?.cancel() + entry.recognizer.reset() + return StopResult( + didOpenLoopWithGesture: entry.session.didOpenLoopWithThisGesture, + didAcquireGestureBlocker: entry.session.releaseGestureBlocker() + ) + } +} + +private extension Array where Element == GestureBinding { + var sortedByActionability: [GestureBinding] { + sorted { + if $0.resolvesToNoAction != $1.resolvesToNoAction { + return !$0.resolvesToNoAction + } + + return false + } + } +} diff --git a/Loop/Core/Multitouch/MultitouchTargetResolver.swift b/Loop/Core/Multitouch/MultitouchTargetResolver.swift new file mode 100644 index 000000000..af070c170 --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchTargetResolver.swift @@ -0,0 +1,122 @@ +// +// MultitouchTargetResolver.swift +// Loop +// +// Created by Kai Azim on 2026-07-06. +// + +import Defaults +import Scribe +import SwiftUI + +struct MultitouchGestureActivationContext { + let targetWindow: Window? + let startedInTitlebar: Bool + + func allows(_ gesture: GestureBinding) -> Bool { + gesture.effectiveActivationZone == .anywhere || startedInTitlebar + } +} + +@Loggable +@MainActor +final class MultitouchTargetResolver { + /// Window most recently targeted by a repeatable gesture. + /// Lets shrinking/growing continue after the cursor falls off the resized frame. + private var lastRepeatableWindow: Window? + /// Resolved once per touch and shared by every gesture in it, so they all agree on the window + private var touchTarget: TouchTarget? + + private struct TouchTarget { + let touchID: Int + /// The window under the cursor, or the focused window without "Resize window under cursor" + let window: Window? + let startedInTitlebar: Bool + } + + func reset() { + lastRepeatableWindow = nil + touchTarget = nil + } + + func activationContext( + for gesture: GestureBinding, + touchID: Int, + allowsRapidRepeat: Bool + ) -> MultitouchGestureActivationContext { + let target = touchTarget(touchID: touchID) + + let targetWindow: Window? = switch gesture.effectiveActivationZone { + case .titlebar: + target.startedInTitlebar ? target.window : nil + case .anywhere: + target.window ?? fallbackWindow(allowsRapidRepeat: allowsRapidRepeat) + } + + return MultitouchGestureActivationContext( + targetWindow: targetWindow, + startedInTitlebar: target.startedInTitlebar + ) + } + + func isCursorInTitlebar(touchID: Int) -> Bool { + touchTarget(touchID: touchID).startedInTitlebar + } + + func rememberRepeatableWindow(_ window: Window?, allowsRapidRepeat: Bool) { + guard let window, allowsRapidRepeat else { return } + lastRepeatableWindow = window + } + + /// Used when there's no window under the cursor, matching the rest of Loop's fallback to the focused window + private func fallbackWindow(allowsRapidRepeat: Bool) -> Window? { + if allowsRapidRepeat, let lastRepeatableWindow { + return lastRepeatableWindow + } + return try? WindowUtility.frontmostWindow() + } + + private func touchTarget(touchID: Int) -> TouchTarget { + if let touchTarget, touchTarget.touchID == touchID { + return touchTarget + } + + let cursorPosition = NSEvent.mouseLocation.flipY(screen: NSScreen.screens[0]) + + let window: Window? + let startedInTitlebar: Bool + if Defaults[.resizeWindowUnderCursor] { + window = WindowUtility.windowAtPosition(cursorPosition) + startedInTitlebar = window.map { isInTitlebar(cursorPosition, of: $0) } ?? false + } else { + window = try? WindowUtility.frontmostWindow() + // Only counts where the focused window is the topmost window under the cursor + startedInTitlebar = window.map { + SkyLightToolBelt.windowIDAtPosition(cursorPosition) == $0.cgWindowID + && isInTitlebar(cursorPosition, of: $0) + } ?? false + } + + let target = TouchTarget(touchID: touchID, window: window, startedInTitlebar: startedInTitlebar) + touchTarget = target + return target + } + + private func isInTitlebar(_ cursorPosition: CGPoint, of window: Window) -> Bool { + let minimumTitlebarHeight = Defaults[.gestureTitlebarHeight] + let titlebarHeight: CGFloat = if #available(macOS 26, *) { + if #unavailable(macOS 27), + let cornerRadius = SkyLightToolBelt.getCornerRadii(windowID: window.cgWindowID)?.topLeading { + max(2 * cornerRadius, minimumTitlebarHeight) + } else { + minimumTitlebarHeight + } + } else { + minimumTitlebarHeight + } + + let titlebarMinY = window.frame.minY + let titlebarMaxY = window.frame.minY + titlebarHeight + return cursorPosition.y >= titlebarMinY && cursorPosition.y <= titlebarMaxY + } +} diff --git a/Loop/Core/Multitouch/MultitouchTrigger+Magnify.swift b/Loop/Core/Multitouch/MultitouchTrigger+Magnify.swift new file mode 100644 index 000000000..878411302 --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchTrigger+Magnify.swift @@ -0,0 +1,263 @@ +// +// MultitouchTrigger+Magnify.swift +// Loop +// +// Created by Kai Azim on 2026-01-30. +// + +import CoreGraphics +import Subsurface + +/// Magnify handling lives separately from the main trigger as it has its own +/// activation threshold and reversal model, including direction changes between +/// magnify-in and magnify-out gestures and radial-menu center commits +extension MultitouchTrigger { + func handleMagnify(_ magnify: SubsurfaceGestureEvent.MagnifyEvent, fingerCount: Int) async { + guard let entry = recognizerRegistry.entry(for: fingerCount) else { return } + + #if DEBUG + if magnify.phase == .began || magnify.phase == .changed { + // Keep the processed centroid synchronized with the raw contact dots + // regardless of whether this gesture is eligible to activate. + beginDebugGestureIfNeeded(centroid: magnify.centroid, fingerCount: magnify.fingerCount) + debugOverlayController.updateMagnify( + centroid: magnify.centroid, + distance: magnify.distance, + originDistance: magnify.originDistance, + fingerCount: magnify.fingerCount + ) + } + #endif + + if let radialMenuGesture = entry.radialMenuGesture { + await handleRadialMenuMagnify(magnify, fingerCount: fingerCount, gesture: radialMenuGesture) + return + } + + switch magnify.phase { + case .began, .changed: + guard let session = recognizerRegistry.session(for: fingerCount) else { return } + + if !session.hasGestureBegun { + let initialGesture = magnify.distance >= magnify.originDistance ? entry.magnifyInGesture : entry.magnifyOutGesture + guard let initialGesture else { + if magnify.phase == .began { + // No binding for this direction, so the stroke belongs to the Dock + systemGestureFilter.releaseCurrentTouch(fingerCount: fingerCount) + } + return + } + guard handleGestureBegan(fingerCount: fingerCount, gesture: initialGesture) else { + return + } + } + + guard let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected, + let activeGesture = session.resolvedGesture + else { + return + } + + if resetMagnifyActionIfNeeded(session: session, magnify: magnify) { + return + } + + let crossedActivationThreshold = hasCrossedActivationThreshold(magnify) + if !session.hasCommittedMagnifyAction { + guard crossedActivationThreshold, + await activateGestureIfNeeded(fingerCount: fingerCount) + else { + return + } + } else if !session.hasActivated { + return + } + + guard let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected else { + return + } + + if crossedActivationThreshold, + magnifyReversalDetected(currentGesture: activeGesture, magnify: magnify) { + let opposite = activeGesture.kind == .magnifyOut ? entry.magnifyInGesture : entry.magnifyOutGesture + handleMagnifyReversal( + fingerCount: fingerCount, + currentGesture: activeGesture, + oppositeGesture: opposite, + distance: magnify.distance + ) + return + } + + #if DEBUG + var didCommit = false + #endif + let allowsRapidRepeatAction = resolvedWindowAction(from: activeGesture).map { + $0.allowsRapidRepeat || $0.direction == .cycle + } ?? false + + session.commitMagnify( + gesture: activeGesture, + distance: magnify.distance, + originDistance: magnify.originDistance, + step: magnifyStepSize, + allowsRapidRepeat: allowsRapidRepeatAction + ) { reverse in + #if DEBUG + didCommit = true + #endif + triggerSingleAction( + from: activeGesture, + reverse: reverse, + canAdvanceCycle: !session.isRevisitingAction + ) + } + + #if DEBUG + if didCommit { + debugOverlayController.recordMagnifyCommit(distance: magnify.distance) + } + #endif + + case let .ended(reason): + endStroke(for: fingerCount, reason: reason) + + case .cancelled: + endStroke(for: fingerCount, reason: nil) + + default: + break + } + } + + /// Magnify within a radial menu gesture triggers the center (last) radial menu action. + private func handleRadialMenuMagnify( + _ magnify: SubsurfaceGestureEvent.MagnifyEvent, + fingerCount: Int, + gesture: GestureBinding + ) async { + switch magnify.phase { + case .began, .changed: + if magnify.phase == .began, recognizerRegistry.session(for: fingerCount)?.hasGestureBegun != true { + handleGestureBegan(fingerCount: fingerCount, gesture: gesture) + } + guard let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected else { return } + if resetMagnifyActionIfNeeded(session: session, magnify: magnify) { + return + } + if !session.hasCommittedMagnifyAction { + guard hasCrossedActivationThreshold(magnify), + await activateGestureIfNeeded(fingerCount: fingerCount) + else { + return + } + } else if !session.hasActivated { + return + } + guard let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected else { return } + + let actions = radialMenuActions + guard !actions.isEmpty else { return } + let centerActionIndex = actions.count - 1 + + #if DEBUG + var didCommit = false + #endif + session.commitRadialMagnify( + distance: magnify.distance, + originDistance: magnify.originDistance, + step: magnifyStepSize + ) { reverse in + #if DEBUG + didCommit = true + #endif + triggerRadialMenuAction( + at: centerActionIndex, + from: actions[...], + reverse: reverse, + canAdvanceCycle: !session.isRevisitingAction + ) + } + + #if DEBUG + if didCommit { + debugOverlayController.recordMagnifyCommit(distance: magnify.distance) + } + #endif + + case let .ended(reason): + endStroke(for: fingerCount, reason: reason) + + case .cancelled: + endStroke(for: fingerCount, reason: nil) + + default: + break + } + } + + private func magnifyReversalDetected( + currentGesture: GestureBinding, + magnify: SubsurfaceGestureEvent.MagnifyEvent + ) -> Bool { + switch currentGesture.kind { + case .magnifyOut: + magnify.distance >= magnify.originDistance + case .magnifyIn: + magnify.distance <= magnify.originDistance + default: + false + } + } + + private func hasCrossedActivationThreshold(_ magnify: SubsurfaceGestureEvent.MagnifyEvent) -> Bool { + abs(magnify.distance - magnify.originDistance) >= magnifyStepSize + } + + private func resetMagnifyActionIfNeeded( + session: MultitouchGestureSession, + magnify: SubsurfaceGestureEvent.MagnifyEvent + ) -> Bool { + let hadCommittedAction = session.hasCommittedMagnifyAction + let isInsideNoSelectionZone = session.resetMagnifyActionIfNeeded( + distance: magnify.distance, + originDistance: magnify.originDistance, + step: magnifyStepSize + ) + if isInsideNoSelectionZone, hadCommittedAction { + clearActionSelection() + } + return isInsideNoSelectionZone + } + + private func handleMagnifyReversal( + fingerCount: Int, + currentGesture: GestureBinding, + oppositeGesture: GestureBinding?, + distance: CGFloat + ) { + guard let oppositeGesture else { + // There is no action to reverse into. Keep the stroke alive, like swipes do + return + } + + guard let session = recognizerRegistry.session(for: fingerCount) else { return } + if session.switchMagnifyGesture(to: oppositeGesture, distance: distance) { + #if DEBUG + debugOverlayController.recordMagnifyCommit(distance: distance) + #endif + triggerSwitchedGesture(oppositeGesture, session: session) + return + } + + if isCycleAction(currentGesture) { + triggerSingleAction(from: currentGesture, reverse: true) + recognizerRegistry.session(for: fingerCount)?.synchronizeMagnifyStepIndex( + distance: distance, + step: magnifyStepSize + ) + } else { + resetLoopState(for: fingerCount, forceClose: true, endsStroke: false) + } + } +} diff --git a/Loop/Core/Multitouch/MultitouchTrigger+Swipe.swift b/Loop/Core/Multitouch/MultitouchTrigger+Swipe.swift new file mode 100644 index 000000000..50f7f42cf --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchTrigger+Swipe.swift @@ -0,0 +1,329 @@ +// +// MultitouchTrigger+Swipe.swift +// Loop +// +// Created by Kai Azim on 2026-01-30. +// + +import CoreGraphics +import Subsurface + +/// Swipe handling lives separately from the main trigger as it has its own +/// gesture-selection rules: angle-to-direction mapping, origin-crossing reversal, +/// and radial-menu slot selection all build on swipe-specific geometry +extension MultitouchTrigger { + func handleSwipe(_ swipe: SubsurfaceGestureEvent.SwipeEvent, fingerCount: Int) async { + guard let entry = recognizerRegistry.entry(for: fingerCount) else { return } + + #if DEBUG + beginDebugGestureIfNeeded(centroid: swipe.centroid, fingerCount: swipe.fingerCount) + debugOverlayController.updateSwipe( + centroid: swipe.centroid, + translation: swipe.translation, + angle: swipe.angle, + distance: swipe.distance, + fingerCount: swipe.fingerCount + ) + #endif + + if let radialMenuGesture = entry.radialMenuGesture { + await handleRadialMenuSwipe(swipe, fingerCount: fingerCount, gesture: radialMenuGesture) + } else { + let direction = directionalSwipeKind(angle: swipe.angle) + let directionalGesture = entry.directionalGestures.first { $0.kind == direction } + let isTerminal = switch swipe.phase { + case .ended(_), .cancelled: + true + default: + false + } + if directionalGesture != nil || entry.session.hasGestureBegun || isTerminal { + await handleDirectionalSwipe( + swipe, + fingerCount: fingerCount, + direction: direction, + matchedGesture: directionalGesture + ) + } else if swipe.phase == .began { + // No binding for this direction, so the stroke belongs to the Dock + systemGestureFilter.releaseCurrentTouch(fingerCount: fingerCount) + } + } + } + + private func handleRadialMenuSwipe( + _ swipe: SubsurfaceGestureEvent.SwipeEvent, + fingerCount: Int, + gesture: GestureBinding + ) async { + switch swipe.phase { + case .began, .changed: + if swipe.phase == .began, recognizerRegistry.session(for: fingerCount)?.hasGestureBegun != true { + handleGestureBegan(fingerCount: fingerCount, gesture: gesture) + } + guard await activateGestureIfNeeded(fingerCount: fingerCount), + let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected + else { + return + } + + let normalizedAngle = RadialGestureGeometry.normalizedAngle(fromSubsurfaceAngle: swipe.angle) + let actions = radialMenuActions.dropLast() + guard actions.count > 1 else { return } + + let newIndex = RadialGestureGeometry.slotIndex( + angle: normalizedAngle, + actionCount: actions.count + ) + + if resetSwipeActionIfNeeded(fingerCount: fingerCount, distance: swipe.distance) { + return + } + + #if DEBUG + var didCommit = false + #endif + session.commitSwipe( + distance: swipe.distance, + newKey: .radialSlot(newIndex), + step: swipeCycleStepSize + ) { reverse in + #if DEBUG + didCommit = true + #endif + triggerRadialMenuAction( + at: newIndex, + from: actions, + reverse: reverse, + canAdvanceCycle: !session.isRevisitingAction + ) + } + + #if DEBUG + if didCommit { + debugOverlayController.recordSwipeCommit(distance: swipe.distance, slot: newIndex) + } + #endif + + case let .ended(reason): + endStroke(for: fingerCount, reason: reason) + + case .cancelled: + endStroke(for: fingerCount, reason: nil) + + default: + break + } + } + + private func handleDirectionalSwipe( + _ swipe: SubsurfaceGestureEvent.SwipeEvent, + fingerCount: Int, + direction: GestureBinding.Kind, + matchedGesture: GestureBinding? + ) async { + guard let entry = recognizerRegistry.entry(for: fingerCount) else { return } + + switch swipe.phase { + case .began, .changed: + guard let session = recognizerRegistry.session(for: fingerCount) else { return } + + if !session.hasGestureBegun { + guard let matchedGesture else { return } + guard handleGestureBegan(fingerCount: fingerCount, gesture: matchedGesture) else { + return + } + } + + // Selecting from no selection requires crossing the threshold while moving + // outward, so heading back to the center can't briefly commit an action + if !session.hasCommittedSwipeAction, + swipe.distance <= entry.recognizer.minimumSwipeTranslation || + !isSwipeMovingOutward(swipe) { + return + } + + guard await activateGestureIfNeeded(fingerCount: fingerCount), + let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected, + let activeGesture = session.resolvedGesture ?? matchedGesture + else { + return + } + + if resetSwipeActionIfNeeded(fingerCount: fingerCount, distance: swipe.distance) { + return + } + + if direction != activeGesture.kind { + if let oppositeDirection = oppositeDirectionalSwipeKind(of: activeGesture.kind), + direction == oppositeDirection { + let oppositeGesture = entry.directionalGestures.first { $0.kind == oppositeDirection } + handleSwipeReversal( + fingerCount: fingerCount, + currentGesture: activeGesture, + oppositeGesture: oppositeGesture, + distance: swipe.distance, + hasCrossedOrigin: hasSwipeCrossedOrigin(translation: swipe.translation, currentGesture: activeGesture) + ) + } else if let matchedGesture { + guard switchSwipeGesture( + fingerCount: fingerCount, + to: matchedGesture, + distance: swipe.distance + ) else { + if !session.hasSwipeActionReset { + resetLoopState(for: fingerCount, forceClose: true, endsStroke: false) + } + return + } + } else { + // An unbound direction deselects, but stays part of the current stroke + clearSwipeAction(fingerCount: fingerCount) + } + return + } + + #if DEBUG + var didCommit = false + #endif + session.commitSwipe( + distance: swipe.distance, + newKey: .gesture(activeGesture.id), + step: swipeCycleStepSize + ) { reverse in + #if DEBUG + didCommit = true + #endif + triggerSingleAction( + from: activeGesture, + reverse: reverse, + canAdvanceCycle: !session.isRevisitingAction + ) + } + + #if DEBUG + if didCommit { + debugOverlayController.recordSwipeCommit(distance: swipe.distance) + } + #endif + + case let .ended(reason): + endStroke(for: fingerCount, reason: reason) + + case .cancelled: + endStroke(for: fingerCount, reason: nil) + + default: + break + } + } + + private func oppositeDirectionalSwipeKind(of kind: GestureBinding.Kind) -> GestureBinding.Kind? { + switch kind { + case .swipeUp: + .swipeDown + case .swipeDown: + .swipeUp + case .swipeLeft: + .swipeRight + case .swipeRight: + .swipeLeft + default: + nil + } + } + + private func hasSwipeCrossedOrigin(translation: CGPoint, currentGesture: GestureBinding) -> Bool { + let projection: CGFloat = switch currentGesture.kind { + case .swipeUp: + translation.y + case .swipeDown: + -translation.y + case .swipeRight: + translation.x + case .swipeLeft: + -translation.x + default: + 0 + } + + return projection < 0 + } + + private func switchSwipeGesture( + fingerCount: Int, + to gesture: GestureBinding, + distance: CGFloat + ) -> Bool { + guard let session = recognizerRegistry.session(for: fingerCount), + session.switchSwipeGesture(to: gesture, distance: distance) + else { + return false + } + #if DEBUG + debugOverlayController.recordSwipeCommit(distance: distance) + #endif + triggerSwitchedGesture(gesture, session: session) + return true + } + + private func handleSwipeReversal( + fingerCount: Int, + currentGesture: GestureBinding, + oppositeGesture: GestureBinding?, + distance: CGFloat, + hasCrossedOrigin: Bool + ) { + if oppositeGesture == nil { + // There is no action to reverse into. Keep the current stroke and + // overlay alive while the fingers travel through this direction. + clearSwipeAction(fingerCount: fingerCount) + return + } + + if hasCrossedOrigin, let oppositeGesture { + guard let session = recognizerRegistry.session(for: fingerCount) else { return } + if session.switchSwipeGesture(to: oppositeGesture, distance: distance) { + #if DEBUG + debugOverlayController.recordSwipeCommit(distance: distance) + #endif + triggerSwitchedGesture(oppositeGesture, session: session) + return + } + + if session.hasSwipeActionReset { return } + } + + if isCycleAction(currentGesture) { + triggerSingleAction(from: currentGesture, reverse: true) + recognizerRegistry.session(for: fingerCount)?.synchronizeSwipeStepIndex(distance: distance) + } else { + resetLoopState(for: fingerCount, forceClose: true, endsStroke: false) + } + } + + private func clearSwipeAction(fingerCount: Int) { + guard recognizerRegistry.session(for: fingerCount)?.clearSwipeAction() == true else { return } + clearActionSelection() + } + + private func directionalSwipeKind(angle: CGFloat) -> GestureBinding.Kind { + let normalizedAngle = RadialGestureGeometry.normalizedAngle(fromSubsurfaceAngle: angle) + + if normalizedAngle >= 7 * .pi / 4 || normalizedAngle < .pi / 4 { + return .swipeUp + } else if normalizedAngle >= .pi / 4, normalizedAngle < 3 * .pi / 4 { + return .swipeRight + } else if normalizedAngle >= 3 * .pi / 4, normalizedAngle < 5 * .pi / 4 { + return .swipeDown + } else { + return .swipeLeft + } + } + + private func isSwipeMovingOutward(_ swipe: SubsurfaceGestureEvent.SwipeEvent) -> Bool { + let radialVelocity = swipe.translation.x * swipe.velocity.x + + swipe.translation.y * swipe.velocity.y + return radialVelocity >= 0 + } +} diff --git a/Loop/Core/Multitouch/MultitouchTrigger.swift b/Loop/Core/Multitouch/MultitouchTrigger.swift new file mode 100644 index 000000000..bc10f1408 --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchTrigger.swift @@ -0,0 +1,514 @@ +// +// MultitouchTrigger.swift +// Loop +// +// Created by Kai Azim on 2026-01-30. +// + +import AppKit +import Defaults +import Scribe +import Subsurface +import SwiftUI + +@Loggable +@MainActor +final class MultitouchTrigger { + private let windowActionCache: WindowActionCache + private let openCallback: (WindowAction, Window) async throws -> LoopOpenResult + private let closeCallback: (Bool) -> () + private let changeActionCallback: (WindowAction, _ reverse: Bool, _ canAdvanceCycle: Bool) -> () + private let checkIfLoopOpen: () -> Bool + + private let gestureMonitor = SubsurfaceMonitor() + private let gestureBlocker: MultitouchGestureBlocker = .init() + private(set) lazy var systemGestureFilter = SystemGestureFilter( + gestureMonitor: gestureMonitor, + isCursorInTitlebar: { [weak self] touchID in self?.targetResolver.isCursorInTitlebar(touchID: touchID) ?? false } + ) + + #if DEBUG + let debugOverlayController = GestureDebugOverlayController() + private var debugContactsTask: Task<(), Never>? + #endif + lazy var recognizerRegistry = MultitouchRecognizerRegistry( + gestureMonitor: gestureMonitor + ) { [weak self] event, fingerCount in + guard let self else { return } + await handleGestureEvent(event, fingerCount: fingerCount) + } + + let targetResolver = MultitouchTargetResolver() + + private var gesturesObservationTask: Task<(), Never>? + private var radialMenuActionsObservationTask: Task<(), Never>? + private var isStarted = false + + let swipeCycleStepSize: CGFloat = 0.15 + let magnifyStepSize: CGFloat = 0.2 + + var radialMenuActions = RadialMenuAction.userConfiguredActions + + private static let failedToResolveKeybindAction: WindowAction = .init(.noAction) + + init( + windowActionCache: WindowActionCache, + openCallback: @escaping (WindowAction, Window) async throws -> LoopOpenResult, + closeCallback: @escaping (Bool) -> (), + changeAction: @escaping (WindowAction, _ reverse: Bool, _ canAdvanceCycle: Bool) -> (), + checkIfLoopOpen: @escaping () -> Bool + ) { + self.windowActionCache = windowActionCache + self.openCallback = openCallback + self.closeCallback = closeCallback + self.changeActionCallback = changeAction + self.checkIfLoopOpen = checkIfLoopOpen + } + + func start() { + guard !isStarted else { return } + isStarted = true + + rebuildRecognizers() + radialMenuActions = RadialMenuAction.userConfiguredActions + + gesturesObservationTask = Task { [weak self] in + // Watch keybinds too, so gestures referencing a deleted keybind stay in sync. + for await _ in Defaults.updates(.gestures, .keybinds, initial: false) { + guard !Task.isCancelled, let self else { break } + rebuildRecognizers() + } + } + + radialMenuActionsObservationTask = Task { [weak self] in + for await _ in Defaults.updates(.enableRadialMenuCustomization, .radialMenuActions, initial: false) { + guard !Task.isCancelled, let self else { break } + radialMenuActions = RadialMenuAction.userConfiguredActions + } + } + } + + func stop() { + guard isStarted else { return } + isStarted = false + + gesturesObservationTask?.cancel() + gesturesObservationTask = nil + radialMenuActionsObservationTask?.cancel() + radialMenuActionsObservationTask = nil + + systemGestureFilter.stop() + gestureMonitor.stop() + #if DEBUG + closeDebugOverlay(force: true) + #endif + handleStopResults(recognizerRegistry.stopAll()) + gestureBlocker.stop() + targetResolver.reset() + } + + func shutdown() { + stop() + } + + private func updateSystemGestureFilter() { + guard isStarted, recognizerRegistry.hasRecognizers else { + systemGestureFilter.stop() + return + } + + systemGestureFilter.start(claiming: SystemGestureFilter.claims(for: Defaults[.gestures])) + } + + private func rebuildRecognizers() { + #if DEBUG + closeDebugOverlay(force: true) + #endif + handleStopResults(recognizerRegistry.rebuild(with: Defaults[.gestures])) + if recognizerRegistry.hasRecognizers { + gestureMonitor.start() + gestureBlocker.start() + } else { + gestureMonitor.stop() + gestureBlocker.stop() + } + updateSystemGestureFilter() + } + + private func handleStopResults(_ stopResults: [MultitouchRecognizerRegistry.StopResult]) { + #if DEBUG + if !stopResults.isEmpty { + closeDebugOverlay(force: true) + } + #endif + for stopResult in stopResults { + if stopResult.didOpenLoopWithGesture { + closeCallback(false) + } + if stopResult.didAcquireGestureBlocker { + gestureBlocker.release() + } + } + } + + private func handleGestureEvent(_ event: SubsurfaceGestureEvent, fingerCount: Int) async { + #if DEBUG + updateDebugOverlay(for: event) + #endif + + switch event { + case let .swipe(swipe): + await handleSwipe(swipe, fingerCount: fingerCount) + case let .magnify(magnify): + await handleMagnify(magnify, fingerCount: fingerCount) + case .determining: + await handleEarlyRadialMenuGesture(phase: .determining, fingerCount: fingerCount) + case .unresolvedEnded: + await handleEarlyRadialMenuGesture(phase: event.phase, fingerCount: fingerCount) + case let .rotation(rotation): + await handleEarlyRadialMenuGesture(phase: rotation.phase, fingerCount: fingerCount) + } + } + + /// Begins a gesture session by resolving its target window and blocking trackpad events. + @discardableResult + func handleGestureBegan(fingerCount: Int, gesture: GestureBinding) -> Bool { + guard let session = recognizerRegistry.session(for: fingerCount), + session.shouldAttemptBegin(with: gesture) + else { + return false + } + + let allowsRapidRepeat = resolvedWindowAction(from: gesture)?.allowsRapidRepeat == true + let activationContext = targetResolver.activationContext( + for: gesture, + touchID: systemGestureFilter.currentTouchID, + allowsRapidRepeat: allowsRapidRepeat + ) + + let loopWasAlreadyOpen = checkIfLoopOpen() + + releaseGestureBlocker(for: session) + + guard systemGestureFilter.canClaimCurrentTouch(fingerCount: fingerCount) else { + log.info("Rejected \(fingerCount)-finger \(gesture.kind) gesture: \(dockOwnershipRejectionReason)") + session.abandonStroke() + return false + } + + guard session.begin( + activationContext: activationContext, + gesture: gesture, + loopWasAlreadyOpen: loopWasAlreadyOpen + ) else { + if !activationContext.allows(gesture) { + log.info("Rejected \(fingerCount)-finger \(gesture.kind) gesture: titlebar-only gesture started outside a titlebar") + } else { + log.info("Rejected \(fingerCount)-finger \(gesture.kind) gesture: no target window") + } + systemGestureFilter.releaseCurrentTouch(fingerCount: fingerCount) + // Keep the DEBUG overlay alive, as it follows the physical stroke + return false + } + + // Claimed only once accepted, so the filter never sees Loop own a stroke it's about to reject + guard systemGestureFilter.claimCurrentTouch(fingerCount: fingerCount) else { + log.info("Rejected \(fingerCount)-finger \(gesture.kind) gesture: failed to claim the touch, \(dockOwnershipRejectionReason)") + session.reject() + return false + } + + session.setSwipeActivationDistance( + recognizerRegistry.entry(for: fingerCount)?.recognizer.minimumSwipeTranslation + ) + + targetResolver.rememberRepeatableWindow( + activationContext.targetWindow, + allowsRapidRepeat: allowsRapidRepeat + ) + + gestureBlocker.acquire() + session.acquireGestureBlocker() + return true + } + + private var dockOwnershipRejectionReason: String { + MissionControl.isShowing ? "Mission Control is showing" : "the Dock already owns this stroke" + } + + private func handleEarlyRadialMenuGesture( + phase: SubsurfaceGesturePhase, + fingerCount: Int + ) async { + // Radial-menu gestures intentionally activate while Subsurface is still determining + // the gesture. The presentation policy decides whether the no-selection state is visible. + guard let gesture = recognizerRegistry.entry(for: fingerCount)?.radialMenuGesture else { return } + + switch phase { + case .determining, .began, .changed: + guard let session = recognizerRegistry.session(for: fingerCount), + !session.isGestureRejected + else { + return + } + + if !session.hasGestureBegun { + guard handleGestureBegan(fingerCount: fingerCount, gesture: gesture) else { + return + } + } + _ = await activateGestureIfNeeded(fingerCount: fingerCount) + + case let .ended(reason): + endStroke(for: fingerCount, reason: reason) + + case .cancelled: + endStroke(for: fingerCount, reason: nil) + + default: + break + } + } + + #if DEBUG + /// Swipe and magnify updates are handled in their own handlers, after + /// their recognizer entry is resolved. + private func updateDebugOverlay(for event: SubsurfaceGestureEvent) { + guard GestureDebugOverlayController.isEnabled else { return } + + switch event { + case let .determining(centroid, fingerCount): + // The overlay visualizes the physical stroke, even when activation + // policy rejects its configured action (for example, a titlebar-only + // gesture that began elsewhere). + beginDebugGestureIfNeeded(centroid: centroid, fingerCount: fingerCount) + debugOverlayController.updateDetermining(centroid: centroid, fingerCount: fingerCount) + case let .unresolvedEnded(reason): + let shouldForceClose = switch reason { + case .lifted, .timedOut, .cancelled: + true + case .fingerCountChanged: + false + } + closeDebugOverlay(force: shouldForceClose) + case let .rotation(rotation): + switch rotation.phase { + case .ended(_), .cancelled: + closeDebugOverlay(force: true) + default: + break + } + case .swipe, .magnify: + break + } + } + + func beginDebugGestureIfNeeded(centroid: CGPoint, fingerCount: Int) { + guard GestureDebugOverlayController.isEnabled, + let entry = recognizerRegistry.entry(for: fingerCount), + entry.radialMenuGesture != nil || + !entry.directionalGestures.isEmpty || + entry.magnifyOutGesture != nil || + entry.magnifyInGesture != nil, + !debugOverlayController.model.snapshot.visible + else { + return + } + + let threshold = entry.recognizer.minimumSwipeTranslation + let center: CGPoint = if Defaults[.lockRadialMenuToCenter], let screen = NSScreen.main { + CGPoint(x: screen.frame.midX, y: screen.frame.midY) + } else { + NSEvent.mouseLocation + } + let actionCount: Int = if entry.radialMenuGesture != nil { + max(radialMenuActions.count - 1, 0) + } else if !entry.directionalGestures.isEmpty { + // Directional swipes always occupy the four cardinal quadrants, + // even when only a subset of those directions has an action. + 4 + } else { + 0 + } + debugOverlayController.begin( + originCentroid: centroid, + fingerCount: fingerCount, + recognitionThreshold: threshold, + actionCount: actionCount, + swipeStep: swipeCycleStepSize, + magnifyStep: magnifyStepSize, + screenCenter: center + ) + startDebugContactsIfNeeded() + } + + private func startDebugContactsIfNeeded() { + guard debugContactsTask == nil else { return } + debugContactsTask = Task { [weak self] in + guard let self else { return } + for await (_, contacts) in gestureMonitor.contacts() { + guard !Task.isCancelled else { break } + debugOverlayController.updateRawContacts(contacts) + } + } + } + + private func closeDebugOverlay(force: Bool = false) { + debugOverlayController.close(force: force) + guard !debugOverlayController.model.snapshot.visible else { return } + debugContactsTask?.cancel() + debugContactsTask = nil + } + #endif + + /// Opens Loop on the target window captured when the gesture session began. Radial-menu + /// gestures call this during `.determining`, though the no-selection state may remain hidden; + /// directional swipes activate on `.began`, while magnify gestures gate on displacement. + func activateGestureIfNeeded(fingerCount: Int) async -> Bool { + guard let session = recognizerRegistry.session(for: fingerCount), !session.isGestureRejected else { return false } + + if session.hasActivated { return true } + + var openedLoop = false + if let window = session.pendingTargetWindow { + do { + let result = try await openCallback(.init(.noSelection), window) + openedLoop = result == .opened + } catch { + log.info("Failed to open Loop for \(fingerCount)-finger gesture: \(error.localizedDescription)") + if recognizerRegistry.contains(session: session, for: fingerCount) { + session.reject() + releaseGestureBlocker(for: session) + systemGestureFilter.releaseCurrentTouch(fingerCount: fingerCount) + } + #if DEBUG + closeDebugOverlay(force: true) + #endif + return false + } + } + + guard recognizerRegistry.contains(session: session, for: fingerCount) else { + if openedLoop { + closeCallback(true) + } + return false + } + session.markActivated(openedLoop: openedLoop) + return true + } + + /// An added finger starts a different gesture, so it force-closes Loop + func endStroke(for fingerCount: Int, reason: SubsurfaceGestureEvent.GestureEndReason?) { + resetLoopState(for: fingerCount, forceClose: reason == .fingerCountChanged(.increased)) + } + + /// - Parameter endsStroke: false when Loop abandons a stroke still in progress, keeping it locked + func resetLoopState(for fingerCount: Int, forceClose: Bool = false, endsStroke: Bool = true) { + guard let session = recognizerRegistry.session(for: fingerCount) else { + return + } + + if session.didOpenLoopWithThisGesture { + closeCallback(forceClose) + } + + releaseGestureBlocker(for: session) + if endsStroke { + session.reset() + } else { + session.abandonStroke() + } + #if DEBUG + closeDebugOverlay(force: true) + #endif + } + + @discardableResult + func resetSwipeActionIfNeeded(fingerCount: Int, distance: CGFloat) -> Bool { + guard let session = recognizerRegistry.session(for: fingerCount) else { + return false + } + + if session.resetSwipeActionIfNeeded(distance: distance) { + changeAction(.init(.noSelection)) + #if DEBUG + debugOverlayController.recordSwipeActionReset() + #endif + return true + } + + return session.shouldSuppressSwipeAction(distance: distance) + } + + private func releaseGestureBlocker(for session: MultitouchGestureSession) { + if session.releaseGestureBlocker() { + gestureBlocker.release() + } + } +} + +// MARK: - Actions + +extension MultitouchTrigger { + func clearActionSelection() { + changeAction(.init(.noSelection)) + } + + private func changeAction(_ action: WindowAction, reverse: Bool = false, canAdvanceCycle: Bool = true) { + changeActionCallback(action, reverse, canAdvanceCycle) + } + + func isCycleAction(_ gesture: GestureBinding) -> Bool { + resolvedWindowAction(from: gesture)?.direction == .cycle + } + + func triggerRadialMenuAction( + at index: Int, + from actions: ArraySlice, + reverse: Bool = false, + canAdvanceCycle: Bool = true + ) { + guard actions.indices.contains(index) else { return } + let action = actions[index] + + let resolvedAction: WindowAction = switch action.type { + case let .custom(windowAction): + windowAction + case let .keybindReference(id): + resolveKeybindReference(id) + } + + changeAction(resolvedAction, reverse: reverse, canAdvanceCycle: canAdvanceCycle) + } + + func resolvedWindowAction(from gesture: GestureBinding) -> WindowAction? { + guard case let .singleAction(actionType) = gesture.action else { return nil } + switch actionType { + case let .custom(action): return action + case let .keybindReference(id): return resolveKeybindReference(id) + } + } + + func triggerSingleAction(from gesture: GestureBinding, reverse: Bool = false, canAdvanceCycle: Bool = true) { + guard let resolvedAction = resolvedWindowAction(from: gesture) else { return } + changeAction(resolvedAction, reverse: reverse, canAdvanceCycle: canAdvanceCycle) + } + + func triggerSwitchedGesture(_ gesture: GestureBinding, session: MultitouchGestureSession) { + triggerSingleAction(from: gesture, canAdvanceCycle: !session.isRevisitingAction) + + if let window = session.pendingTargetWindow, + resolvedWindowAction(from: gesture)?.allowsRapidRepeat == true { + targetResolver.rememberRepeatableWindow(window, allowsRapidRepeat: true) + } + } + + private func resolveKeybindReference(_ id: UUID) -> WindowAction { + if let cached = windowActionCache.actionsByIdentifier[id] { + return cached + } + log.warn("Gesture references keybind \(id) that no longer exists") + return Self.failedToResolveKeybindAction + } +} diff --git a/Loop/Core/Multitouch/RadialGestureGeometry.swift b/Loop/Core/Multitouch/RadialGestureGeometry.swift new file mode 100644 index 000000000..01fc67546 --- /dev/null +++ b/Loop/Core/Multitouch/RadialGestureGeometry.swift @@ -0,0 +1,126 @@ +// +// RadialGestureGeometry.swift +// Loop +// + +import CoreGraphics + +enum RadialGestureGeometry { + static func normalizedAngle(fromSubsurfaceAngle angle: CGFloat) -> CGFloat { + var normalized = (.pi / 2 - angle).truncatingRemainder(dividingBy: 2 * .pi) + if normalized < 0 { + normalized += 2 * .pi + } + return normalized + } + + static func slotIndex( + angle: CGFloat, + actionCount: Int, + cardinalBias: CGFloat = 0.1 + ) -> Int { + guard actionCount > 0 else { return 0 } + + let span = (2 * CGFloat.pi) / CGFloat(actionCount) + let halfSpan = span / 2 + let adjusted = (angle + halfSpan).truncatingRemainder(dividingBy: 2 * .pi) + let rawSegment = Int(adjusted / span) % actionCount + + guard actionCount == 8 else { return rawSegment } + + let segmentPosition = adjusted.truncatingRemainder(dividingBy: span) / span + guard rawSegment % 2 != 0 else { return rawSegment } + + if segmentPosition < cardinalBias / 2 { + return (rawSegment - 1 + actionCount) % actionCount + } + if segmentPosition > 1 - cardinalBias / 2 { + return (rawSegment + 1) % actionCount + } + return rawSegment + } + + /// Angles in Loop's normalized coordinate system where the selected slot changes. + /// For the eight-action cardinal-biased layout, the boundaries are shifted inside + /// intercardinal segments to match `slotIndex` exactly. + static func slotBoundaryAngles( + actionCount: Int, + cardinalBias: CGFloat = 0.1 + ) -> [CGFloat] { + guard actionCount > 0 else { return [] } + + let span = (2 * CGFloat.pi) / CGFloat(actionCount) + let halfSpan = span / 2 + + if actionCount != 8 { + return (0 ..< actionCount).map { index in + normalize(angle: CGFloat(index) * span - halfSpan) + } + } + + return (0 ..< actionCount).compactMap { segment in + guard segment % 2 != 0 else { return nil } + let start = CGFloat(segment) * span + let lower = start + span * cardinalBias / 2 + return normalize(angle: lower - halfSpan) + } + (0 ..< actionCount).compactMap { segment in + guard segment % 2 != 0 else { return nil } + let start = CGFloat(segment) * span + let upper = start + span * (1 - cardinalBias / 2) + return normalize(angle: upper - halfSpan) + } + } + + static func thresholdRadii( + baseline: CGFloat, + step: CGFloat, + maximum: CGFloat + ) -> [CGFloat] { + guard step > 0, maximum >= 0 else { return [] } + + var radii: [CGFloat] = [] + if baseline <= maximum { + var radius = baseline + while radius <= maximum { + radii.append(radius) + radius += step + } + } + + var radius = baseline - step + while radius >= 0 { + if radius <= maximum { + radii.append(radius) + } + radius -= step + } + + return radii.sorted() + } + + /// Maps magnification progress onto the swipe-ring geometry. The first + /// magnification step reaches the baseline ring; every later step advances + /// by one concentric-ring interval. + static func magnificationDisplayRadius( + distance: CGFloat, + originDistance: CGFloat, + activationRadius: CGFloat, + ringStep: CGFloat, + magnificationStep: CGFloat + ) -> CGFloat? { + guard activationRadius >= 0, ringStep >= 0, magnificationStep > 0 else { + return nil + } + + let progress = abs(distance - originDistance) / magnificationStep + if progress <= 1 { + return activationRadius * progress + } + return activationRadius + (progress - 1) * ringStep + } + + private static func normalize(angle: CGFloat) -> CGFloat { + let normalized = angle.truncatingRemainder(dividingBy: 2 * .pi) + return normalized >= 0 ? normalized : normalized + 2 * .pi + } +} diff --git a/Loop/Core/Multitouch/SystemGestureFilter.swift b/Loop/Core/Multitouch/SystemGestureFilter.swift new file mode 100644 index 000000000..42203e34a --- /dev/null +++ b/Loop/Core/Multitouch/SystemGestureFilter.swift @@ -0,0 +1,512 @@ +// +// SystemGestureFilter.swift +// Loop +// +// Created by Kai Azim on 2026-09-24. +// + +import CoreGraphics +import Foundation +import os +import Scribe +import Subsurface + +/// Suppresses Dock gestures (Spaces, Mission Control, App Exposé) that conflict with Loop's. +@Loggable +final class SystemGestureFilter { + enum DockGesture: Hashable, CaseIterable { + case swipeLeft, swipeRight, swipeUp, swipeDown, pinch, spread + } + + struct Claims { + var anywhere: Set = [] + var titlebarOnly: Set = [] + + var isEmpty: Bool { + anywhere.isEmpty && titlebarOnly.isEmpty + } + } + + private enum Owner { + case loop, dock + } + + private enum TitlebarLookup { + case pending, inside, outside + } + + private struct State { + var isRunning = false + var claims: [Int: Claims] = [:] + /// Active finger count per device + var fingerCounts: [UInt64: Int] = [:] + var touchID = 0 + var isTouching = false + var hasLookedUpTouch = false + var titlebarLookup = TitlebarLookup.pending + var isMissionControlShowing = false + /// Absent while undecided + var owners: [Int: Owner] = [:] + var sequenceGeneration = 0 + + var fingerCount: Int { + fingerCounts.values.max() ?? 0 + } + + /// Look up once enough fingers are down for the smallest claim + var lookupFingerCount: Int? { + claims.filter { !$0.value.isEmpty }.keys.min().map { max($0, 2) } + } + } + + private struct Hold { + var events: [CGEvent] + let fingerCount: Int + let touchID: Int? + let motion: CGEventField.DockSwipeMotion + let claims: Claims + let start: ContinuousClock.Instant + var direction: DockGesture? + } + + private enum Sequence { + case passing + case dropping + case holding(Hold) + } + + private enum Resolution { + case loop(reason: String) + case dock(reason: String) + case awaitingTitlebar + case awaitingDirection + } + + private let gestureMonitor: SubsurfaceMonitor + private let isCursorInTitlebar: @MainActor (_ touchID: Int) -> Bool + private let state = OSAllocatedUnfairLock(initialState: State()) + private var eventMonitor: ActiveEventMonitor? + private var contactsTask: Task<(), Never>? + + /// How long a sequence may wait on the titlebar lookup before the Dock gets it + private static let titlebarDeadline: Duration = .milliseconds(40) + private static let ownProcessID = Int64(getpid()) + + /// Only touched on the event tap thread + private var sequence = Sequence.passing + private var sequenceGeneration = 0 + + init( + gestureMonitor: SubsurfaceMonitor, + isCursorInTitlebar: @escaping @MainActor (_ touchID: Int) -> Bool + ) { + self.gestureMonitor = gestureMonitor + self.isCursorInTitlebar = isCursorInTitlebar + } + + /// Starts filtering, or updates the claimed gestures if already running. + func start(claiming claims: [Int: Claims]) { + state.withLock { + $0.claims = claims + $0.isRunning = true + } + + if contactsTask == nil { + // Detached so contact frames are counted off the main actor + contactsTask = Task.detached(priority: .userInitiated) { [weak self, gestureMonitor] in + for await (device, contacts) in gestureMonitor.contacts() { + guard !Task.isCancelled, let self else { break } + guard let deviceID = device.deviceID else { continue } + updateFingerCount( + SubsurfaceContactFilter.activeTouches(from: SubsurfaceContactFilter.removePalms(from: contacts)).count, + deviceID: deviceID + ) + } + } + } + + guard eventMonitor == nil else { return } + + log.info("Starting system gesture filter") + + if !startEventMonitor() { + log.warn("Failed to start system gesture filter") + } + } + + func stop() { + contactsTask?.cancel() + contactsTask = nil + state.withLock { state in + state = State(touchID: state.touchID, sequenceGeneration: state.sequenceGeneration + 1) + } + + guard let eventMonitor else { return } + eventMonitor.stop() + self.eventMonitor = nil + + log.info("Stopped system gesture filter") + } + + var currentTouchID: Int { + state.withLock(\.touchID) + } + + func canClaimCurrentTouch(fingerCount: Int) -> Bool { + state.withLock { state in + !state.isRunning || (!state.isMissionControlShowing && state.owners[fingerCount] != .dock) + } + } + + /// Returns false if the Dock is already acting on the stroke + func claimCurrentTouch(fingerCount: Int) -> Bool { + state.withLock { state in + guard state.isRunning else { return true } + // The Dock keeps its gestures while Mission Control is showing, so they can dismiss it + guard !state.isMissionControlShowing, state.owners[fingerCount] != .dock else { return false } + state.owners[fingerCount] = .loop + return true + } + } + + func releaseCurrentTouch(fingerCount: Int) { + state.withLock { state in + guard state.isRunning else { return } + state.owners[fingerCount] = .dock + } + } + + // MARK: Lifecycle + + @discardableResult + private func startEventMonitor() -> Bool { + resetTouches() + + let newMonitor = ActiveEventMonitor( + "system_gesture_filter", + events: [.dockControl] + ) { [weak self] proxy, event in + guard let self else { return Unmanaged.passUnretained(event) } + return handle(event, proxy: proxy) + } + + newMonitor.start() + + guard newMonitor.isEnabled else { + newMonitor.stop() + return false + } + + eventMonitor = newMonitor + return true + } + + private func resetTouches() { + state.withLock { state in + state.owners.removeAll() + state.hasLookedUpTouch = false + state.titlebarLookup = .pending + state.isMissionControlShowing = false + state.sequenceGeneration += 1 + if state.isTouching { + state.touchID += 1 + } + } + } + + // MARK: Touches + + private func updateFingerCount(_ count: Int, deviceID: UInt64) { + let lookupTouchID: Int? = state.withLock { state in + guard state.isRunning else { return nil } + + // Devices report zero contacts when they stop or are removed + if count > 0 { + state.fingerCounts[deviceID] = count + } else { + state.fingerCounts.removeValue(forKey: deviceID) + } + + let isTouching = state.fingerCount > 0 + if isTouching != state.isTouching { + state.isTouching = isTouching + state.hasLookedUpTouch = false + state.titlebarLookup = .pending + state.isMissionControlShowing = false + state.owners.removeAll() + + if isTouching { + state.touchID += 1 + } + } + + guard isTouching, + !state.hasLookedUpTouch, + let lookupFingerCount = state.lookupFingerCount, + state.fingerCount >= lookupFingerCount + else { + return nil + } + + state.hasLookedUpTouch = true + return state.touchID + } + + guard let lookupTouchID else { return } + + Task { @MainActor [isCursorInTitlebar, state] in + let isInTitlebar = isCursorInTitlebar(lookupTouchID) + let isMissionControlShowing = MissionControl.isShowing + state.withLock { state in + guard state.touchID == lookupTouchID else { return } + state.titlebarLookup = isInTitlebar ? .inside : .outside + state.isMissionControlShowing = isMissionControlShowing + } + } + } + + // MARK: Events + + private func handle(_ event: CGEvent, proxy: CGEventTapProxy) -> Unmanaged? { + let forward = Unmanaged.passUnretained(event) + + guard event.getIntegerValueField(.gestureHIDType) == CGEventField.GestureHIDType.dockSwipe.rawValue else { + return forward + } + + // Dock swipes posted by other apps are theirs to manage + let sourceProcessID = event.getIntegerValueField(.eventSourceUnixProcessID) + guard sourceProcessID == 0 || sourceProcessID == Self.ownProcessID else { + return forward + } + + let generation = state.withLock(\.sequenceGeneration) + if generation != sequenceGeneration { + sequenceGeneration = generation + sequence = .passing + } + + let phase = CGEventField.GesturePhase(rawValue: event.getIntegerValueField(.gesturePhase)) + + if phase == .began { + if case let .holding(hold) = sequence { + log.debug("Dock swipe (\(hold.fingerCount) fingers, \(hold.motion)): dropped \(hold.events.count) held events, a new sequence began before it ended") + } + return beginSequence(event) ? forward : nil + } + + let isEnd = phase == .ended || phase == .cancelled + + switch sequence { + case .passing: + return forward + case .dropping: + if isEnd { sequence = .passing } + return nil + case var .holding(hold): + if isEnd { + sequence = .passing + log.debug("Dock swipe (\(hold.fingerCount) fingers, \(hold.motion)): dropped, ended while held (\(Self.elapsed(since: hold.start)))") + return nil + } + + let progress = event.getDoubleValueField(.dockSwipeProgress) + if hold.direction == nil, progress != 0 { + hold.direction = Self.gesture(motion: hold.motion, progress: progress) + } + + let isPastDeadline = ContinuousClock.now - hold.start >= Self.titlebarDeadline + switch settle(hold, isPastDeadline: isPastDeadline) { + case .awaitingTitlebar, .awaitingDirection: + hold.events.append(event.copy() ?? event) + sequence = .holding(hold) + return nil + case let .loop(reason): + sequence = .dropping + log.debug("Dock swipe (\(hold.fingerCount) fingers, \(hold.motion)): Loop after holding \(hold.events.count) events for \(Self.elapsed(since: hold.start)), \(reason)") + return nil + case let .dock(reason): + sequence = .passing + // Posted from this tap's position, so they reach the Dock before the current event + for heldEvent in hold.events { + heldEvent.tapPostEvent(proxy) + } + log.debug("Dock swipe (\(hold.fingerCount) fingers, \(hold.motion)): Dock after holding \(hold.events.count) events for \(Self.elapsed(since: hold.start)), \(reason)") + return forward + } + } + } + + /// Decides a new sequence at `began`, returning whether to forward it. + private func beginSequence(_ event: CGEvent) -> Bool { + let (isRunning, fingerCount, touchID, claims) = state.withLock { state in + (state.isRunning, state.fingerCount, state.isTouching ? state.touchID : nil, state.claims[state.fingerCount]) + } + + guard isRunning, + let motion = CGEventField.DockSwipeMotion(rawValue: event.getIntegerValueField(.dockSwipeMotion)) + else { + sequence = .passing + return true + } + + if state.withLock(\.isMissionControlShowing) { + sequence = .passing + log.debug("Dock swipe (\(fingerCount) fingers, \(motion)): Dock, Mission Control is showing") + return true + } + + let progress = event.getDoubleValueField(.dockSwipeProgress) + let hold = Hold( + events: [event.copy() ?? event], + fingerCount: fingerCount, + touchID: touchID, + motion: motion, + claims: claims ?? Claims(), + start: .now, + direction: progress == 0 ? nil : Self.gesture(motion: motion, progress: progress) + ) + + switch settle(hold, isPastDeadline: false) { + case let .loop(reason): + sequence = .dropping + log.debug("Dock swipe (\(fingerCount) fingers, \(motion)): Loop, \(reason)") + return false + case let .dock(reason): + sequence = .passing + log.debug("Dock swipe (\(fingerCount) fingers, \(motion)): Dock, \(reason)") + return true + case .awaitingTitlebar: + sequence = .holding(hold) + log.debug("Dock swipe (\(fingerCount) fingers, \(motion)): holding for the titlebar lookup") + return false + case .awaitingDirection: + sequence = .holding(hold) + log.debug("Dock swipe (\(fingerCount) fingers, \(motion)): holding for the stroke's direction") + return false + } + } + + /// An owner already recorded for the touch wins + private func settle(_ hold: Hold, isPastDeadline: Bool) -> Resolution { + state.withLock { state in + switch state.owners[hold.fingerCount] { + case .loop: + return .loop(reason: "Loop owns the touch") + case .dock: + return .dock(reason: "the Dock owns the touch") + case nil: + let titlebar = state.touchID == hold.touchID ? state.titlebarLookup : .pending + let resolution = Self.resolve(hold, titlebar: titlebar, isPastDeadline: isPastDeadline) + switch resolution { + case .loop: state.owners[hold.fingerCount] = .loop + case .dock: state.owners[hold.fingerCount] = .dock + case .awaitingTitlebar, .awaitingDirection: break + } + return resolution + } + } + } + + private static func resolve(_ hold: Hold, titlebar: TitlebarLookup, isPastDeadline: Bool) -> Resolution { + let directions = hold.direction.map { [$0] } ?? gestures(motion: hold.motion, progress: 0) + + var owners: Set = [] + var dependsOnTitlebar = false + var missedDeadline = false + var isAwaitingTitlebar = false + + for direction in directions { + if hold.claims.anywhere.contains(direction) { + owners.insert(.loop) + } else if hold.claims.titlebarOnly.contains(direction) { + dependsOnTitlebar = true + switch titlebar { + case .inside: + owners.insert(.loop) + case .outside: + owners.insert(.dock) + case .pending: + if isPastDeadline { + missedDeadline = true + owners.insert(.dock) + } else { + isAwaitingTitlebar = true + } + } + } else { + owners.insert(.dock) + } + } + + // Only one direction of the axis is claimed + if owners.count > 1 { + return .awaitingDirection + } + if isAwaitingTitlebar { + return .awaitingTitlebar + } + + let directionDescription = hold.direction.map { "\($0) " } ?? "" + switch owners.first { + case .loop: + return .loop(reason: dependsOnTitlebar ? "\(directionDescription)claimed and started in a titlebar" : "\(directionDescription)claimed anywhere") + case .dock, nil: + if missedDeadline { + return .dock(reason: "titlebar lookup missed its \(titlebarDeadline) deadline") + } + return .dock(reason: dependsOnTitlebar ? "\(directionDescription)claimed but started outside a titlebar" : "\(directionDescription)not claimed") + } + } + + private static func elapsed(since start: ContinuousClock.Instant) -> Duration { + ContinuousClock.now - start + } + + private static func gesture(motion: CGEventField.DockSwipeMotion, progress: Double) -> DockGesture? { + gestures(motion: motion, progress: progress).first + } + + /// Both directions of the axis when `progress` is zero + private static func gestures(motion: CGEventField.DockSwipeMotion, progress: Double) -> [DockGesture] { + let (negative, positive): (DockGesture, DockGesture) = switch motion { + case .horizontal: (.swipeRight, .swipeLeft) + case .vertical: (.swipeUp, .swipeDown) + case .pinch: (.pinch, .spread) + } + + if progress < 0 { return [negative] } + if progress > 0 { return [positive] } + return [negative, positive] + } +} + +// MARK: - Claims + +extension SystemGestureFilter { + /// Maps each finger count to the Dock gestures that Loop's gestures would conflict with. + static func claims(for gestures: [GestureBinding]) -> [Int: Claims] { + GestureBinding.activeGestures(in: gestures) + .reduce(into: [:]) { result, gesture in + let dockGestures = dockGestures(for: gesture.kind) + switch gesture.effectiveActivationZone { + case .anywhere: + result[gesture.fingerCount, default: Claims()].anywhere.formUnion(dockGestures) + case .titlebar: + result[gesture.fingerCount, default: Claims()].titlebarOnly.formUnion(dockGestures) + } + } + } + + private static func dockGestures(for kind: GestureBinding.Kind) -> Set { + switch kind { + case .radialMenu: Set(DockGesture.allCases) + case .swipeLeft: [.swipeLeft] + case .swipeRight: [.swipeRight] + case .swipeUp: [.swipeUp] + case .swipeDown: [.swipeDown] + case .magnifyOut: [.pinch] + case .magnifyIn: [.spread] + } + } +} diff --git a/Loop/Core/Observers/Helpers/KeybindResolver.swift b/Loop/Core/Observers/Helpers/KeybindResolver.swift index 8608591d8..7c4ac885e 100644 --- a/Loop/Core/Observers/Helpers/KeybindResolver.swift +++ b/Loop/Core/Observers/Helpers/KeybindResolver.swift @@ -156,7 +156,7 @@ enum KeybindResolver { isRepeat: Bool ) -> Decision { let shouldActivate = !isRepeat || ( - action.direction != .cycle && action.canRepeat + action.direction != .cycle && action.allowsRapidRepeat ) return .init( diff --git a/Loop/Core/Observers/MouseInteractionObserver.swift b/Loop/Core/Observers/MouseInteractionObserver.swift index 914c90a74..185cfda68 100644 --- a/Loop/Core/Observers/MouseInteractionObserver.swift +++ b/Loop/Core/Observers/MouseInteractionObserver.swift @@ -17,7 +17,7 @@ final class MouseInteractionObserver { // Parameters private let windowActionCache: WindowActionCache private let changeAction: (WindowAction) -> () - private let selectNextCycleItem: () -> () + private let advanceSelectedAction: (WindowAction?) -> () private let canSelectNextCycleitem: () -> Bool private let checkIfLoopOpen: () -> Bool @@ -27,6 +27,7 @@ final class MouseInteractionObserver { // State-keeping for previous calculations private var previousAngleToMouse: Angle = .zero private var previousDistanceToMouse: CGFloat = .zero + private var pendingRepeatableAction: WindowAction? private var screenBounds: CGRect? private var shouldAccountForAbsoluteMousePosition: Bool = false @@ -42,13 +43,13 @@ final class MouseInteractionObserver { init( windowActionCache: WindowActionCache, changeAction: @escaping (WindowAction) -> (), - selectNextCycleItem: @escaping () -> (), + advanceSelectedAction: @escaping (WindowAction?) -> (), canSelectNextCycleitem: @escaping () -> Bool, checkIfLoopOpen: @escaping () -> Bool ) { self.windowActionCache = windowActionCache self.changeAction = changeAction - self.selectNextCycleItem = selectNextCycleItem + self.advanceSelectedAction = advanceSelectedAction self.canSelectNextCycleitem = canSelectNextCycleitem self.checkIfLoopOpen = checkIfLoopOpen } @@ -104,6 +105,7 @@ final class MouseInteractionObserver { previousAngleToMouse = .zero previousDistanceToMouse = .zero + pendingRepeatableAction = nil screenBounds = nil shouldAccountForAbsoluteMousePosition = false @@ -151,17 +153,23 @@ final class MouseInteractionObserver { newAction = radialMenuActions.last } - switch newAction?.type { + let resolvedAction: WindowAction? = switch newAction?.type { case let .custom(windowAction): - changeAction(windowAction) + windowAction case let .keybindReference(id): - if let action = windowActionCache.actionsByIdentifier[id] { - changeAction(action) - } else { - changeAction(Self.failedToResolveKeybindAction) - } + windowActionCache.actionsByIdentifier[id] ?? Self.failedToResolveKeybindAction case nil: - changeAction(.init(.noSelection)) + .init(.noSelection) + } + + if let resolvedAction, resolvedAction.allowsRapidRepeat { + if pendingRepeatableAction?.id != resolvedAction.id { + changeAction(resolvedAction) + } + pendingRepeatableAction = resolvedAction + } else { + pendingRepeatableAction = nil + changeAction(resolvedAction ?? .init(.noSelection)) } } } @@ -221,11 +229,23 @@ final class MouseInteractionObserver { return .forward } - guard checkIfLoopOpen(), canSelectNextCycleitem() else { + guard checkIfLoopOpen() else { + return .forward + } + + if let pendingRepeatableAction { + advanceSelectedAction(pendingRepeatableAction) + self.pendingRepeatableAction = nil + return .ignore + } + + pendingRepeatableAction = nil + + guard canSelectNextCycleitem() else { return .forward } - selectNextCycleItem() + advanceSelectedAction(nil) return .ignore } diff --git a/Loop/Core/URLCommandHandler.swift b/Loop/Core/URLCommandHandler.swift index 81fb00c5e..2898e1bde 100644 --- a/Loop/Core/URLCommandHandler.swift +++ b/Loop/Core/URLCommandHandler.swift @@ -487,7 +487,7 @@ final class URLCommandHandler { if let window = WindowUtility.userDefinedTargetWindow(), let screen = NSScreen.main { Task { - _ = try await WindowActionEngine.shared.apply( + _ = try? await WindowActionEngine.shared.apply( keybind, window: window, screen: screen @@ -661,7 +661,7 @@ final class URLCommandHandler { try? await Task.sleep(for: .seconds(0.1)) writeToOutput("[URLHandler] Executing resize operation") - _ = try await WindowActionEngine.shared.apply( + _ = try? await WindowActionEngine.shared.apply( action, window: window, screen: screen @@ -678,7 +678,7 @@ final class URLCommandHandler { ScreenUtility.previousScreen(from: currentScreen) { writeToOutput("[URLHandler] Moving window to screen: \(targetScreen.localizedName)") Task { - _ = try await WindowActionEngine.shared.apply( + _ = try? await WindowActionEngine.shared.apply( .init(direction), window: window, screen: targetScreen diff --git a/Loop/Extensions/CGEventField+Extensions.swift b/Loop/Extensions/CGEventField+Extensions.swift new file mode 100644 index 000000000..15ae9942f --- /dev/null +++ b/Loop/Extensions/CGEventField+Extensions.swift @@ -0,0 +1,38 @@ +// +// CGEventField+Extensions.swift +// Loop +// +// Created by Kai Azim on 2026-09-24. +// + +import CoreGraphics + +/// Private fields of gesture events, such as the Dock's DockSwipe +extension CGEventField { + /// `IOHIDEventType` + static let gestureHIDType = CGEventField(rawValue: 110)! + + static let dockSwipeMotion = CGEventField(rawValue: 123)! + static let dockSwipeProgress = CGEventField(rawValue: 124)! + static let dockSwipeVelocity = CGEventField(rawValue: 129)! + + static let gesturePhase = CGEventField(rawValue: 132)! + + enum GestureHIDType: Int64 { + /// `kIOHIDEventTypeDockSwipe` + case dockSwipe = 23 + } + + enum DockSwipeMotion: Int64 { + case horizontal = 1 + case vertical = 2 + case pinch = 3 + } + + enum GesturePhase: Int64 { + case began = 1 + case changed = 2 + case ended = 4 + case cancelled = 8 + } +} diff --git a/Loop/Extensions/CGEventType+Extensions.swift b/Loop/Extensions/CGEventType+Extensions.swift new file mode 100644 index 000000000..ec25e8fd4 --- /dev/null +++ b/Loop/Extensions/CGEventType+Extensions.swift @@ -0,0 +1,13 @@ +// +// CGEventType+Extensions.swift +// Loop +// +// Created by Kai Azim on 2026-09-24. +// + +import CoreGraphics + +extension CGEventType { + /// `kCGSEventDockControl` carries Dock gestures such as DockSwipe + static let dockControl = CGEventType(rawValue: 30)! +} diff --git a/Loop/Extensions/Defaults+Extensions.swift b/Loop/Extensions/Defaults+Extensions.swift index 49125c861..e371fe252 100644 --- a/Loop/Extensions/Defaults+Extensions.swift +++ b/Loop/Extensions/Defaults+Extensions.swift @@ -7,120 +7,150 @@ // NOTE: While iCloud is enabled, its service is currently disabled to make GitHub actions work. import Defaults +import Scribe import SwiftUI // MARK: - UI-configurable Settings extension Defaults.Keys { // Icon - static let currentIcon = Key("currentIcon", default: "AppIcon-Classic", iCloud: true) - static let timesLooped = Key("timesLooped", default: 0, iCloud: true) - static let showDockIcon = Key("showDockIcon", default: false, iCloud: true) - static let notificationWhenIconUnlocked = Key("notificationWhenIconUnlocked", default: true, iCloud: true) + static let currentIcon = Key("currentIcon", default: "AppIcon-Classic") + static let timesLooped = Key("timesLooped", default: 0) + static let showDockIcon = Key("showDockIcon", default: false) + static let notificationWhenIconUnlocked = Key("notificationWhenIconUnlocked", default: true) // Accent Color - static let accentColorMode: Key = Key("accentColorMode", default: .system, iCloud: true) - static let customAccentColor = Key("customAccentColor", default: .teal, iCloud: true) - static let useGradient = Key("useGradient", default: false, iCloud: true) - static let gradientColor = Key("gradientColor", default: .blue, iCloud: true) + static let accentColorMode: Key = Key("accentColorMode", default: .system) + static let customAccentColor = Key("customAccentColor", default: .teal) + static let useGradient = Key("useGradient", default: false) + static let gradientColor = Key("gradientColor", default: .blue) // Radial Menu - static let radialMenuVisibility = Key("radialMenuVisibility", default: true, iCloud: true) - static let radialMenuCornerRadius = Key("radialMenuCornerRadius", default: 50, iCloud: true) - static let radialMenuThickness = Key("radialMenuThickness", default: 22, iCloud: true) - static let radialMenuActions = Key<[RadialMenuAction]>("radialMenuActions", default: RadialMenuAction.defaultRadialMenuActions, iCloud: true) + static let radialMenuVisibility = Key("radialMenuVisibility", default: true) + static let radialMenuCornerRadius = Key("radialMenuCornerRadius", default: 50) + static let radialMenuThickness = Key("radialMenuThickness", default: 22) + static let radialMenuActions = Key<[RadialMenuAction]>("radialMenuActions", default: RadialMenuAction.defaultRadialMenuActions) // Preview - static let previewVisibility = Key("previewVisibility", default: true, iCloud: true) - static let previewPadding = Key("previewPadding", default: 10, iCloud: true) - static let previewCornerRadius = Key("previewCornerRadius", default: 10, iCloud: true) - static let previewBorderThickness = Key("previewBorderThickness", default: 4, iCloud: true) - static let previewUseWindowCornerRadius = Key("previewUseWindowCornerRadius", default: true, iCloud: true) - static let previewBackgroundEnableBlur = Key("previewBackgroundEnableBlur", default: true, iCloud: true) - static let previewBackgroundAccentOpacity = Key("previewBackgroundAccentOpacity", default: 0.1, iCloud: true) + static let previewVisibility = Key("previewVisibility", default: true) + static let previewPadding = Key("previewPadding", default: 10) + static let previewCornerRadius = Key("previewCornerRadius", default: 10) + static let previewBorderThickness = Key("previewBorderThickness", default: 4) + static let previewUseWindowCornerRadius = Key("previewUseWindowCornerRadius", default: true) + static let previewBackgroundStyle = Key("previewBackgroundStyle", default: .system) + static let previewBackgroundEnableBlur = Key("previewBackgroundEnableBlur", default: false) + static let previewBackgroundAccentOpacity = Key("previewBackgroundAccentOpacity", default: 0.1) // Behavior - static let launchAtLogin = Key("launchAtLogin", default: false, iCloud: true) - static let startHidden = Key("startHidden", default: false, iCloud: true) - static let hideMenuBarIcon = Key("hideMenuBarIcon", default: false, iCloud: false) - static let animationConfiguration = Key("animationConfiguration", default: .snappy, iCloud: true) - static let windowSnapping = Key("windowSnapping", default: true, iCloud: true) - static let suppressMissionControlOnTopDrag = Key("suppressMissionControlOnTopDrag", default: true, iCloud: true) - static let restoreWindowFrameOnDrag = Key("restoreWindowFrameOnDrag", default: false, iCloud: true) - static let enablePadding = Key("enablePadding", default: false, iCloud: true) - static let padding = Key("padding", default: .zero, iCloud: true) - static let useScreenWithCursor = Key("useScreenWithCursor", default: true, iCloud: true) - static let moveCursorWithWindow = Key("moveCursorWithWindow", default: true, iCloud: true) - static let resizeWindowUnderCursor = Key("resizeWindowUnderCursor", default: false, iCloud: true) - static let focusWindowOnResize = Key("focusWindowOnResize", default: true, iCloud: true) - static let respectStageManager = Key("respectStageManager", default: true, iCloud: true) - static let stageStripSize = Key("stageStripSize", default: 150, iCloud: true) - static let animateStashedWindows = Key("animateStashedWindows", default: true, iCloud: true) - static let stashedWindowVisiblePadding = Key("stashedWindowVisiblePadding", default: 20, iCloud: true) - static let shiftFocusWhenStashed = Key("shiftFocusWhenStashed", default: true, iCloud: true) - static let cycleModeRestartEnabled = Key("cycleModeRestartEnabled", default: false, iCloud: true) + static let launchAtLogin = Key("launchAtLogin", default: false) + static let animationConfiguration = Key("animationConfiguration", default: .snappy) + static let windowSnapping = Key("windowSnapping", default: true) + static let suppressMissionControlOnTopDrag = Key("suppressMissionControlOnTopDrag", default: true) + static let restoreWindowFrameOnDrag = Key("restoreWindowFrameOnDrag", default: false) + static let enablePadding = Key("enablePadding", default: false) + static let padding = Key("padding", default: .zero) + static let useScreenWithCursor = Key("useScreenWithCursor", default: true) + static let resizeWindowUnderCursor = Key("resizeWindowUnderCursor", default: false) + static let focusWindowOnResize = Key("focusWindowOnResize", default: true) + static let respectStageManager = Key("respectStageManager", default: true) + static let stageStripSize = Key("stageStripSize", default: 150) + static let animateStashedWindows = Key("animateStashedWindows", default: true) + static let stashedWindowVisiblePadding = Key("stashedWindowVisiblePadding", default: 20) + static let shiftFocusWhenStashed = Key("shiftFocusWhenStashed", default: true) + static let cycleModeRestartEnabled = Key("cycleModeRestartEnabled", default: false) // Keybinds - static let triggerKey = Key>("trigger", default: [.kVK_Function], iCloud: true) - static let sideDependentTriggerKey = Key("sideDependentTriggerKey", default: true, iCloud: true) - static let triggerDelay = Key("triggerDelay", default: 0, iCloud: true) - static let doubleClickToTrigger = Key("doubleClickToTrigger", default: false, iCloud: true) - static let middleClickTriggersLoop = Key("middleClickTriggersLoop", default: false, iCloud: true) - static let enableTriggerDelayOnMiddleClick = Key("enableTriggerDelayOnMiddleClick", default: false, iCloud: true) - static let cycleBackwardsOnShiftPressed = Key("cycleBackwardsOnShiftPressed", default: true, iCloud: true) - static let keybinds = Key<[WindowAction]>("keybinds", default: WindowAction.defaultKeybinds, iCloud: true) + static let triggerKey = Key>("trigger", default: [.kVK_Function]) + static let sideDependentTriggerKey = Key("sideDependentTriggerKey", default: true) + static let triggerDelay = Key("triggerDelay", default: 0) + static let doubleClickToTrigger = Key("doubleClickToTrigger", default: false) + static let middleClickTriggersLoop = Key("middleClickTriggersLoop", default: false) + static let enableTriggerDelayOnMiddleClick = Key("enableTriggerDelayOnMiddleClick", default: false) + static let cycleBackwardsOnShiftPressed = Key("cycleBackwardsOnShiftPressed", default: true) + static let keybinds = Key<[WindowAction]>("keybinds", default: WindowAction.defaultKeybinds) + + // Gestures + static let enableGestures = Key("enableGestures", default: false) + static let gestures = Key<[GestureBinding]>("gestures", default: GestureBinding.defaults) // Advanced - static let useSystemWindowManagerWhenAvailable = Key("useSystemWindowManagerWhenAvailable", default: false, iCloud: true) - static let animateWindowResizes = Key("animateWindowResizes", default: false, iCloud: true) - static let disableCursorInteraction = Key("disableCursorInteraction", default: false, iCloud: true) - static let ignoreFullscreen = Key("ignoreFullscreen", default: false, iCloud: true) - static let hideOnNoSelection = Key("hideOnNoSelection", default: false, iCloud: true) - static let hapticFeedback = Defaults.Key("hapticFeedback", default: true, iCloud: true) - static let enableRadialMenuCustomization = Defaults.Key("enableRadialMenuCustomization", default: true, iCloud: true) - static let sizeIncrement = Key("sizeIncrement", default: 20, iCloud: true) + static let useSystemWindowManagerWhenAvailable = Key("useSystemWindowManagerWhenAvailable", default: false) + static let animateWindowResizes = Key("animateWindowResizes", default: false) + static let disableCursorInteraction = Key("disableCursorInteraction", default: false) + static let ignoreFullscreen = Key("ignoreFullscreen", default: false) + static let hideOnNoSelectionForKeybinds = Key("hideOnNoSelectionForKeybinds", default: false) + static let hapticFeedback = Defaults.Key("hapticFeedback", default: true) + static let enableRadialMenuCustomization = Defaults.Key("enableRadialMenuCustomization", default: true) + static let sizeIncrement = Key("sizeIncrement", default: 20) + static let screenOrder = Key("screenOrder", default: .zShaped) /// Excluded apps - static let excludedApps = Key<[URL]>("excludedApps", default: [], iCloud: true) + static let excludedApps = Key<[URL]>("excludedApps", default: []) // About #if RELEASE - static let includeDevelopmentVersions = Key("includeDevelopmentVersions", default: false, iCloud: true) + static let includeDevelopmentVersions = Key("includeDevelopmentVersions", default: false) #else /// Development versions should check for development updates by default. - static let includeDevelopmentVersions = Key("includeDevelopmentVersions", default: true, iCloud: true) + static let includeDevelopmentVersions = Key("includeDevelopmentVersions", default: true) #endif - static let automaticallyUpdate = Key("automaticallyUpdate", default: false, iCloud: true) + static let automaticallyUpdate = Key("automaticallyUpdate", default: false) } // MARK: - Hidden Settings extension Defaults.Keys { + /// Hide the radial menu whenever a trackpad gesture has no selected action. + /// Adjust with `defaults write com.MrKai77.Loop hideOnNoSelectionForGestures -bool false` + /// Reset with `defaults delete com.MrKai77.Loop hideOnNoSelectionForGestures` + static let hideOnNoSelectionForGestures = Key("hideOnNoSelectionForGestures", default: true) + /// Lock radial menu to the center of the screen /// Adjust with `defaults write com.MrKai77.Loop lockRadialMenuToCenter -bool true` /// Reset with `defaults delete com.MrKai77.Loop lockRadialMenuToCenter` - static let lockRadialMenuToCenter = Key("lockRadialMenuToCenter", default: false, iCloud: true) + static let lockRadialMenuToCenter = Key("lockRadialMenuToCenter", default: false) + + /// Don't show the settings window when Loop is opened manually. Loop always starts hidden when launched at login. + /// Adjust with `defaults write com.MrKai77.Loop startHidden -bool true` + /// Reset with `defaults delete com.MrKai77.Loop startHidden` + static let startHidden = Key("startHidden", default: false) + + /// Hide Loop's menu bar icon. Opening Loop again while it's running shows the settings window. + /// Adjust with `defaults write com.MrKai77.Loop hideMenuBarIcon -bool true` + /// Reset with `defaults delete com.MrKai77.Loop hideMenuBarIcon` + static let hideMenuBarIcon = Key("hideMenuBarIcon", default: false, iCloud: false) + + /// Moves the cursor to the center of the window after executing an action. Requires preview window to be enabled. + /// Adjust with `defaults write com.MrKai77.Loop moveCursorWithWindow -bool true` + /// Reset with `defaults delete com.MrKai77.Loop moveCursorWithWindow` + static let moveCursorWithWindow = Key("moveCursorWithWindow", default: true) + + /// How often Loop checks for updates in the background, defined in hours. Values below 0.25 (15 minutes) are clamped. + /// Changes take effect after the next scheduled check, or on relaunch. + /// Adjust with `defaults write com.MrKai77.Loop updateCheckInterval -float x` + /// Reset with `defaults delete com.MrKai77.Loop updateCheckInterval` + static let updateCheckInterval = Key("updateCheckInterval", default: 6) /// Minimum screen size, defined in inches on the diagonal, for which padding will be applied on windows. /// Adjust with `defaults write com.MrKai77.Loop paddingMinimumScreenSize -float x` /// Reset with `defaults delete com.MrKai77.Loop paddingMinimumScreenSize` - static let paddingMinimumScreenSize = Key("paddingMinimumScreenSize", default: 0, iCloud: true) + static let paddingMinimumScreenSize = Key("paddingMinimumScreenSize", default: 0) /// Ignore the notch height when calculating top padding, so the effective /// distance from the screen top matches non-notch displays. /// Adjust with `defaults write com.MrKai77.Loop ignoreNotch -bool true` /// Reset with `defaults delete com.MrKai77.Loop ignoreNotch` - static let ignoreNotch = Key("ignoreNotch", default: false, iCloud: true) + static let ignoreNotch = Key("ignoreNotch", default: false) /// Snap threshold for window snapping, defined in points. /// Adjust with `defaults write com.MrKai77.Loop snapThreshold -float x` /// Reset with `defaults delete com.MrKai77.Loop snapThreshold` - static let snapThreshold = Key("snapThreshold", default: 2, iCloud: true) + static let snapThreshold = Key("snapThreshold", default: 2) /// Whether to ignore low power mode for certain features, such as window animations. /// Adjust with `defaults write com.MrKai77.Loop ignoreLowPowerMode -bool x` /// Reset with `defaults delete com.MrKai77.Loop ignoreLowPowerMode` - static let ignoreLowPowerMode = Key("ignoreLowPowerMode", default: false, iCloud: true) + static let ignoreLowPowerMode = Key("ignoreLowPowerMode", default: false) /// Adjust with `defaults write com.MrKai77.Loop previewStartingPosition [option]` /// Reset with `defaults delete com.MrKai77.Loop previewStartingPosition` @@ -129,18 +159,33 @@ extension Defaults.Keys { /// - `screenCenter`: Center of the screen /// - `radialMenu`: Center of radial menu /// - `actionCenter`: Center of the selected action (e.g. for left half, it will grow from the center of that left half) - static let previewStartingPosition = Key("previewStartingPosition", default: .actionCenter, iCloud: true) + static let previewStartingPosition = Key("previewStartingPosition", default: .actionCenter) /// Disable automatic updates with `defaults write com.MrKai77.Loop updatesEnabled -bool false` /// Reset with `defaults delete com.MrKai77.Loop updatesEnabled` - static let updatesEnabled = Key("updatesEnabled", default: true, iCloud: true) + static let updatesEnabled = Key("updatesEnabled", default: true) /// Trigger key timeout, defined in seconds. Automatically closes Loop if no action is taken within the specified time. /// When set to 0 (default: disabled), the feature is disabled and Loop stays open until manually closed. /// Adjust with `defaults write com.MrKai77.Loop triggerKeyTimeout -float x` /// Reset with `defaults delete com.MrKai77.Loop triggerKeyTimeout` - static let triggerKeyTimeout = Key("triggerKeyTimeout", default: 0, iCloud: true) + static let triggerKeyTimeout = Key("triggerKeyTimeout", default: 0) + + /// Height of the titlebar activation zone for gestures, defined in points. + /// Gestures with the `.titlebar` activation zone will only trigger when the cursor is within this distance from the top of a window. + /// Adjust with `defaults write com.MrKai77.Loop gestureTitlebarHeight -float x` + /// Reset with `defaults delete com.MrKai77.Loop gestureTitlebarHeight` + static let gestureTitlebarHeight = Key("gestureTitlebarHeight", default: 50) + + /// Whether to sync all Loop settings to iCloud. + /// Adjust with `defaults write com.MrKai77.Loop enableiCloudSync -bool false` + /// Reset with `defaults delete com.MrKai77.Loop enableiCloudSync` + static let enableiCloudSync = Key("enableiCloudSync", default: true) +} +// MARK: - Non-user-intended Settings + +extension Defaults.Keys { // Migrator static let lastMigratorURL = Key("lastMigratorURL", default: nil) @@ -156,9 +201,98 @@ extension Defaults.Keys { // DataPatcher - static let patchesApplied = Key("patchesApplied", default: [], iCloud: true) + static let patchesApplied = Key("patchesApplied", default: []) // Settings static let showSettingsInspector = Key("showSettingsInspector", default: true) } + +// MARK: - iCloud Sync (not really an extension per se but feel like this is an approriate location) + +@Loggable(style: .static) +enum DefaultsiCloudSyncRegistrar { + static func register() { + let enabled = Defaults[.enableiCloudSync] + updateiCloudSync(enabled: enabled) + log.info("iCloud sync \(enabled ? "enabled" : "disabled")") + + Task { @MainActor in + for await enabled in Defaults.updates(.enableiCloudSync, initial: false) { + updateiCloudSync(enabled: enabled) + log.info("iCloud sync updated: \(enabled ? "enabled" : "disabled")") + } + } + } + + private static func updateiCloudSync(enabled: Bool) { + guard enabled else { + Defaults.iCloud.removeAll() + return + } + + Defaults.iCloud.add(.currentIcon) + Defaults.iCloud.add(.timesLooped) + Defaults.iCloud.add(.showDockIcon) + Defaults.iCloud.add(.notificationWhenIconUnlocked) + + Defaults.iCloud.add(.accentColorMode) + Defaults.iCloud.add(.customAccentColor) + Defaults.iCloud.add(.useGradient) + Defaults.iCloud.add(.gradientColor) + + Defaults.iCloud.add(.radialMenuVisibility) + Defaults.iCloud.add(.radialMenuCornerRadius) + Defaults.iCloud.add(.radialMenuThickness) + Defaults.iCloud.add(.radialMenuActions) + + Defaults.iCloud.add(.previewVisibility) + Defaults.iCloud.add(.previewPadding) + Defaults.iCloud.add(.previewCornerRadius) + Defaults.iCloud.add(.previewBorderThickness) + Defaults.iCloud.add(.previewUseWindowCornerRadius) + Defaults.iCloud.add(.previewBackgroundStyle) + Defaults.iCloud.add(.previewBackgroundEnableBlur) + Defaults.iCloud.add(.previewBackgroundAccentOpacity) + + Defaults.iCloud.add(.animationConfiguration) + Defaults.iCloud.add(.windowSnapping) + Defaults.iCloud.add(.suppressMissionControlOnTopDrag) + Defaults.iCloud.add(.restoreWindowFrameOnDrag) + Defaults.iCloud.add(.enablePadding) + Defaults.iCloud.add(.padding) + Defaults.iCloud.add(.useScreenWithCursor) + Defaults.iCloud.add(.resizeWindowUnderCursor) + Defaults.iCloud.add(.focusWindowOnResize) + Defaults.iCloud.add(.respectStageManager) + Defaults.iCloud.add(.stageStripSize) + Defaults.iCloud.add(.animateStashedWindows) + Defaults.iCloud.add(.stashedWindowVisiblePadding) + Defaults.iCloud.add(.shiftFocusWhenStashed) + Defaults.iCloud.add(.cycleModeRestartEnabled) + + Defaults.iCloud.add(.triggerKey) + Defaults.iCloud.add(.sideDependentTriggerKey) + Defaults.iCloud.add(.triggerDelay) + Defaults.iCloud.add(.doubleClickToTrigger) + Defaults.iCloud.add(.middleClickTriggersLoop) + Defaults.iCloud.add(.enableTriggerDelayOnMiddleClick) + Defaults.iCloud.add(.cycleBackwardsOnShiftPressed) + Defaults.iCloud.add(.keybinds) + + Defaults.iCloud.add(.enableGestures) + Defaults.iCloud.add(.gestures) + + Defaults.iCloud.add(.useSystemWindowManagerWhenAvailable) + Defaults.iCloud.add(.animateWindowResizes) + Defaults.iCloud.add(.disableCursorInteraction) + Defaults.iCloud.add(.ignoreFullscreen) + Defaults.iCloud.add(.hideOnNoSelectionForKeybinds) + Defaults.iCloud.add(.hapticFeedback) + Defaults.iCloud.add(.enableRadialMenuCustomization) + Defaults.iCloud.add(.sizeIncrement) + Defaults.iCloud.add(.screenOrder) + + Defaults.iCloud.add(.excludedApps) + } +} diff --git a/Loop/Extensions/ProcessInfo+Extensions.swift b/Loop/Extensions/ProcessInfo+Extensions.swift new file mode 100644 index 000000000..0bf6ad761 --- /dev/null +++ b/Loop/Extensions/ProcessInfo+Extensions.swift @@ -0,0 +1,16 @@ +// +// ProcessInfo+Extensions.swift +// Loop +// +// Created by Kai Azim on 2026-09-24. +// + +import Foundation + +extension ProcessInfo { + /// Whether an environment variable is set to `1` or `true`. + func isEnvironmentFlagEnabled(_ name: String) -> Bool { + guard let value = environment[name] else { return false } + return value == "1" || value.lowercased() == "true" + } +} diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index 34e8fab6f..4777ec6bc 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -267,37 +267,37 @@ } } }, - "%@ could not install the update at %@ (%@). Would you like to install this update in your Applications folder instead?" : { + "%@ couldn’t install the update at %@ (%@). Would you like to install this update in your Applications folder instead?" : { "comment" : "Informative text displayed in an alert when the Loop is unable to install an update due to insufficient administrator permissions. The first argument is the name of the main app. The second argument is the path where the update failed to install. The third argument is the error.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, "de" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" + "value" : "%1$@ couldn’t install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, "es" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@ n’a pas pu installer la mise à jour dans %2$@ (%3$@). Voulez-vous plutôt installer cette mise à jour dans votre dossier Applications ?" + "value" : "%1$@ n’a pas pu installer la mise à jour dans %2$@ (%3$@). Voulez-vous plutôt installer cette mise à jour dans votre dossier Applications ?" } }, "it" : { @@ -309,12 +309,12 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@ は %2$@(%3$@)でアップデートをインストールできませんでした。代わりにアプリケーションフォルダにインストールしますか?" + "value" : "%1$@は%2$@にアップデートをインストールできませんでした(%3$@)。代わりにアプリケーションフォルダにインストールしますか?" } }, "ko" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, @@ -326,7 +326,7 @@ }, "pl" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, @@ -338,55 +338,49 @@ }, "ru" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "%1$@ could not install the update at %2$@ (%3$@). Would you like to install this update in your Applications folder instead?" } } } }, - "%@ is not in your Applications folder. Would you like to install the update to your Applications folder instead?" : { + "%@ isn’t in your Applications folder. Would you like to install the update to your Applications folder instead?" : { "comment" : "Informative text in the alert displayed when the app is not in the user's Applications folder.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "%@ is not in your Applications folder. Would you like to install the update to your Applications folder instead?" + "value" : "%@ isn’t in your Applications folder. Would you like to install the update to your Applications folder instead?" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "%@ is not in your Applications folder. Would you like to install the update to your Applications folder instead?" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ is not in your Applications folder. Would you like to install the update to your Applications folder instead?" + "value" : "%@ isn’t in your Applications folder. Would you like to install the update to your Applications folder instead?" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "%@ is not in your Applications folder. Would you like to install the update to your Applications folder instead?" + "value" : "%@ isn’t in your Applications folder. Would you like to install the update to your Applications folder instead?" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "%@ ne se trouve pas dans votre dossier Applications. Voulez-vous installer la mise à jour dans le dossier Applications à la place ?" + "value" : "%@ ne se trouve pas dans votre dossier Applications. Voulez-vous installer la mise à jour dans le dossier Applications à la place ?" } }, "it" : { @@ -398,7 +392,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ はアプリケーションフォルダにありません。代わりにアプリケーションフォルダにアップデートをインストールしますか?" + "value" : "%@はアプリケーションフォルダにありません。代わりにアプリケーションフォルダにアップデートをインストールしますか?" } }, "ko" : { @@ -428,7 +422,7 @@ "ru" : { "stringUnit" : { "state" : "translated", - "value" : "%@ не находится в папке \"Приложения\". Хотите установить обновление в папку \"Приложения\"?" + "value" : "%@ не находится в папке «Приложения». Хотите установить обновление в папку «Приложения»?" } }, "zh-Hans" : { @@ -445,7 +439,7 @@ } } }, - "%@ places windows slightly above the absolute center,\nwhich can be found more ergonomic." : { + "%@ places windows slightly above center,\nwhich many people find more comfortable." : { "localizations" : { "ar" : { "stringUnit" : { @@ -459,12 +453,6 @@ "value" : "%@ platziert Fenster etwas über der absoluten Mitte, was als ergonomischer empfunden werden kann." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ places windows slightly above the absolute center,\nwhich can be found more ergonomic." - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -474,7 +462,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "%@ place les fenêtres légèrement au-dessus du centre absolu, ce qui peut être jugé plus ergonomique." + "value" : "%@ place les fenêtres légèrement au-dessus du centre absolu,\nce qui peut être jugé plus ergonomique." } }, "it" : { @@ -486,7 +474,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ はウィンドウを中央より少し上に配置し、\n使いやすく感じることがあります。" + "value" : "%@はウインドウを中央よりやや上に配置するため、\nより使いやすく感じられる場合があります。" } }, "ko" : { @@ -621,91 +609,180 @@ } } }, - "A single %@ action can only track one window. To stash\nmultiple windows, add additional %@ actions." : { - "comment" : "Information in a popover displaying how a stash action can only keep track of a single window. Both %1$@ and %2$@ are replaced with the language's localization of the \"Stash\" action.", + "%lld-finger %@" : { + "comment" : "Default title describing a gesture. First argument is the finger count, second is the gesture kind name (e.g. '2-finger Pinch' or '3-finger Swipe Right').", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "%1$lld-finger %2$@" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "%1$lld-finger %2$@" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "%1$lld-finger %2$@" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "%1$lld-finger %2$@" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Une action %1$@ ne peut suivre qu’une seule fenêtre. Pour mettre de côté\nplusieurs fenêtres, ajoutez une autre action %2$@." + "value" : "%2$@ avec %1$lld doigts" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Una singola azione %1$@ può tracciare solamente una finestra.\nPer nascondere più finestre, aggiungi altre azioni %2$@." + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@は 1 つのウィンドウのみ追跡できます。複数をスタッシュ\nするには、別の%2$@アクションを追加してください。" + "value" : "%1$lld本指で%2$@" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "단일 %1$@ 액션은 하나의 창만 추적할 수 있습니다. 여러 창을 숨기려면 %2$@ 액션을 추가로 설정하세요." + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Een enkele %1$@-actie kan maar één venster volgen. Om meerdere vensters tijdelijk op te slaan, voeg extra %2$@-acties toe." + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Pojedyncza akcja %1$@ może śledzić tylko jedno okno. Aby użyć opcji Stash na więcej niż jednym oknie, dodaj dodatkowe %2$@ akcje." + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Uma ação %1$@ pode rastrear apenas uma janela. Para ocultar múltiplas janelas, adicione ações %2$@ adicionais." + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Действие %1$@ может следить только за одним окном. Добавьте дополнительные %2$@ действий, чтобы спрятать несколько окон." + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "单个%1$@操作只能应用于单个窗口。要收纳多个窗口,请添加更多%2$@操作。" + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" } }, "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + } + } + }, + "%lld-finger Swipe or Magnify" : { + "comment" : "Default title describing how to activate a radial menu gesture. Argument is the finger count.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "en" : { "stringUnit" : { "state" : "translated", - "value" : "單個%1$@操作只能應用於單個視窗。要收納多個視窗,請添加更多%2$@操作。" + "value" : "%lld-finger Swipe or Magnify" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Balayer ou zoomer avec %lld doigts" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld本指でスワイプ/ピンチ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%lld-finger Swipe or Magnify" } } } @@ -740,7 +817,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Opacité de l’accent" + "value" : "Opacité de la couleur d’accentuation" } }, "it" : { @@ -752,7 +829,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "テーマカラー不透明度" + "value" : "アクセントカラーの不透明度" } }, "ko" : { @@ -800,6 +877,7 @@ } }, "Accessibility access" : { + "comment" : "Name of the privacy pane in macOS 26 and earlier, shown as a permission in settings", "localizations" : { "ar" : { "stringUnit" : { @@ -828,7 +906,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Accès à l'accessibilité" + "value" : "Accès d’accessibilité" } }, "it" : { @@ -840,7 +918,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アクセシビリティアクセス" + "value" : "アクセシビリティのアクセス権" } }, "ko" : { @@ -891,91 +969,92 @@ "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "يرجى منح الوصول لتتمكن من تغيير حجم النوافذ." } }, "de" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Bitte erlaube den Zugriff, um Fenstergrößen ändern zu können." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Please grant access to be able to resize windows." + "value" : "Grant access in System Settings so %@ can resize windows." } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Por favor, concede permiso para que Loop pueda cambiar el tamaño de las ventanas" } }, "fr" : { "stringUnit" : { - "state" : "translated", - "value" : "Veuillez accorder l'accès pour pouvoir redimensionner les fenêtres." + "state" : "needs_review", + "value" : "Veuillez accorder l’accès pour pouvoir redimensionner les fenêtres." } }, "it" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Per favore consenti l'accesso per poter ridimensionare le finestre." } }, "ja" : { "stringUnit" : { - "state" : "translated", - "value" : "ウィンドウのサイズを変更できるようにするには、アクセスを許可してください。" + "state" : "needs_review", + "value" : "ウインドウのサイズを変更できるようにするには、アクセスを許可してください。" } }, "ko" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "창 크기를 조절하려면 접근성 권한을 부여해 주세요" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Geef toegang om het grootte van vensters aan te passen." } }, "pl" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Udziel dostępu, aby móc zmieniać wielkość okien." } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Por favor, conceda acesso para redimensionar janelas." } }, "ru" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Пожалуйста выдайте доступ к изменению размера окон." } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "请授予权限以允许调整窗口大小。" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "請授予權限以允許調整視窗大小。" } } } }, "Accessibility Request: Title" : { + "comment" : "Title of the alert asking for permission, using the name of the privacy pane in macOS 26 and earlier", "localizations" : { "ar" : { "stringUnit" : { @@ -992,7 +1071,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "%@ Needs Accessibility Permissions" + "value" : "%@ Needs Accessibility Permission" } }, "es" : { @@ -1004,7 +1083,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "%@ nécessite des autorisations d'accessibilité" + "value" : "%@ nécessite des autorisations d’accessibilité" } }, "it" : { @@ -1016,7 +1095,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ にはアクセシビリティの許可が必要です" + "value" : "%@にはアクセシビリティのアクセス権が必要です" } }, "ko" : { @@ -1063,358 +1142,358 @@ } } }, - "Actions" : { - "comment" : "Header for radial menu section shown in settings", + "Accessibility Request: Title (macOS 27)" : { + "comment" : "Title of the alert asking for permission, using the name of the privacy pane in macOS 27 and later", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Actions" + "state" : "translated", + "value" : "%@ يحتاج إلى إذن التحكم في الأجهزة والوصول إلى البيانات" } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Actions" + "state" : "translated", + "value" : "%@ braucht Gerätesteuerung und Datenzugriff" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Actions" + "value" : "%@ Needs Device Control and Data Access" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Actions" + "state" : "translated", + "value" : "%@ necesita permisos de Control de dispositivos y acceso a datos" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Actions" + "value" : "%@ nécessite l’autorisation Contrôle de l’appareil et accès aux données" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Azioni" + "value" : "%@ ha bisogno del permesso Controllo del dispositivo e accesso ai dati" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アクション" + "value" : "%@には「デバイスの制御とデータへのアクセス」の許可が必要です" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "액션" + "value" : "%@에 기기 제어 및 데이터 접근 권한이 필요합니다" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Acties" + "value" : "%@ heeft toegang tot Apparaatbeheer en gegevenstoegang nodig" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Akcje" + "value" : "%@ potrzebuje pozwolenia w sekcji Sterowanie urządzeniami i dostęp do danych" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Ações" + "value" : "%@ Precisa de Permissão de Controle do Dispositivo e Acesso a Dados" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Действия" + "value" : "%@ нужно разрешение «Управление устройством и доступ к данным»" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "操作" + "value" : "%@需要设备控制和数据访问权限" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "操作" + "value" : "%@需要裝置控制和資料取用權限" } } } }, - "Add" : { - "comment" : "Used to add items to a list", + "Actions" : { + "comment" : "Header for radial menu section shown in settings", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "إضافة" + "state" : "needs_review", + "value" : "Actions" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Hinzufügen" + "state" : "needs_review", + "value" : "Actions" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Add" + "value" : "Actions" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Añadir" + "state" : "needs_review", + "value" : "Actions" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ajouter" + "value" : "Actions" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Aggiungi" + "value" : "Azioni" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "追加" + "value" : "アクション" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "추가" + "value" : "액션" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Toevoegen" + "value" : "Acties" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Dodaj" + "value" : "Akcje" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Adicionar" + "value" : "Ações" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Добавить" + "value" : "Действия" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "添加" + "value" : "操作" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "添加" + "value" : "操作" } } } }, - "Administrator Authorization Required" : { - "comment" : "Text in the message field of a warning alert displayed when installation to the user's Applications folder fails.", + "Add" : { + "comment" : "Used to add items to a list", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "إضافة" } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "Hinzufügen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Administrator Authorization Required" + "value" : "Add" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "Añadir" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Autorisation de l'administrateur requise" + "value" : "Ajouter" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Richiesta l'autorizzazione dell'amministratore" + "value" : "Aggiungi" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "管理者の認証が必要です" + "value" : "追加" } }, "ko" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "추가" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Administrator-authorisatie verplicht" + "value" : "Toevoegen" } }, "pl" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "Dodaj" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Autorização de Administrador Necessária" + "value" : "Adicionar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Требуются права администратора" + "value" : "Добавить" } }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "添加" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Administrator Authorization Required" + "state" : "translated", + "value" : "添加" } } } }, - "Allow radial menu customization" : { - "comment" : "A toggle that allows users to enable or disable the ability to customize the actions available in the radial menu.", + "Administrator Authorization Required" : { + "comment" : "Text in the message field of a warning alert displayed when installation to the user's Applications folder fails.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Allow radial menu customization" + "value" : "Administrator Authorization Required" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Allow radial menu customization" + "value" : "Administrator Authorization Required" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Allow radial menu customization" + "value" : "Administrator Authorization Required" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Allow radial menu customization" + "value" : "Administrator Authorization Required" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Autoriser la personnalisation du menu radial" + "value" : "Autorisation de l’administrateur requise" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Consenti personalizzazione del menu radiale" + "value" : "Richiesta l'autorizzazione dell'amministratore" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "円形メニューのカスタマイズを許可" + "value" : "管理者の認証が必要です" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "원형 메뉴 사용자화 허용" + "state" : "needs_review", + "value" : "Administrator Authorization Required" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Radiaal menu aanpassen toestaan" + "value" : "Administrator-authorisatie verplicht" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Zezwalaj na dostosowywanie menu kołowego" + "state" : "needs_review", + "value" : "Administrator Authorization Required" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Permitir customização do menu radial" + "value" : "Autorização de Administrador Necessária" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Разрешить изменение радиального меню" + "value" : "Требуются права администратора" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "允许自定义环形菜单" + "state" : "needs_review", + "value" : "Administrator Authorization Required" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "允許自訂環形菜單" + "state" : "needs_review", + "value" : "Administrator Authorization Required" } } } @@ -1508,12 +1587,16 @@ } } }, - "Always start cycles from first item" : { + "Always" : { + "comment" : "Preview visibility option: show the preview when looping and window snapping" + }, + "Always start from the first action" : { + "comment" : "Toggle in the “Cycles” section of the “Keybinds” tab: cycles always start from their first action, rather than continuing where they were left.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Always start cycles from first item" + "value" : "Always start from the first action" } }, "de" : { @@ -1522,16 +1605,10 @@ "value" : "Zyklus immer beim ersten Element starten" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Always start cycles from first item" - } - }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Always start cycles from first item" + "value" : "Always start from the first action" } }, "fr" : { @@ -1549,7 +1626,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "常にサイクルを最初の項目から開始する" + "value" : "常にサイクルを最初の項目から開始" } }, "ko" : { @@ -1561,7 +1638,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Start Cycli altijd vanaf de eerste actie" + "value" : "Start posities altijd vanaf de eerste positie" } }, "pl" : { @@ -1596,24 +1673,102 @@ } } }, - "Animate window resize" : { + "Animate stashing" : { + "comment" : "Toggle that animates windows as they’re stashed and revealed.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "تحريك تغيير حجم النافذة" + "state" : "needs_review", + "value" : "Animate stashing" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Ändern der Fenstergröße animieren" + "value" : "Animiert" } }, - "en" : { + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Animate stashing" + } + }, + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Animate window resize" + "value" : "Animé" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Animazione" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "アニメーション" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "애니메이션" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Geanimeerd" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Animowane" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Animado" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Анимировано" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "展示动画" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "展示動畫" + } + } + } + }, + "Animate window resizing" : { + "comment" : "Toggle that animates windows as Loop resizes them.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "تحريك تغيير حجم النافذة" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ändern der Fenstergröße animieren" } }, "es" : { @@ -1637,7 +1792,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウサイズ変更のアニメーション" + "value" : "ウインドウサイズ変更のアニメーション" } }, "ko" : { @@ -1684,178 +1839,344 @@ } } }, - "Animated" : { + "Animation speed" : { "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Animated" + "state" : "translated", + "value" : "سرعة التحريك" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Animiert" + "value" : "Animationsgeschwindigkeit" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Animated" + "value" : "Animation speed" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Animated" + "state" : "translated", + "value" : "Velocidad de animación" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Animé" + "value" : "Vitesse d’animation" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Animazione" + "value" : "Velocità animazione" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アニメーション" + "value" : "アニメーションの速さ" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "애니메이션" + "value" : "애니메이션 속도" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Geanimeerd" + "value" : "Animatiesnelheid" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Animowane" + "value" : "Szybkość animacji" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Animado" + "value" : "Velocidade de animação" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Анимировано" + "value" : "Скорость анимации" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "展示动画" + "value" : "动画速度" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "展示動畫" + "value" : "動畫速度" } } } }, - "Animation speed" : { + "Another gesture is set up the same way." : { + "comment" : "Tooltip shown on a conflicting gesture in settings", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "سرعة التحريك" + "state" : "needs_review", + "value" : "Another gesture is set up the same way." } }, "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Animationsgeschwindigkeit" + "value" : "Ce geste entre en conflit avec d’autres gestes." } }, - "en" : { + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Animation speed" + "value" : "このジェスチャと競合する他のジェスチャがあります。" } }, - "es" : { + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another gesture is set up the same way." + } + } + } + }, + "Another keybind uses this key combination." : { + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another keybind uses this key combination." + } + }, + "de" : { "stringUnit" : { "state" : "translated", - "value" : "Velocidad de animación" + "value" : "Es gibt andere Tastenkombinationen, die mit dieser in Konflikt stehen." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Another keybind uses this key combination." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vitesse d'animation" + "value" : "Cette combinaison est déjà utilisée par un autre raccourci." } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Velocità animazione" + "value" : "Ci sono delle scorciatoie in conflitto con questi tasti." } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アニメーションの早さ" + "value" : "このキーの組み合わせと競合する他のキー設定があります。" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "애니메이션 속도" + "value" : "이 키 조합과 충돌하는 다른 키바인드가 있습니다" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Animatiesnelheid" + "value" : "Andere toetscombinaties conflicteren met deze toetscombinatie." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Szybkość animacji" + "value" : "Istnieją skróty klawiszowe, które kolidują z tą kombinacją." } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Velocidade de animação" + "value" : "Existem outras teclas que estão em conflito com esta combinação de teclas." } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Скорость анимации" + "value" : "У вас уже есть другие назначения клавиш на эту комбинацию клавиш." } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "动画速度" + "value" : "此按键组合与已有快捷键冲突。" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "動畫速度" + "value" : "此按鍵組合與已有按鍵綁定衝突。" + } + } + } + }, + "Anywhere" : { + "comment" : "Gesture activation zone covers the entire window", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Anywhere" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "N’importe où" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "どこでも" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Anywhere" } } } @@ -1889,7 +2210,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Verrouillé" + "value" : "Verrouillée" } }, "it" : { @@ -1977,7 +2298,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ajouter des marges" + "value" : "Appliquer des marges" } }, "it" : { @@ -2065,7 +2386,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appliquer le délai d'activation au clic du milieu" + "value" : "Appliquer le délai d’activation au clic central" } }, "it" : { @@ -2077,7 +2398,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "中クリックトリガー遅延" + "value" : "中クリックにもトリガー遅延を適用" } }, "ko" : { @@ -2125,7 +2446,7 @@ } }, "Automatically install updates" : { - "comment" : "A tooltip displayed when hovering over the toggle.", + "comment" : "Label of a toggle in the About settings page that enables automatic installation of updates.", "localizations" : { "ar" : { "stringUnit" : { @@ -2166,7 +2487,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "自動的にアップデートをインストールする" + "value" : "自動的にアップデートをインストール" } }, "ko" : { @@ -2302,6 +2623,90 @@ } } }, + "Blur" : { + "comment" : "Text for a toggle that enables/disables blurring the preview.", + "isCommentAutoGenerated" : true, + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "Blur" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Blur" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Blur" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Activer le flou" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Abilita sfocatura" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ぼかしを有効化" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "블러 활성화" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Vervaging" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Zastosuj rozmycie" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Habilitar desfoque" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Включить размытие" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "启用模糊" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "啟用模糊" + } + } + } + }, "Border thickness" : { "localizations" : { "ar" : { @@ -2390,6 +2795,95 @@ } } }, + "Both" : { + "comment" : "Gesture category label: swipe and magnify gestures\nGesture kind: swipe and magnify gestures; opens the radial menu", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Both" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Les deux" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "両方" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Both" + } + } + } + }, "Bottom" : { "comment" : "Label for a slider in Loop’s padding settings", "localizations" : { @@ -2520,7 +3014,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "下部繰り返し" + "value" : "下側サイクル" } }, "ko" : { @@ -2597,7 +3091,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Moitié basse" + "value" : "Moitié inférieure" } }, "it" : { @@ -2876,7 +3370,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "下の画面" + "value" : "下のディスプレイ" } }, "ko" : { @@ -2953,7 +3447,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tiers bas" + "value" : "Tiers inférieur" } }, "it" : { @@ -3219,7 +3713,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Par défaut, Loop reprend les séquences à partir de l'endroit où vous vous êtes arrêté pour la dernière fois dans chaque fenêtre." + "value" : "Par défaut, Loop reprend les séquences à partir de l’endroit où vous vous êtes arrêté pour la dernière fois dans chaque fenêtre." } }, "it" : { @@ -3231,7 +3725,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "デフォルトでは、Loop は各ウィンドウで最後にアクションを終了した位置から繰り返しを再開します。" + "value" : "デフォルトでは、Loopは各ウインドウで前回の続きからサイクルを再開します。" } }, "ko" : { @@ -3255,7 +3749,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Por padrão, o \"Loop\" resume ciclos de onde você parou pela última vez em cada janela." + "value" : "Por padrão, o Loop resume ciclos de onde você parou pela última vez em cada janela." } }, "ru" : { @@ -3498,7 +3992,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "中央" + "value" : "中央に配置" } }, "ko" : { @@ -3633,7 +4127,8 @@ } } }, - "Check for updates…" : { + "Check for Updates…" : { + "comment" : "Button to check for updates in menubar dropdown menu", "localizations" : { "ar" : { "stringUnit" : { @@ -3644,19 +4139,19 @@ "de" : { "stringUnit" : { "state" : "translated", - "value" : "Prüfen auf Updates…" + "value" : "Nach Updates suchen…" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Check for updates…" + "value" : "Check for Updates…" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Comprobar actualizaciones..." + "value" : "Comprobar actualizaciones…" } }, "fr" : { @@ -3674,19 +4169,19 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アップデートの確認..." + "value" : "アップデートを確認…" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "업데이트 확인..." + "value" : "업데이트 확인…" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Controleer voor updates…" + "value" : "Controleren op updates…" } }, "pl" : { @@ -3698,7 +4193,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Verificar atualizações..." + "value" : "Procurar por Atualizações…" } }, "ru" : { @@ -3721,91 +4216,84 @@ } } }, - "Check for Updates…" : { - "comment" : "Button to check for updates in menubar dropdown menu", + "Choose a Keybinds File" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Check for Updates…" + "value" : "Choose a Keybinds File" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Nach Updates suchen…" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Check for Updates…" + "value" : "Wähle eine Keybind-Datei aus" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Check for Updates…" + "value" : "Choose a Keybinds File" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vérifier les mises à jour…" + "value" : "Sélectionner un fichier de raccourcis" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Ricerca aggiornamenti…" + "value" : "Seleziona file scorciatoie" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アップデートの確認…" + "value" : "キー設定ファイルを選択" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "업데이트 확인…" + "value" : "키바인드 파일 선택" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Controleren op updates…" + "value" : "Selecteer een bestand met toetscombinaties" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Sprawdź, czy są dostępne nowe aktualizacje…" + "value" : "Wybierz plik ze skrótami klawiszowymi" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Procurar por Atualizações…" + "value" : "Selecione o arquivo de atalhos do Loop" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Проверить наличие обновлений…" + "value" : "Выберите файл с горячими клавишами" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "检查更新…" + "value" : "选择快捷键文件" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "檢查更新…" + "value" : "選定按鍵綁定檔案" } } } @@ -3851,7 +4339,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をクリア" + "value" : "キー設定を消去" } }, "ko" : { @@ -3898,95 +4386,422 @@ } } }, - "Close" : { - "comment" : "Label for a button that closes a modal window", + "Click “Add” to add a gesture" : { + "comment" : "Empty state subtitle in gestures settings", "localizations" : { "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Appuyez sur « Ajouter » pour ajouter un geste" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "ja" : { "stringUnit" : { "state" : "translated", - "value" : "إغلاق" + "value" : "「追加」を押すと、新しいジェスチャを追加できます。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add a gesture" + } + } + } + }, + "Click “Add” to add a keybind" : { + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "اضغط على «إضافة» لإضافة مفتاح" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Schliessen" + "value" : "Drücke „Hinzufügen“ um eine Tastenbelegung hinzuzufügen" } }, - "en" : { + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Presiona añadir para añadir una combinación de teclas " + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Appuyez sur « Ajouter » pour ajouter un raccourci" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Premi “Aggiungi” per aggiungere una scorciatoia" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "「追加」を押すと、新しいキー設定を追加できます。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "키 바인딩을 추가하려면 “추가”를 누르세요" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Druk op “Toevoegen” om een toetscombinatie toe te voegen" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Naciśnij „Dodaj”, aby dodać skrót klawiszowy" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pressione “Adicionar” para adicionar um atalho" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Нажмите «Добавить», чтобы добавить сочетание клавиш" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "点按“添加”以添加快捷键" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "點按“添加”來添加按鍵綁定" + } + } + } + }, + "Click “Add” to add an action" : { + "comment" : "A description displayed below the list of radial menu actions, encouraging the user to add more.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click “Add” to add an action" + } + }, + "de" : { "stringUnit" : { "state" : "translated", - "value" : "Close" + "value" : "Drücke „Hinzufügen“ um etwas in den Zyklus hinzuzufügen" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Cerrar" + "value" : "Presiona “añadir” para añadir a la rotación" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Fermer" + "value" : "Appuyez sur « Ajouter » pour ajouter une action" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Chiudi" + "value" : "Premi “Aggiungi” per aggiungere un'azione" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "閉じる" + "value" : "「追加」を押すと、新しいアクションを追加できます。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "“추가”를 눌러 액션을 추가하세요." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Klik op “Toevoegen” om een actie toe te voegen" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Naciśnij „Dodaj”, aby dodać akcję" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pressione “Adicionar” para incluir uma ação" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Нажмите «Добавить», чтобы добавить действие" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "点按“添加”以添加操作" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "點按“添加”來添加操作" + } + } + } + }, + "Click “Add” to add an app" : { + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "اضغط على «إضافة» لإضافة تطبيق" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Drücke „Hinzufügen“ um eine Applikation hinzuzufügen" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Presiona añadir para añadir una aplicación" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Appuyez sur « Ajouter » pour ajouter une application" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Premi “Aggiungi” per aggiungere un'applicazione" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "「追加」を押すと、新しいアプリを追加できます。" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "닫기" + "value" : "애플리케이션을 추가하려면 “추가”를 누르세요" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Sluiten" + "value" : "Druk op “Toevoegen” om een applicatie toe te voegen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zamknij" + "value" : "Naciśnij „Dodaj”, aby dodać aplikację" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Fechar" + "value" : "Pressione “Adicionar” para adicionar um aplicativo" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Закрыть" + "value" : "Нажмите «Добавить», чтобы добавить приложение" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "关闭" + "value" : "点按“添加”以添加应用" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "關閉" + "value" : "點按“添加”來添加應用程式" } } } }, + "Click to step through cycle actions." : { + "comment" : "Section footer shown in settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click to step through cycle actions." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click to step through cycle actions." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Click to step through cycle actions." + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Clic gauche pour parcourir la séquence d’actions." + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Usa il click sinistro per ciclare tra le azioni." + } + }, + "ja" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "左クリックでサイクル内のアクションを順番に切り替えます。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "왼쪽 클릭으로 순환 액션을 단계별로 이동합니다." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Klik met de linkermuisknop om door cycle-acties te stappen" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Użyj lewego przycisku myszy, aby przechodzić przez akcje cyklu." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Clique com o botão esquerdo do mouse para avançar pelas ações de ciclo." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Левое нажатие, чтобы пройти действия цикла." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "左键单击以遍历循环操作。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "按一下來遍歷循環操作。" + } + } + } + }, + "Clockwise" : { + "comment" : "Name of the screen order that walks around the screen arrangement clockwise" + }, "Color" : { "comment" : "Section header shown in settings", "localizations" : { @@ -4106,7 +4921,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Options…" + "value" : "Configurer…" } }, "it" : { @@ -4118,7 +4933,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "設定…" + "value" : "構成…" } }, "ko" : { @@ -4165,278 +4980,278 @@ } } }, - "Contributors on GitHub" : { + "Continue the swipe or magnify gesture to step through cycle actions." : { + "comment" : "Section footer shown in settings", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "المساهمون على GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Mitwirkende auf GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Contributors on GitHub" + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Contribuidores en GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Contributeurs sur GitHub" + "value" : "Poursuivez le balayage ou le zoom pour parcourir la séquence d’actions." } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Collaboratori su GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "GitHub の貢献者" + "value" : "スワイプ/ピンチを続けると、サイクル内のアクションを順番に切り替えます。" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "GitHub 기여자들" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Medewerkers op GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Współtwórcy na GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Contribuidores no GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Контрибьюторы на GitHub" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "GitHub上的贡献者" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "GitHub上的貢獻者" + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." } } } }, - "Copied!" : { + "Contributors on GitHub" : { "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Copied!" + "state" : "translated", + "value" : "المساهمون على GitHub" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Erfolgreich kopiert!" + "value" : "Mitwirkende auf GitHub" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Copied!" + "value" : "Contributors on GitHub" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Copied!" + "state" : "translated", + "value" : "Contribuidores en GitHub" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Copié !" + "value" : "Contributeurs sur GitHub" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Copiato!" + "value" : "Collaboratori su GitHub" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "コピーしました!" + "value" : "GitHubの貢献者" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "복사됨!" + "value" : "GitHub 기여자들" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Gekopiëerd!" + "value" : "Medewerkers op GitHub" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Skopiowano!" + "value" : "Współtwórcy na GitHub" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Copiado!" + "value" : "Contribuidores no GitHub" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Скопировано!" + "value" : "Контрибьюторы на GitHub" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "已复制!" + "value" : "GitHub上的贡献者" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "已複製!" + "value" : "GitHub上的貢獻者" } } } }, - "Corner radius" : { - "comment" : "Label for a slider when configuring the preview or radial menu's corner radius.", + "Copied!" : { "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "نصف قطر الزاوية" + "state" : "needs_review", + "value" : "Copied!" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Eckenradius" + "value" : "Erfolgreich kopiert!" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Corner radius" + "value" : "Copied!" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Radio de las esquinas" + "state" : "needs_review", + "value" : "Copied!" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Rayon des coins" + "value" : "Copié !" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Raggio degli angoli" + "value" : "Copiato!" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "コーナーの丸み" + "value" : "コピーしました!" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "모서리 반경" + "value" : "복사됨!" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Hoekradius" + "value" : "Gekopiëerd!" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zaokrąglenie rogów" + "value" : "Skopiowano!" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Raio dos cantos" + "value" : "Copiado!" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Скругление" + "value" : "Скопировано!" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "圆角半径" + "value" : "已复制!" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "圓角半徑" + "value" : "已複製!" } } } }, - "Corner Radius" : { - "comment" : "Section header for configuration related to the corner radius of the preview.", + "Corner radius" : { + "comment" : "Label for a slider when configuring the preview or radial menu's corner radius.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Corner Radius" + "state" : "translated", + "value" : "نصف قطر الزاوية" } }, "de" : { @@ -4448,13 +5263,13 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Corner Radius" + "value" : "Corner radius" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Corner Radius" + "state" : "translated", + "value" : "Radio de las esquinas" } }, "fr" : { @@ -4496,7 +5311,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Raio do canto" + "value" : "Raio dos cantos" } }, "ru" : { @@ -4519,186 +5334,186 @@ } } }, - "Credits" : { - "comment" : "Section header shown in settings", + "Corner Radius" : { + "comment" : "Section header for configuration related to the corner radius of the preview.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "الاعتمادات" + "state" : "needs_review", + "value" : "Corner Radius" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Mitwirkende" + "value" : "Eckenradius" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Credits" + "value" : "Corner Radius" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Créditos" + "state" : "needs_review", + "value" : "Corner Radius" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Crédits" + "value" : "Rayon des coins" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Crediti" + "value" : "Raggio degli angoli" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "謝辞" + "value" : "コーナーの丸み" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "크레딧" + "value" : "모서리 반경" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Credits" + "value" : "Hoekradius" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Autorzy" + "value" : "Zaokrąglenie rogów" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Créditos" + "value" : "Raio do canto" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Создатели" + "value" : "Скругление" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "致谢" + "value" : "圆角半径" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "致謝" + "value" : "圓角半徑" } } } }, - "Cursor" : { + "Credits" : { "comment" : "Section header shown in settings", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "المؤشر" + "value" : "الاعتمادات" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Mauszeiger" + "value" : "Mitwirkende" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor" + "value" : "Credits" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Cursor" + "state" : "translated", + "value" : "Créditos" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Curseur" + "value" : "Crédits" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Cursore" + "value" : "Crediti" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソル" + "value" : "謝辞" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "커서" + "value" : "크레딧" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor" + "value" : "Credits" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Kursor" + "value" : "Autorzy" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor" + "value" : "Créditos" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Курсор" + "value" : "Создатели" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "光标" + "value" : "致谢" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "游標" + "value" : "致謝" } } } }, "Custom" : { - "comment" : "Accent color option\nWindow action", + "comment" : "Accent color option\nPreview background style: a configurable blur and accent color\nWindow action", "localizations" : { "ar" : { "stringUnit" : { @@ -4727,7 +5542,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Personnalisé" + "value" : "Personnalisée" } }, "it" : { @@ -4786,37 +5601,114 @@ } } }, - "Customize this action's custom frame." : { - "comment" : "A help text describing the customization option for a custom-direction action.", + "Customize actions" : { + "comment" : "Toggle in the “Radial Menu” section of the “Advanced” tab that enables customizing the radial menu’s actions.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this action's custom frame." + "value" : "Customize actions" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this action's custom frame." + "value" : "Customize actions" } }, - "en" : { + "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Customize this action's custom frame." + "state" : "needs_review", + "value" : "Customize actions" + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Autoriser la personnalisation du menu radial" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Consenti personalizzazione del menu radiale" + } + }, + "ja" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "円形メニューのカスタマイズを許可" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "원형 메뉴 사용자화 허용" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Radiaal menu aanpassen toestaan" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Zezwalaj na dostosowywanie menu kołowego" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Permitir customização do menu radial" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Разрешить изменение радиального меню" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "允许自定义环形菜单" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "允許自訂環形菜單" + } + } + } + }, + "Customize this action’s custom frame." : { + "comment" : "Help text on the slider icon next to a gesture action with a custom frame", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this action’s custom frame." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this action’s custom frame." } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this action's custom frame." + "value" : "Customize this action’s custom frame." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Personnalisez le cadre personnalisé de cette action." + "value" : "Personnalisez le cadre de cette action." } }, "it" : { @@ -4875,24 +5767,190 @@ } } }, - "Customize this keybind's action." : { + "Customize this gesture." : { + "comment" : "Help text shown when hovering a gesture configuration button", "localizations" : { "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "en" : { "stringUnit" : { "state" : "translated", - "value" : "تخصيص إجراء ربط المفتاح هذا." + "value" : "Customize this gesture." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Personnalisez ce geste." + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "このジェスチャをカスタマイズします。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture." + } + } + } + }, + "Customize this gesture’s action." : { + "comment" : "Help text shown when hovering a gesture's action button", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." } }, "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Aktion dieser Tastenkombination anpassen." + "value" : "Personnalisez l’action de ce geste." } }, - "en" : { + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Customize this keybind's action." + "value" : "このジェスチャのアクションをカスタマイズします。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture’s action." + } + } + } + }, + "Customize this keybind’s action." : { + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "تخصيص إجراء ربط المفتاح هذا." + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aktion dieser Tastenkombination anpassen." } }, "es" : { @@ -4904,7 +5962,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Personnalisez l'action de ce raccourci." + "value" : "Personnalisez l’action de ce raccourci." } }, "it" : { @@ -4916,7 +5974,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このキー設定の動作をカスタマイズします。" + "value" : "このキー設定のアクションをカスタマイズします。" } }, "ko" : { @@ -4963,8 +6021,97 @@ } } }, + "Customize this radial menu action." : { + "comment" : "A tooltip for the radial menu action customization button.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Customize this radial menu action." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Personnalisez cette action du menu radial." + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "この円形メニューのアクションをカスタマイズします。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this radial menu action." + } + } + } + }, "Customize what this action cycles through." : { - "comment" : "A description for a button that appears when configuring a cycling window action.", + "comment" : "Help text on the cycle icon next to a gesture action that cycles", "localizations" : { "ar" : { "stringUnit" : { @@ -5005,7 +6152,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このアクションで繰り返す内容をカスタマイズします。" + "value" : "このアクションのサイクル内容をカスタマイズします。" } }, "ko" : { @@ -5094,7 +6241,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "繰り返し" + "value" : "サイクル" } }, "ko" : { @@ -5106,7 +6253,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cyclus" + "value" : "Positie" } }, "pl" : { @@ -5170,7 +6317,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Reculer dans le cycle avec Maj" + "value" : "Reculer dans la séquence avec Maj" } }, "it" : { @@ -5182,7 +6329,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Shift を押しながら逆方向に繰り返す" + "value" : "Shiftを押しながら逆方向にサイクル" } }, "ko" : { @@ -5194,7 +6341,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cyclus teruggaan met Shift" + "value" : "Positie teruggaan met shift" } }, "pl" : { @@ -5206,7 +6353,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Ciclo para trás com \"Shift\"" + "value" : "Ciclo para trás com Shift" } }, "ru" : { @@ -5259,7 +6406,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Séquence" + "value" : "Séquences" } }, "it" : { @@ -5271,7 +6418,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "繰り返し" + "value" : "サイクル" } }, "ko" : { @@ -5318,357 +6465,435 @@ } } }, - "Default corner radius" : { - "comment" : "Label for the slider that controls the corner radius of the preview when the user has not selected a window.", + "Design" : { + "comment" : "Role title shown in Loop’s credits section.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Default corner radius" + "state" : "translated", + "value" : "تصميم" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Standard-Eckenradius" + "value" : "Design" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Default corner radius" + "value" : "Design" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Default corner radius" + "state" : "translated", + "value" : "Diseño" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Rayon des coins par défaut" + "value" : "Conception" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Raggio predefinito degli angoli" + "value" : "Design" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "デフォルトのコーナーの丸み" + "value" : "デザイン" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "기본 모서리 반경" + "value" : "디자인" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Standaard hoekradius" + "value" : "Design" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Domyślne zaokrąglenie narożników" + "value" : "Design" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Raio de canto padrão" + "value" : "Design" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Скругление по умолчанию" + "value" : "Дизайн" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "默认圆角半径" + "value" : "设计" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "默認圓角半徑" + "value" : "設計" } } } }, - "Design" : { + "Development" : { "comment" : "Role title shown in Loop’s credits section.", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "تصميم" + "value" : "تطوير" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Design" + "value" : "Entwicklung" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Design" + "value" : "Development" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Diseño" + "value" : "Desarrollador" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Conception" + "value" : "Développement" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Design" + "value" : "Sviluppo" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "デザイン" + "value" : "開発" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "디자인" + "value" : "개발" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Design" + "value" : "Ontwikkeling" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Design" + "value" : "Development" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Design\"" + "value" : "Desenvolvimento" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Дизайн" + "value" : "Разработка" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "设计" + "value" : "开发" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "設計" + "value" : "開發" } } } }, - "Development" : { - "comment" : "Role title shown in Loop’s credits section.", + "Device Control and Data Access" : { + "comment" : "Name of the privacy pane in macOS 27 and later, shown as a permission in settings", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "تطوير" + "value" : "التحكم في الأجهزة والوصول إلى البيانات" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Entwicklung" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Development" + "value" : "Gerätesteuerung und Datenzugriff" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Desarrollador" + "value" : "Control de dispositivos y acceso a datos" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Développement" + "value" : "Contrôle de l’appareil et accès aux données" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Sviluppo" + "value" : "Controllo del dispositivo e accesso ai dati" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "開発" + "value" : "デバイスの制御とデータへのアクセス" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "개발" + "value" : "기기 제어 및 데이터 접근" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Ontwikkeling" + "value" : "Apparaatbeheer en gegevenstoegang" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Development" + "value" : "Sterowanie urządzeniami i dostęp do danych" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Desenvolvimento" + "value" : "Controle do Dispositivo e Acesso a Dados" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Разработка" + "value" : "Управление устройством и доступ к данным" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "开发" + "value" : "设备控制和数据访问" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "開發" + "value" : "裝置控制和資料取用" } } } }, - "Disable cursor interaction" : { + "Direction" : { + "comment" : "Label for the swipe direction picker in the gesture configuration modal", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "تعطيل تفاعل المؤشر" + "state" : "needs_review", + "value" : "Direction" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Mauszeiger Interaktion deaktivieren" + "state" : "needs_review", + "value" : "Direction" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Disable cursor interaction" + "value" : "Direction" } }, "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deshabilitar interacción con el cursor" + "value" : "Direction" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "方向" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + } + } + }, + "Distinguish left and right modifier keys" : { + "comment" : "Setting label in the “Keybinds” tab for treating the left and right modifier keys as separate trigger keys.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Distinguish left and right modifier keys" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Linke und rechte Tasten unterschiedlich behandeln" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Distinguish left and right modifier keys" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Désactiver l'interaction du curseur" + "value" : "Traiter les touches gauche et droite différemment" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Disabilita interazione con cursore" + "value" : "Distinzione tra tasto sinistro e destro" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソル操作を無効化" + "value" : "左右のキーを別扱い" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "커서 상호작용 비활성화" + "value" : "왼쪽 키와 오른쪽 키를 다르게 취급" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor interactie uitschakelen" + "value" : "Behandel linker- en rechtertoetsen anders" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Wyłącz reakcję na kursor" + "value" : "Rozróżniaj klawisze po prawej i lewej stronie klawiatury" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Desabilitar interações com o cursor" + "value" : "Tratar as teclas esquerda e direita de forma diferente" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Отключить взаимодействие курсором" + "value" : "Разные левая и правая клавиши" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "禁用光标交互" + "value" : "分开对待键盘两侧的修饰键" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "禁用游標交互" + "value" : "分開對待鍵盤兩側的修飾鍵" } } } @@ -5702,7 +6927,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Voulez-vous fusionner ou effacer les raccourcis existants ?" + "value" : "Voulez-vous fusionner ou effacer les raccourcis existants ?" } }, "it" : { @@ -5849,6 +7074,89 @@ } } }, + "Done" : { + "comment" : "Label for a button that closes a modal window", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "تم" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fertig" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aceptar" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Terminé" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fine" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "完了" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "완료" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gereed" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gotowe" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "OK" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Готово" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "完成" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "完成" + } + } + } + }, "Double-click to trigger" : { "localizations" : { "ar" : { @@ -5878,7 +7186,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Double-cliquez pour déclencher" + "value" : "Activer par double-clic" } }, "it" : { @@ -5937,180 +7245,183 @@ } } }, - "Enable blur" : { - "comment" : "Text for enabling the blur effect on the preview.", + "Down" : { + "comment" : "Swipe direction picker option: down", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable blur" + "value" : "Down" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable blur" + "value" : "Down" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Enable blur" + "value" : "Down" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable blur" + "value" : "Down" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Flou activé" + "value" : "Bas" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Abilita sfocatura" + "state" : "needs_review", + "value" : "Down" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ぼかし" + "value" : "下" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "블러 활성화" + "state" : "needs_review", + "value" : "Down" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Vervaging" + "state" : "needs_review", + "value" : "Down" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Zastosuj rozmycie" + "state" : "needs_review", + "value" : "Down" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Habilitar desfoque" + "state" : "needs_review", + "value" : "Down" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Включить размытие" + "state" : "needs_review", + "value" : "Down" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "启用模糊" + "state" : "needs_review", + "value" : "Down" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "啟用模糊" + "state" : "needs_review", + "value" : "Down" } } } }, - "Enable window snapping" : { - "comment" : "A label for a toggle that enables or disables window snapping. The text is presented as a popover when the toggle is hovered over.", + "Dragging" : { + "comment" : "Section header shown in settings, for settings about dragging windows" + }, + "Each %@ action tracks one window. To stash\nmore windows, add more %@ actions." : { + "comment" : "Information in a popover displaying how a stash action can only keep track of a single window. Both %1$@ and %2$@ are replaced with the language's localization of the \"Stash\" action.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable window snapping" + "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Fenster Snapping aktivieren" + "state" : "needs_review", + "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Enable window snapping" + "value" : "Each %1$@ action tracks one window. To stash\nmore windows, add more %1$@ actions." } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable window snapping" + "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Activer le magnétisme des fenêtres" + "value" : "Une action %1$@ ne peut suivre qu’une seule fenêtre. Pour mettre de côté\nplusieurs fenêtres, ajoutez une autre action %2$@." } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Abilita aggancio ai bordi" + "value" : "Una singola azione %1$@ può tracciare solamente una finestra.\nPer nascondere più finestre, aggiungi altre azioni %2$@." } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウスナップを有効化" + "value" : "1つの%1$@アクションで追跡できるウインドウは1つだけです。\n複数のウインドウをスタッシュするには、別の%2$@アクションを追加してください。" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "창 스내핑 활성화" + "value" : "단일 %1$@ 액션은 하나의 창만 추적할 수 있습니다. 여러 창을 숨기려면 %2$@ 액션을 추가로 설정하세요." } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Venster" + "value" : "Een enkele %1$@-actie kan maar één venster volgen. Om meerdere vensters tijdelijk op te slaan, voeg extra %2$@-acties toe." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Włącz przyciąganie okien" + "value" : "Pojedyncza akcja %1$@ może śledzić tylko jedno okno. Aby użyć opcji Stash na więcej niż jednym oknie, dodaj dodatkowe %2$@ akcje." } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Ativar encaixe automático de janelas" + "value" : "Uma ação %1$@ pode rastrear apenas uma janela. Para ocultar múltiplas janelas, adicione ações %2$@ adicionais." } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Включить привязку окон" + "value" : "Действие %1$@ может следить только за одним окном. Добавьте дополнительные %2$@ действий, чтобы спрятать несколько окон." } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "开启窗口吸附" + "value" : "单个%1$@操作只能应用于单个窗口。要收纳多个窗口,请添加更多%2$@操作。" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "啟用視窗吸附" + "value" : "單個%1$@操作只能應用於單個視窗。要收納多個視窗,請添加更多%2$@操作。" } } } @@ -6207,262 +7518,251 @@ "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "خطأ في قراءة روابط المفاتيح" } }, "de" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Fehler beim lesen von Tastenbelegungen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Error Reading Keybinds" + "value" : "Couldn’t Import Keybinds" } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Error leyendo combinaciones" } }, "fr" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Erreur de lecture des raccourcis" } }, "it" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Errore lettura scorciatoie" } }, "ja" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "キー設定の読み取りエラー" } }, "ko" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "키바인드 읽기 오류" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Fout bij het lezen van toetscombinaties" } }, "pl" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Błąd odczytu skrótów klawiszowych" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Erro Lendo Atalhos" } }, "ru" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Ошибка чтения горячих клавиш" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "读取快捷键时发生错误" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "讀取按鍵綁定時發生錯誤" } } } }, - "Export" : { + "Export Keybinds" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "تصدير" + "value" : "تصدير روابط المفاتيح" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Exportieren" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Export" + "value" : "Tastenbelegungen Exportieren" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Exportar" + "value" : "Exportar combinaciones" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Exporter" + "value" : "Exporter les raccourcis" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Esporta" + "value" : "Esporta scorciatoie" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "エクスポート" + "value" : "キー設定を書き出す" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "내보내기" + "value" : "키바인드 내보내기" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Exporteer" + "value" : "Toetscombinaties exporteren" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Eksportuj" + "value" : "Eksportuj skróty klawiszowe" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Exportar" + "value" : "Exportar atalhos" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Экспортировать" + "value" : "Экспортировать горячие клавиши" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "导出" + "value" : "导出快捷键" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "匯出" + "value" : "匯出按鍵綁定" } } } }, - "Export keybinds" : { + "Export…" : { + "comment" : "Button that opens a file dialog to export keybinds.", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "تصدير روابط المفاتيح" + "value" : "تصدير…" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Tastenbelegungen Exportieren" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Export keybinds" + "value" : "Exportieren …" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Exportar combinaciones" + "value" : "Exportar…" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Exporter les raccourcis" + "value" : "Exporter…" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Esporta scorciatoie" + "value" : "Esporta…" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をエクスポート" + "value" : "書き出す…" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "키바인드 내보내기" + "value" : "내보내기…" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Toetscombinaties exporteren" + "value" : "Exporteer…" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Eksportuj skróty klawiszowe" + "value" : "Eksportuj…" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Exportar atalhos" + "value" : "Exportar…" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Экспортировать горячие клавиши" + "value" : "Экспортировать…" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "导出快捷键" + "value" : "导出…" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "匯出按鍵綁定" + "value" : "輸出⋯" } } } @@ -6497,7 +7797,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Bar externe" + "value" : "Barre externe" } }, "it" : { @@ -6556,180 +7856,180 @@ } } }, - "Failed to resolve linked keybind" : { - "comment" : "An error message displayed when a linked keybind cannot be resolved.", + "Fill Available Space" : { + "comment" : "Window action", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Failed to resolve linked keybind" + "value" : "Fill Available Space" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Failed to resolve linked keybind" + "value" : "Fill Available Space" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Failed to resolve linked keybind" + "value" : "Fill Available Space" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Failed to resolve linked keybind" + "value" : "Fill Available Space" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Impossible de résoudre le raccourci lié" + "value" : "Remplir l’espace disponible" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Impossibile trovare la scorciatoia collegata" + "value" : "Riempi spazio disponibile" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "紐付けキー設定を解決できません" + "value" : "空き領域を埋める" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "연결된 키 바인딩을 확인하지 못했습니다" + "value" : "사용 가능한 공간 채우기" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Gelinkte toetscombinatie ophalen mislukt" + "value" : "Beschikbare ruimte opvullen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Nie udało się odnaleźć powiązanego skrótu klawiszowego" + "value" : "Wypełnij dostępną przestrzeń" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Falha ao resolver tecla vinculada" + "value" : "Preencher o espaço disponível" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Не удалось определить связанную клавишу" + "value" : "Заполнять доступное место" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "无法解析关联的快捷键" + "value" : "填充可用区域" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "無法解析關聯的按鍵綁定" + "value" : "填充可用空白" } } } }, - "Fill Available Space" : { - "comment" : "Window action", + "Fingers" : { + "comment" : "Label for the finger-count stepper in the gesture configuration popover", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Fill Available Space" + "value" : "Fingers" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Fill Available Space" + "value" : "Fingers" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Fill Available Space" + "value" : "Fingers" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Fill Available Space" + "value" : "Fingers" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Remplir l’espace disponible" + "value" : "Doigts" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Riempi spazio disponibile" + "state" : "needs_review", + "value" : "Fingers" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "空き領域を埋める" + "value" : "指の本数" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "사용 가능한 공간 채우기" + "state" : "needs_review", + "value" : "Fingers" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Beschikbare ruimte opvullen" + "state" : "needs_review", + "value" : "Fingers" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Wypełnij dostępną przestrzeń" + "state" : "needs_review", + "value" : "Fingers" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Preencher o espaço disponível" + "state" : "needs_review", + "value" : "Fingers" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Заполнять доступное место" + "state" : "needs_review", + "value" : "Fingers" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "填充可用区域" + "state" : "needs_review", + "value" : "Fingers" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "填充可用空白" + "state" : "needs_review", + "value" : "Fingers" } } } @@ -6764,7 +8064,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Premier quatrième" + "value" : "Premier quart" } }, "it" : { @@ -7179,37 +8479,31 @@ } } }, - "Focus Next In Stack" : { + "Focus Next in Stack" : { "comment" : "Window action", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Focus Next In Stack" + "value" : "Focus Next in Stack" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Focus Next In Stack" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Focus Next In Stack" + "value" : "Focus Next in Stack" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Focus Next In Stack" + "value" : "Focus Next in Stack" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Focaliser sur la pile suivante" + "value" : "Focaliser la fenêtre suivante de la pile" } }, "it" : { @@ -7268,6 +8562,89 @@ } } }, + "Focus next window when stashing" : { + "comment" : "Toggle that moves focus to the next window when a window is stashed.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Focus next window when stashing" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fokus verschieben, wenn gestasht" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Focus next window when stashing" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Changer le focus lors de la mise de côté" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sposta il focus quando nascondi" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "スタッシュ時にフォーカスを移動" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "스태시 시 포커스 전환" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Focus wisselen wanneer venster is opgeborgen" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Zmień ostrość, kiedy na stosie" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Desfocar quando oculto" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Поменять фокус при скрытии" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "收纳时移动焦点" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "收納時移動焦點" + } + } + } + }, "Focus Right" : { "comment" : "Window action", "localizations" : { @@ -7298,7 +8675,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Focaliser vers la droit" + "value" : "Focaliser vers la droite" } }, "it" : { @@ -7447,6 +8824,7 @@ } }, "Focus window on resize" : { + "comment" : "Text displayed in a toggle that allows the user to focus a window when it is resized.", "localizations" : { "ar" : { "stringUnit" : { @@ -7460,12 +8838,6 @@ "value" : "Fenster beim manipulieren fokussieren" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Focus window on resize" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -7487,7 +8859,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "リサイズ時にウインドウをフォーカス" + "value" : "サイズ変更時にウインドウをフォーカス" } }, "ko" : { @@ -7534,6 +8906,9 @@ } } }, + "Active" : { + "comment" : "Target window option: act on the active window" + }, "Fourth Fourth" : { "comment" : "Window action", "localizations" : { @@ -7564,7 +8939,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quatrième quatrième" + "value" : "Quatrième quart" } }, "it" : { @@ -7623,7 +8998,7 @@ } } }, - "Fullscreen" : { + "Full Screen" : { "comment" : "Window action", "localizations" : { "ar" : { @@ -7638,12 +9013,6 @@ "value" : "Vollbild" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fullscreen" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -7665,7 +9034,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "全画面" + "value" : "フルスクリーン" } }, "ko" : { @@ -7713,7 +9082,7 @@ } }, "General" : { - "comment" : "Section header in the action picker of the Keybinds tab\nSection header shown in settings", + "comment" : "Section header in the action picker of the Keybinds tab", "localizations" : { "ar" : { "stringUnit" : { @@ -7801,6 +9170,184 @@ } } }, + "Gesture" : { + "comment" : "Label for the magnify gesture picker in the gesture configuration modal", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gesture" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Geste" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ジェスチャ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gesture" + } + } + } + }, + "Gestures" : { + "comment" : "Section header shown in gestures settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gestures" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gestes" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ジェスチャ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + } + } + }, "Go Back" : { "comment" : "Section header in the action picker of the Keybinds tab", "localizations" : { @@ -7831,7 +9378,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser" + "value" : "Revenir" } }, "it" : { @@ -8477,7 +10024,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Top Groeien" + "value" : "Boven groeien" } }, "pl" : { @@ -8719,7 +10266,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Retour haptique" + "value" : "Retour tactile" } }, "it" : { @@ -8731,7 +10278,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ハプティックフィードバック" + "value" : "触覚フィードバック" } }, "ko" : { @@ -8896,7 +10443,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Cacher" + "value" : "Masquer" } }, "it" : { @@ -8955,96 +10502,8 @@ } } }, - "Hide menu bar icon" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "إخفاء أيقونة شريط القوائم" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Menüleisten Symbol ausblenden" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hide menu bar icon" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ocultar icono de la barra de menú" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Masquer l’icône de la barre de menu" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nascondi dalla barra dei menu" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "メニューバーのアイコンを非表示" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "메뉴 바 아이콘 숨기기" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Verstop de menu balk icoon" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ukryj ikonę na pasku menu" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Esconder ícone da barra de menu" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Спрятать иконку в строке меню" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "隐藏菜单栏图标" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "隱藏選單列圖標" - } - } - } - }, "Hide when no action is selected" : { - "comment" : "Toggle label for hiding the radial menu when no action is selected.", + "comment" : "Toggle to hide the radial menu whenever no action is selected", "localizations" : { "ar" : { "stringUnit" : { @@ -9073,7 +10532,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Cacher quand aucune action n'est sélectionnée" + "value" : "Masquer quand aucune action n’est sélectionnée" } }, "it" : { @@ -9340,7 +10799,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quatrièmes horizontaux" + "value" : "Quarts horizontaux" } }, "it" : { @@ -9429,7 +10888,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tiers horizontal" + "value" : "Tiers horizontaux" } }, "it" : { @@ -9869,7 +11328,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Developpeur" + "value" : "Développeur" } }, "it" : { @@ -10145,7 +11604,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop マスター" + "value" : "Loopマスター" } }, "ko" : { @@ -10257,7 +11716,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Meta Loop\"" + "value" : "Meta Loop" } }, "ru" : { @@ -10433,7 +11892,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Rosé Pine\"" + "value" : "Rosé Pine" } }, "ru" : { @@ -10724,85 +12183,85 @@ "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "سيتم إخطارك الآن عندما ت\n\nفتح أيقونة جديدة." } }, "de" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Du wirst benachrichtigt wenn du ein App Icon freischaltest." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "You will now be notified when you unlock a new icon." + "value" : "You’ll be notified when you unlock a new icon." } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Serás notificado cuando hayas desbloqueado un nuevo icono" } }, "fr" : { "stringUnit" : { - "state" : "translated", - "value" : "Vous serez désormais averti lorsque vous débloquez une nouvelle icône." + "state" : "needs_review", + "value" : "Vous serez désormais averti lorsque vous débloquerez une nouvelle icône." } }, "it" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Da ora, riceverai una notifica ad ogni icona sbloccata." } }, "ja" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "新しいアイコンをアンロックしたときに通知されるようになります。" } }, "ko" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "새 아이콘을 잠금 해제할 때 알림을 받게 됩니다." } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Je gaat nu een melding krijgen als je een nieuw icoon ontgrendelt" } }, "pl" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Zostaniesz powiadomiony o odblokowaniu nowej ikony." } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Você será notificado quando desbloquear um novo ícone." } }, "ru" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Вам придет уведомление когда вы откроете новую иконку." } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "你将会在解锁新图标时收到通知。" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "你將會在解鎖新圖標時收到通知。" } } @@ -10838,7 +12297,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez débloqué une nouvelle icône : %@ !" + "value" : "Vous avez débloqué une nouvelle icône : %@ !" } }, "it" : { @@ -10927,7 +12386,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez utilisé Loop 25 fois ! En récompense, voici une nouvelle icône : %@. Continuez à boucler pour en débloquer d’autres !" + "value" : "Vous avez utilisé Loop 25 fois ! En récompense, voici une nouvelle icône : %@. Continuez à utiliser Loop pour en débloquer d’autres !" } }, "it" : { @@ -10939,7 +12398,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "すでに25回も Loop しました!ご褒美として、新しいアイコン「%@」をプレゼント!さらに Loop して、新しいアイコンをアンロックしましょう!" + "value" : "すでに25回もLoopしました!ご褒美として、新しいアイコン「%@」をプレゼント!さらにLoopして、新しいアイコンをアンロックしましょう!" } }, "ko" : { @@ -11016,7 +12475,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "5000 Loops accomplies ! L’univers a été témoin de la naissance d’un maître de Loop ! Profitez de votre récompense bien méritée : une toute nouvelle icône !" + "value" : "5 000 Loops accomplis ! L’univers a été témoin de la naissance d’un maître de Loop ! Profitez de votre récompense bien méritée : une toute nouvelle icône !" } }, "it" : { @@ -11028,7 +12487,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "5000回の Loop を達成!宇宙が Loop マスターの誕生を見守りました!偉業にふさわしいご褒美、新しいアイコンをどうぞ!" + "value" : "5000回のLoopを達成!宇宙がLoopマスターの誕生を見守りました!偉業にふさわしいご褒美、新しいアイコンをどうぞ!" } }, "ko" : { @@ -11075,7 +12534,8 @@ } } }, - "Ignore fullscreen windows" : { + "Ignore full-screen windows" : { + "comment" : "Toggle that makes Loop ignore full-screen windows.", "localizations" : { "ar" : { "stringUnit" : { @@ -11089,12 +12549,6 @@ "value" : "Vollbildfenster ignorieren" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ignore fullscreen windows" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -11163,94 +12617,6 @@ } } }, - "Import" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "استيراد" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importieren" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Import" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importar" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importer" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importa" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "インポート" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "가져오기" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importeren" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importuj" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Importar" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Импортировать" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "导入" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "匯入" - } - } - } - }, "Import Keybinds" : { "localizations" : { "ar" : { @@ -11280,7 +12646,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Importer des raccourcis" + "value" : "Importer les raccourcis" } }, "it" : { @@ -11292,7 +12658,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をインポート" + "value" : "キー設定を読み込む" } }, "ko" : { @@ -11432,85 +12798,85 @@ "ar" : { "stringUnit" : { "state" : "translated", - "value" : "مسح" + "value" : "استبدال" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Löschen" + "value" : "Ersetzen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Erase" + "value" : "Replace" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Borrar" + "value" : "Reemplazar" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Effacer" + "value" : "Remplacer" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Sovrascrivi" + "value" : "Sostituisci" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "消去" + "value" : "置き換える" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "지우기" + "value" : "대치" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Wissen" + "value" : "Vervang" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Wyczyść" + "value" : "Zastąp" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Apagar" + "value" : "Substituir" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Удалить" + "value" : "Заменить" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "清空" + "value" : "替换" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "清空" + "value" : "取代" } } } @@ -11556,7 +12922,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "結合する" + "value" : "結合" } }, "ko" : { @@ -11603,6 +12969,172 @@ } } }, + "Import…" : { + "comment" : "Button that opens a file dialog to import keybinds.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "استيراد…" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importieren …" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importar…" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importer…" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importa…" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "読み込む…" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "가져오기…" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importeer…" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importuj…" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Importar…" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Импортировать…" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "导入…" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "輸入⋯" + } + } + } + }, + "Include at least one modifier key." : { + "comment" : "An error message displayed when a custom keybind is created but does not include at least one modifier key.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Include at least one modifier key." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Include at least one modifier key." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Include at least one modifier key." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Veuillez inclure au moins une touche de modification." + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Includi almeno un tasto modificatore." + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "少なくとも1つの修飾キーを含めてください。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "하나 이상의 보조 키를 포함해 주세요." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Voeg ten minste één aanpassingstoets toe." + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Proszę podać co najmniej jeden klawisz." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Por favor, inclua pelo menos uma tecla modificadora." + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Пожалуйста, используйте хотя бы одну специальную клавишу." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "请包含至少一个修饰键。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "請包括至少一個修飾鍵。" + } + } + } + }, "Include development versions" : { "localizations" : { "ar" : { @@ -11721,7 +13253,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Dimensions initiales" + "value" : "Cadre initial" } }, "it" : { @@ -11909,7 +13441,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "設置" + "value" : "インストール" } }, "ko" : { @@ -11956,13 +13488,13 @@ } } }, - "Install failed" : { + "Install Failed" : { "comment" : "The text that appears when the update fails to install.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Install failed" + "value" : "Install Failed" } }, "de" : { @@ -11971,16 +13503,10 @@ "value" : "Installation fehlgeschlagen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Install failed" - } - }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Install failed" + "value" : "Install Failed" } }, "fr" : { @@ -12045,31 +13571,25 @@ } } }, - "Install in Your Applications Folder" : { - "comment" : "Label for a button that allows the user to install the update in their Applications folder.", + "Install in Applications Folder" : { + "comment" : "Button in update installer alerts that installs the update in the Applications folder", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "value" : "Install in Applications Folder" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Install in Your Applications Folder" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Install in Your Applications Folder" + "value" : "Install in Applications Folder" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "value" : "Install in Applications Folder" } }, "fr" : { @@ -12092,8 +13612,8 @@ }, "ko" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "state" : "translated", + "value" : "응용 프로그램 폴더에 설치" } }, "nl-BE" : { @@ -12104,8 +13624,8 @@ }, "pl" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "state" : "translated", + "value" : "Zainstaluj do folderu Aplikacje" } }, "pt-BR" : { @@ -12122,192 +13642,187 @@ }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "state" : "translated", + "value" : "安装到应用程序文件夹" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "state" : "translated", + "value" : "安裝到應用程式資料夾" } } } }, - "Install to Applications" : { - "comment" : "Title of the first button in an alert that asks if the user wants to install an update to their Applications folder.", + "Instant" : { + "comment" : "Animation speed setting", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install to Applications" + "state" : "translated", + "value" : "فوري" } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install to Applications" + "state" : "translated", + "value" : "Sofort" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Install to Applications" + "value" : "Instant" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install to Applications" + "state" : "translated", + "value" : "Instantánea" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Installer dans Applications" + "value" : "Instantané" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Installa in Applicazioni" + "value" : "Istantanea" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アプリケーションにインストール" + "value" : "即時" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "응용 프로그램 폴더에 설치" + "value" : "즉시" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Installeren in je Applications-folder" + "value" : "Direct" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zainstaluj do folderu Aplikacje" + "value" : "Natychmiastowo" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Instalar em Aplicativos" + "value" : "Instantâneo" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Установить в папку \"Приложения\"" + "value" : "Мгновенно" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "安装到应用程序文件夹" + "value" : "即刻" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "安裝到應用程式資料夾" + "value" : "即刻" } } } }, - "Instant" : { - "comment" : "Animation speed setting", + "Integrate with macOS window manager" : { + "comment" : "Toggle to enable integration with macOS window manager.", + "isCommentAutoGenerated" : true, "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "فوري" + "state" : "needs_review", + "value" : "Integrate with macOS window manager" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Sofort" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Instant" + "value" : "macOS Fenster Manager verwenden, wenn verfügbar" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Instantánea" + "state" : "needs_review", + "value" : "Integrate with macOS window manager" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Instantané" + "value" : "Utiliser le gestionnaire de fenêtres de macOS si possible" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Istantanea" + "value" : "Usa la gestione delle finestre di macOS quando possibile" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "即時" + "value" : "利用可能な場合はmacOSのウインドウマネージャを使用" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "즉시" + "value" : "사용 가능한 경우 macOS 창 관리자 사용" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Direct" + "value" : "Gebruik MacOS Window Manager als deze beschikbaar is" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Natychmiastowo" + "value" : "Używaj managera okien macOS, kiedy to możliwe" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Instantâneo" + "value" : "Usar gerenciador de janelas do macOS quando disponível" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Мгновенно" + "value" : "Использовать оконный менеджер macOS" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "即刻" + "value" : "尽量使用macOS原生窗口管理系统" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "即刻" + "value" : "儘可能使用macOS原生窗口管理系統。" } } } @@ -12430,7 +13945,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Garder dans l'emplacement actuel" + "value" : "Laisser à l’emplacement actuel" } }, "it" : { @@ -12608,7 +14123,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Agrandir" + "value" : "Plus grand" } }, "it" : { @@ -12620,7 +14135,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "広げる" + "value" : "大きくする" } }, "ko" : { @@ -12697,7 +14212,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Agrandir proportionnellement" + "value" : "Plus grand (proportionnel)" } }, "it" : { @@ -12709,7 +14224,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "拡大する" + "value" : "比率を保って大きくする" } }, "ko" : { @@ -12785,7 +14300,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Lancer au démarrage" + "value" : "Ouvrir avec la session" } }, "it" : { @@ -12845,7 +14360,7 @@ } }, "Left" : { - "comment" : "Label for a slider in Loop’s padding settings\nSide of a trigger key", + "comment" : "Label for a slider in Loop’s padding settings\nSide of a trigger key\nSwipe direction picker option: left", "localizations" : { "ar" : { "stringUnit" : { @@ -12974,7 +14489,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左部繰り返し" + "value" : "左側サイクル" } }, "ko" : { @@ -13152,7 +14667,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左の画面" + "value" : "左のディスプレイ" } }, "ko" : { @@ -13407,7 +14922,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deux tiers gauches" + "value" : "Deux tiers à gauche" } }, "it" : { @@ -13466,180 +14981,174 @@ } } }, - "Left-click to step through cycle actions." : { - "comment" : "Section footer shown in settings", + "Link Trigger Key" : { + "comment" : "A button that links a trigger key to an action's keybind.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Left-click to step through cycle actions." + "value" : "Link Trigger Key" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Left-click to step through cycle actions." + "value" : "Link Trigger Key" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Left-click to step through cycle actions." + "value" : "Link Trigger Key" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Left-click to step through cycle actions." + "value" : "Link Trigger Key" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Clic gauche pour parcourir la séquence d’actions." + "value" : "Lier la touche d’activation" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Usa il click sinistro per ciclare tra le azioni." + "value" : "Collega tasti di attivazione" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左クリックで繰り返しを順番に切り替えます。" + "value" : "トリガーキーをリンク" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "왼쪽 클릭으로 순환 액션을 단계별로 이동합니다." + "value" : "트리거 키 연결" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Klik met de linkermuisknop om door cycle-acties te stappen" + "value" : "Trigger-toets koppelen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Użyj lewego przycisku myszy, aby przechodzić przez akcje cyklu." + "value" : "Przypisz klawisz aktywujący" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Clique com o botão esquerdo do mouse para avançar pelas ações de ciclo." + "value" : "Vincular Tecla de Ativação" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Левое нажатие, чтобы пройти действия цикла." + "value" : "Привязать клавишу активации" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "左键单击以遍历循环操作。" + "value" : "关联触发键" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "按一下來遍歷循環操作。" + "value" : "關聯觸發鍵" } } } }, - "Link Trigger Key" : { - "comment" : "A button that links a trigger key to an action's keybind.", + "Linked keybind not found" : { + "comment" : "An error message displayed when a linked keybind cannot be resolved.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Link Trigger Key" + "value" : "Linked keybind not found" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Link Trigger Key" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Link Trigger Key" + "value" : "Linked keybind not found" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Link Trigger Key" + "value" : "Linked keybind not found" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Lier la touche d’activation" + "value" : "Impossible de résoudre le raccourci lié" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Collega tasti di attivazione" + "value" : "Impossibile trovare la scorciatoia collegata" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "トリガーキーをリンク" + "value" : "リンクされたキー設定が見つかりません" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "트리거 키 연결" + "value" : "연결된 키 바인딩을 확인하지 못했습니다" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Trigger-toets koppelen" + "value" : "Gelinkte toetscombinatie ophalen mislukt" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Przypisz klawisz aktywujący" + "value" : "Nie udało się odnaleźć powiązanego skrótu klawiszowego" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Vincular Tecla de Ativação" + "value" : "Falha ao resolver tecla vinculada" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Привязать клавишу активации" + "value" : "Не удалось определить связанную клавишу" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "关联触发键" + "value" : "无法解析关联的快捷键" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "關聯觸發鍵" + "value" : "無法解析關聯的按鍵綁定" } } } @@ -13761,7 +15270,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous ne l'avez pas encore !" + "value" : "Vous ne l’avez pas encore !" } }, "it" : { @@ -13849,7 +15358,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Qui pensez-vous être pour essayer d'accéder à ces icônes top secrètes ?" + "value" : "Pour qui vous prenez-vous, à vouloir accéder à ces icônes top secrètes ?" } }, "it" : { @@ -13937,7 +15446,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "La patience est une vertu, et votre clé pour cette icône." + "value" : "La patience est une vertu… et la clé de cette icône." } }, "it" : { @@ -13961,7 +15470,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Zwanst na nie!" + "value" : "Geduld is een deugd, en jouw sleutel tot dit icoon." } }, "pl" : { @@ -14025,7 +15534,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Cette icône est verrouillée, mais pas votre potentiel !" + "value" : "Cette icône est verrouillée, mais pas votre potentiel !" } }, "it" : { @@ -14125,7 +15634,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を続ければ、このアイコンもすぐに手に入るよ。" + "value" : "Loopを続ければ、このアイコンもすぐに手に入るよ。" } }, "ko" : { @@ -14201,7 +15710,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Cette icône est encore sous couverture, restez à l'écoute !" + "value" : "Cette icône est encore tenue secrète, restez à l’écoute !" } }, "it" : { @@ -14289,7 +15798,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Certaines icônes valent la peine d'attendre, n'est-ce pas ?" + "value" : "Certaines icônes valent la peine d’attendre, n’est-ce pas ?" } }, "it" : { @@ -14377,7 +15886,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas encore, mais vous êtes plus près qu'hier !" + "value" : "Pas encore, mais vous êtes plus près qu’hier !" } }, "it" : { @@ -14465,7 +15974,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déverrouiller cette icône n'est qu'une question de temps et de Loops." + "value" : "Déverrouiller cette icône n’est qu’une question de temps et de Loops." } }, "it" : { @@ -14477,7 +15986,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このアイコンをアンロックするには、時間と Loop が必要なだけ。" + "value" : "このアイコンをアンロックするには、時間とLoopが必要なだけ。" } }, "ko" : { @@ -14729,7 +16238,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Continuez votre bon travail, et cette icône sera votre récompense." + "value" : "Continuez comme ça, et cette icône sera votre récompense." } }, "it" : { @@ -14905,7 +16414,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Votre voyage n'est pas encore terminé, cette icône vous attend à la fin." + "value" : "Votre voyage n’est pas encore terminé, cette icône vous attend à la fin." } }, "it" : { @@ -15081,7 +16590,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Patience, jeune Looper, cette icône n'est pas loin." + "value" : "Patience, jeune Looper, cette icône n’est pas loin." } }, "it" : { @@ -15169,7 +16678,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Le voyage de mille Loop commence par un seul pas." + "value" : "Un voyage de mille Loops commence toujours par un premier pas." } }, "it" : { @@ -15181,7 +16690,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "千の Loop の旅も、最初の一歩から始まる。" + "value" : "千のLoopの旅も、最初の一歩から始まる。" } }, "ko" : { @@ -15269,7 +16778,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop の一つ一つが、待つ宝物に近づけてくれる。" + "value" : "Loopのひとつひとつが、待っている宝物へと君を近づける。" } }, "ko" : { @@ -15357,7 +16866,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を重ねるたびに、このアイコンのロックは緩んでいく。" + "value" : "Loopを重ねるたびに、このアイコンのロックは緩んでいく。" } }, "ko" : { @@ -15445,7 +16954,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を重ねるごとに、君の努力が成功への鍵を刻む。" + "value" : "Loopを重ねるごとに、君の努力が成功への鍵を刻む。" } }, "ko" : { @@ -15521,7 +17030,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Les icônes ne sont pas débloquées par défaut ; elles sont gagnées Loop après Loop." + "value" : "Les icônes ne se débloquent pas comme ça : elles se méritent, Loop après Loop." } }, "it" : { @@ -15533,7 +17042,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アイコンはただアンロックされるだけじゃない、Loop ごとに勝ち取るものだ。" + "value" : "アイコンはただアンロックされるだけじゃない、Loopごとに勝ち取るものだ。" } }, "ko" : { @@ -15621,7 +17130,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop が積み重なると同時に、君のアイコンコレクションも増えていく。" + "value" : "Loopが積み重なると同時に、君のアイコンコレクションも増えていく。" } }, "ko" : { @@ -15785,7 +17294,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Votre persévérance a Looper est la passe-partout de toutes les icônes." + "value" : "Votre assiduité à utiliser Loop est le passe-partout de toutes les icônes." } }, "it" : { @@ -15797,7 +17306,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を続ける君の粘りが、すべてのアイコンのマスターキーだ。" + "value" : "Loopを続ける君の粘りが、すべてのアイコンのマスターキーだ。" } }, "ko" : { @@ -15873,7 +17382,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Loop autour des obstacles ; votre récompense est juste derrière." + "value" : "Contournez les obstacles, Loop après Loop ; votre récompense est juste derrière." } }, "it" : { @@ -15885,7 +17394,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "障害を Loop しろ、君の報酬はその先にある。" + "value" : "障害はLoopでかわせ。報酬はその先にある。" } }, "ko" : { @@ -15973,7 +17482,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を重ねるたびに、アイコンが育つ種をまいているんだよ。" + "value" : "Loopを重ねるたびに、アイコンが育つ種をまいているんだよ。" } }, "ko" : { @@ -16061,7 +17570,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "月の満ち欠けのように、君のアイコンは Loop の周期ごとに姿を現す。" + "value" : "月の満ち欠けのように、君のアイコンはLoopの周期ごとに姿を現す。" } }, "ko" : { @@ -16149,7 +17658,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アイコンは待っている、まだ踏まれていない Loop のヴェールの向こうに。" + "value" : "アイコンは待っている、まだ見ぬLoopのヴェールの向こうに。" } }, "ko" : { @@ -16336,7 +17845,7 @@ "other" : { "stringUnit" : { "state" : "translated", - "value" : "残り %lld 回の Loop" + "value" : "残り%lld回の Loop" } } } @@ -16518,7 +18027,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS 中央" + "value" : "macOSの中央に配置" } }, "ko" : { @@ -16565,72 +18074,66 @@ } } }, - "macOS's \"Tile by dragging windows to screen edges\" feature is currently\nenabled, which will conflict with Loop's window snapping functionality." : { + "macOS’s “Tile by dragging windows to screen edges” is turned on,\nwhich conflicts with Loop’s window snapping." : { "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "macOS's \"Tile by dragging windows to screen edges\" feature is currently\nenabled, which will conflict with Loop's window snapping functionality." + "value" : "macOS’s “Tile by dragging windows to screen edges” is turned on,\nwhich conflicts with Loop’s window snapping." } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Die Funktion \"Fenster zum Anordnen an Bildschirmrand ziehen\" ist in den macOS Einstellungen aktiviert, was zu Konflikten mit der Fenster-Snap Funktion führt." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "macOS's \"Tile by dragging windows to screen edges\" feature is currently\nenabled, which will conflict with Loop's window snapping functionality." + "value" : "Die Funktion „Fenster zum Anordnen an Bildschirmrand ziehen“ ist in den macOS Einstellungen aktiviert, was zu Konflikten mit der Fenster-Snap Funktion führt." } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "macOS's \"Tile by dragging windows to screen edges\" feature is currently\nenabled, which will conflict with Loop's window snapping functionality." + "value" : "macOS’s “Tile by dragging windows to screen edges” is turned on,\nwhich conflicts with Loop’s window snapping." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "La fonctionnalité macOS \"Faire glisser les fenêtres vers les bords de l'écran pour créer une mosaïque\" est actuellement activée, ce qui entre en conflit avec le magnétisme des fenêtres de Loop." + "value" : "La fonctionnalité macOS « Faire glisser les fenêtres vers les bords de l’écran pour créer une mosaïque » est actuellement\nactivée, ce qui entre en conflit avec le magnétisme des fenêtres de Loop." } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "La funzione \"Disponi le finestre a mosaico trascinandole verso i bordi dello schermo\" di macOS\nè attualmente abilitata, creando conflitto con la funzionalità \"Aggancia ai bordi\" di Loop." + "value" : "La funzione “Disponi le finestre a mosaico trascinandole verso i bordi dello schermo” di macOS\nè attualmente abilitata, creando conflitto con la funzionalità “Aggancia ai bordi” di Loop." } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS の “ウインドウを画面端にドラッグしてタイル配置” 機能が\n現在有効になっており、Loop のウインドウスナップ機能と競合します。" + "value" : "macOSの「ウインドウを画面の端にドラッグしてタイル表示」機能が\n現在有効になっており、Loopのウインドウスナップ機能と競合します。" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "macOS의 \"창을 화면 가장자리로 드래그하여 타일 배치\" 기능이 현재 활성화되어 있으며, 이는 Loop의 창 스냅 기능과 충돌할 수 있습니다." + "value" : "macOS의 “창을 화면 가장자리로 드래그하여 타일 배치” 기능이 현재 활성화되어 있으며, 이는 Loop의 창 스냅 기능과 충돌할 수 있습니다." } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "MacOS' \"Sleep vensters naar de linker- of rechterrand van het scherm om te plaatsen\"-functie is actief, wat conflicteert met de vastgrijpfunctie van Loop" + "value" : "MacOS' “Sleep vensters naar de linker- of rechterrand van het scherm om te plaatsen”-functie is actief, wat conflicteert met de vastgrijpfunctie van Loop" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Funkcja macOS \"Dokuj okna, przeciągając je do lewej lub prawej krawędzi ekranu\" jest obecnie włączona, co będzie kolidowało z funkcją przyciągania okien Loop." + "value" : "Funkcja macOS „Dokuj okna, przeciągając je do lewej lub prawej krawędzi ekranu” jest obecnie włączona, co będzie kolidowało z funkcją przyciągania okien Loop." } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "a funcionalidade do macOS \"Organizar janelas ao arrastar para as bordas da tela\" está atualmente ativada, o que entra em conflito com a funcionalidade de alinhamento de janelas do Loop." + "value" : "a funcionalidade do macOS “Organizar janelas ao arrastar para as bordas da tela” está atualmente ativada, o que entra em conflito com a funcionalidade de alinhamento de janelas do Loop." } }, "ru" : { @@ -16653,6 +18156,260 @@ } } }, + "Magnify" : { + "comment" : "Gesture category label: magnify", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Magnify" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Zoom" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ピンチ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Magnify" + } + } + } + }, + "Match target window" : { + "comment" : "Toggle that makes the preview's corner radius match the target window's.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Match target window" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Eckenradius des gewählten Fensters priorisieren" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Match target window" + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Prioriser le rayon des coins de la fenêtre sélectionnée" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Dai priorità al raggio degli angoli della finestra" + } + }, + "ja" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "選択中のウインドウのコーナーの丸みを優先" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "선택한 창의 모서리 반경 우선" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Hoekradius van geselecteerde venster prioriseren" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Match target window" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Priorizar raio de canto da janela selecionada" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Установить приоритет скругления для выбранного окна" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "优先使用已选窗口的圆角半径" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "優先使用已選視窗的圓角半徑" + } + } + } + }, + "Match Wallpaper" : { + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "مزامنة خلفية الشاشة" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hintergrundbild synchronisieren" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sincronizar fondo" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Synchroniser avec le fond d’écran" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sincronizza sfondo" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "壁紙を同期" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "배경화면 동기화" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Achtergrond synchroniseren" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Synchronizuj tapetę" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sincronizar plano de fundo" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Синхронизировать с обоями" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "同步墙纸" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "同步牆紙" + } + } + } + }, "Maximize" : { "comment" : "Window action", "localizations" : { @@ -16772,7 +18529,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Hauteur max" + "value" : "Maximiser la hauteur" } }, "it" : { @@ -16861,7 +18618,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Largeur max" + "value" : "Maximiser la largeur" } }, "it" : { @@ -16949,7 +18706,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Clic central pour activer" + "value" : "Activer par clic central" } }, "it" : { @@ -17050,7 +18807,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "最小化" + "value" : "しまう" } }, "ko" : { @@ -17139,7 +18896,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "他を最小化" + "value" : "ほかをしまう" } }, "ko" : { @@ -17151,7 +18908,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Andere minimaliseren" + "value" : "Anderen minimaliseren" } }, "pl" : { @@ -17364,94 +19121,6 @@ } } }, - "Move cursor with window" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "حرك المؤشر مع النافذة" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mauszeiger mit Fenster bewegen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Move cursor with window" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mover cursor con la ventana" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Déplacer le curseur avec la fenêtre" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sposta il cursore con la finestra" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ウインドウに合わせてカーソルを移動" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "창과 함께 커서 이동" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Beweeg de cursor met het venster" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Przesuń kursor wraz z oknem" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mover cursor com a janela" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Перемещать курсор за окном" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "随窗口移动光标" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "隨視窗移動游標" - } - } - } - }, "Move Down" : { "comment" : "Window action", "localizations" : { @@ -17571,7 +19240,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déplacer à droite" + "value" : "Déplacer à gauche" } }, "it" : { @@ -17749,7 +19418,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déplacer vers le dossier Applications ?" + "value" : "Déplacer vers le dossier Applications ?" } }, "it" : { @@ -17791,7 +19460,7 @@ "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Переместить в папку \"Приложения\"?" + "value" : "Переместить в папку «Приложения»?" } }, "zh-Hans" : { @@ -17808,6 +19477,89 @@ } } }, + "Move to cursor’s screen" : { + "comment" : "Toggle to move the window to the screen containing the cursor.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "استخدام الشاشة مع المؤشر" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Bildschirm mit Mauszeiger verwenden" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Usar la pantalla del cursor" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Déplacer la fenêtre sur l’écran où se trouve le curseur" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Usa schermo con cursore" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "カーソルのあるディスプレイにウインドウを移動" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "커서가 있는 화면 사용" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Scherm met cursor gebruiken" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Przenieś okno na ekran kursora" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Usar a tela com o cursor" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Использовать экран с курсором" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "使用光标所在的屏幕" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "使用游標所在的屏幕" + } + } + } + }, "Move to Desktop %lld" : { "comment" : "Window action; moves the current window to the Mission Control desktop identified by the number.", "localizations" : { @@ -17838,13 +19590,13 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déplacer sur le bureau %lld" + "value" : "Déplacer vers le Bureau %lld" } }, "it" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Desktop %lld" + "state" : "translated", + "value" : "Sposta %lld nel desktop" } }, "ja" : { @@ -17861,8 +19613,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Desktop %lld" + "state" : "translated", + "value" : "Verplaatsen naar Bureaublad %lld" } }, "pl" : { @@ -17927,19 +19679,19 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Espace suivant" + "value" : "Space suivant" } }, "it" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Next Space" + "state" : "translated", + "value" : "Sposta nello spazio successivo" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "次のスペース" + "value" : "次の操作スペースへ移動" } }, "ko" : { @@ -17950,8 +19702,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Next Space" + "state" : "translated", + "value" : "Verplaatsen naar volgende Space" } }, "pl" : { @@ -18016,19 +19768,19 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Espace précédent" + "value" : "Space précédent" } }, "it" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Previous Space" + "state" : "translated", + "value" : "Sposta nello spazio precedente" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "前のスペース" + "value" : "前の操作スペースへ移動" } }, "ko" : { @@ -18039,8 +19791,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Previous Space" + "state" : "translated", + "value" : "Verplaatsen naar vorige Space" } }, "pl" : { @@ -18164,356 +19916,354 @@ } } }, - "Move window to cursor's screen" : { + "Next Screen" : { + "comment" : "Window action", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "استخدام الشاشة مع المؤشر" + "value" : "الشاشة التالية" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Bildschirm mit Mauszeiger verwenden" + "value" : "Nächster Bildschirm" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Move window to cursor's screen" + "value" : "Next Screen" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Usar la pantalla del cursor" + "value" : "Siguiente pantalla" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déplacer la fenêtre sur l’écran où se trouve le curseur" + "value" : "Écran suivant" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Usa schermo con cursore" + "value" : "Schermata successiva" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソルの画面にウインドウを移動" + "value" : "次のディスプレイ" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "커서가 있는 화면 사용" + "value" : "다음 화면" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Scherm met cursor gebruiken" + "value" : "Volgende scherm" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Przenieś okno na ekran kursora" + "value" : "Następny ekran" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Usar a tela com o cursor" + "value" : "Próxima Tela" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Использовать экран с курсором" + "value" : "Следующий экран" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "使用光标所在的屏幕" + "value" : "下一个屏幕" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "使用游標所在的屏幕" + "value" : "下一個屏幕" } } } }, - "Next Screen" : { - "comment" : "Window action", + "Next/previous screen order" : { + "comment" : "Label for the picker that sets the order the Next Screen and Previous Screen actions go through screens in" + }, + "No Action" : { + "comment" : "Window action: no selection", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "الشاشة التالية" + "value" : "لا يوجد إجراء" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Nächster Bildschirm" + "value" : "Keine Aktion" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Next Screen" + "value" : "No Action" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Siguiente pantalla" + "value" : "Sin acción" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Écran suivant" + "value" : "Aucune action" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Schermata successiva" + "value" : "Nessuna azione" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "次の画面" + "value" : "アクションなし" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "다음 화면" + "value" : "작업 없음" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Volgende scherm" + "value" : "Geen Actie" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Następny ekran" + "value" : "Brak akcji" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Próxima Tela" + "value" : "Sem Ação" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Следующий экран" + "value" : "Не назначено" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "下一个屏幕" + "value" : "无操作" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "下一個屏幕" + "value" : "無操作" } } } }, - "No Action" : { - "comment" : "Window action: no selection", + "No excluded apps" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "لا يوجد إجراء" + "value" : "لا توجد تطبيقات مستبعدة" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Keine Aktion" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "No Action" + "value" : "Keine ausgeschlossenen Anwendungen" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Sin acción" + "value" : "No hay aplicaciones excluidas" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas d'action" + "value" : "Aucune application ignorée" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Nessuna azione" + "value" : "Nessuna applicazione esclusa" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "動作なし" + "value" : "除外されたアプリはありません" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "작업 없음" + "value" : "제외된 애플리케이션 없음" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Geen Actie" + "value" : "Geen uitgesloten apps" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Brak akcji" + "value" : "Brak wykluczonych aplikacji" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Sem Ação" + "value" : "Sem aplicações excluídas" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Не назначено" + "value" : "Нет игнорируемых приложений" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "无操作" + "value" : "无排除的应用" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "無操作" + "value" : "無排除的應用程式" } } } }, - "No excluded applications" : { + "No gestures" : { + "comment" : "Empty state title in gestures settings", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "لا توجد تطبيقات مستبعدة" + "state" : "needs_review", + "value" : "No gestures" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Keine ausgeschlossenen Anwendungen" + "state" : "needs_review", + "value" : "No gestures" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "No excluded applications" + "value" : "No gestures" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "No hay aplicaciones excluidas" + "state" : "needs_review", + "value" : "No gestures" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas d'applications ignorées" + "value" : "Aucun geste" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Nessuna applicazione esclusa" + "state" : "needs_review", + "value" : "No gestures" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "除外されたアプリはありません" + "value" : "ジェスチャはありません" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "제외된 애플리케이션 없음" + "state" : "needs_review", + "value" : "No gestures" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Geen uitgesloten apps" + "state" : "needs_review", + "value" : "No gestures" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Brak wykluczonych aplikacji" + "state" : "needs_review", + "value" : "No gestures" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Sem aplicações excluídas" + "state" : "needs_review", + "value" : "No gestures" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Нет игнорируемых приложений" + "state" : "needs_review", + "value" : "No gestures" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "无排除的应用" + "state" : "needs_review", + "value" : "No gestures" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "無排除的應用程式" + "state" : "needs_review", + "value" : "No gestures" } } } @@ -18547,7 +20297,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de raccourcis" + "value" : "Aucun raccourci" } }, "it" : { @@ -18636,7 +20386,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Aucun raccourci clavier n'a été défini" + "value" : "Aucun raccourci n’a été défini" } }, "it" : { @@ -18725,7 +20475,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas d’actions du menu radial" + "value" : "Aucune action du menu radial" } }, "it" : { @@ -18813,7 +20563,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Engagez ! … avec la version actuelle. C’est la plus récente." + "value" : "Engagez ! … avec la version actuelle. C’est la plus récente." } }, "it" : { @@ -18901,7 +20651,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Cette appli est mieux tenue à jour que mon journal intime !" + "value" : "Cette appli est mieux tenue à jour que mon journal intime !" } }, "it" : { @@ -18925,7 +20675,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Deze app is actueler dan mijn dagboekaantekeningen!" } }, "pl" : { @@ -18989,7 +20739,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ciel dégagé : aucune mise à jour à l’horizon !" + "value" : "Ciel dégagé : aucune mise à jour à l’horizon !" } }, "it" : { @@ -19013,7 +20763,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Je kunt gerust zijn, geen updates te zien in de pijplijn!" } }, "pl" : { @@ -19077,7 +20827,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Que la chance soit toujours avec vous… pas de mise à jour aujourd’hui !" + "value" : "Que la chance soit toujours avec vous… pas de mise à jour aujourd’hui !" } }, "it" : { @@ -19177,7 +20927,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop をなめると痛い目に遭うぞ。" + "value" : "Loopをなめると痛い目に遭うぞ。" } }, "ko" : { @@ -19253,7 +21003,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Une nouvelle version ? Non merci, on adore celle-là." + "value" : "Une nouvelle version ? Non merci, on adore celle-là." } }, "it" : { @@ -19277,7 +21027,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Nieuwe versie? Sorry, we zijn te gehecht aan deze." } }, "pl" : { @@ -19353,7 +21103,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop 更新?笑止千万。" + "value" : "Loop更新?笑止千万。" } }, "ko" : { @@ -19517,7 +21267,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Dans une galaxie lointaine, très lointaine… toujours pas de mise à jour !" + "value" : "Dans une galaxie lointaine, très lointaine… toujours pas de mise à jour !" } }, "it" : { @@ -19541,7 +21291,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "In een sterrenstelsel hier ver ver vandaan.. nog steeds geen updates!" } }, "pl" : { @@ -19605,7 +21355,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous possédez le précieux. Nul besoin de mise à jour !" + "value" : "Vous possédez le précieux. Nul besoin de mise à jour !" } }, "it" : { @@ -19617,7 +21367,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を舐めるな。" + "value" : "Loopを舐めるな。" } }, "ko" : { @@ -19629,7 +21379,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Je hebt al de top, geen updates nodig." + "value" : "Je hebt al de lieveling, geen updates nodig!" } }, "pl" : { @@ -19693,7 +21443,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "À vitesse lumière… aucune mise à jour en vue !" + "value" : "À vitesse lumière… aucune mise à jour en vue !" } }, "it" : { @@ -19781,7 +21531,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ça n'est pas la mise à jour que vous recherchez !" + "value" : "Ça n’est pas la mise à jour que vous recherchez !" } }, "it" : { @@ -19845,7 +21595,7 @@ "ar" : { "stringUnit" : { "state" : "translated", - "value" : "لقد أضعنا زر \"التحديث\". عذراً!" + "value" : "لقد أضعنا زر «التحديث». عذراً!" } }, "de" : { @@ -19863,25 +21613,25 @@ "es" : { "stringUnit" : { "state" : "translated", - "value" : "Hemos perdido el botón \"Actualizar\". ¡Uy!" + "value" : "Hemos perdido el botón “Actualizar”. ¡Uy!" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "On a égaré le bouton “Mettre à jour”. Oups !" + "value" : "On a égaré le bouton « Mettre à jour ». Oups !" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Abbiamo smarrito il pulsante \"Aggiorna\". Ops!" + "value" : "Abbiamo smarrito il pulsante “Aggiorna”. Ops!" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アップデート”ボタンを紛失しました。おっと!" + "value" : "「アップデート」ボタンを紛失しました。おっと!" } }, "ko" : { @@ -19911,7 +21661,7 @@ "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Мы поставили кнопку \"Обновить\" не туда. Упс!" + "value" : "Мы поставили кнопку «Обновить» не туда. Упс!" } }, "zh-Hans" : { @@ -19957,7 +21707,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Je te jure que c’était là… une seconde." + "value" : "Je vous jure que c’était là… une seconde." } }, "it" : { @@ -20057,7 +21807,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "1日1個のリンゴが…アップデートを遠ざける。" + "value" : "1日1個のリンゴが…アップデートを遠ざける。" } }, "ko" : { @@ -20133,7 +21883,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Que la Force soit avec vous… la prochaine fois !" + "value" : "Que la Force soit avec vous… la prochaine fois !" } }, "it" : { @@ -20221,7 +21971,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "La Force est puissante avec cette version !" + "value" : "La Force est puissante avec cette version !" } }, "it" : { @@ -20497,7 +22247,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 甘い夢は作られる…アップデートなしで。" + "value" : "甘い夢は作られる…アップデートなしで。" } }, "ko" : { @@ -20585,7 +22335,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を更新する?甘く見ないで。" + "value" : "Loopを更新する?甘く見ないで。" } }, "ko" : { @@ -20661,7 +22411,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Restez vigilant, d’autres infos arrivent bientôt !" + "value" : "Restez vigilant, d’autres infos arrivent bientôt !" } }, "it" : { @@ -20673,7 +22423,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 鋭くあれ、さらなる情報はすぐ来る!" + "value" : "油断するな、新情報はまもなく届く!" } }, "ko" : { @@ -20685,7 +22435,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Blijf scherp, er komt binnenkort meer informatie!" } }, "pl" : { @@ -20749,7 +22499,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous êtes déjà à la pointe de la technologie !" + "value" : "Vous êtes déjà à la pointe de la technologie !" } }, "it" : { @@ -20761,7 +22511,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 君は最新テックをクルーズ中!" + "value" : "最新テクノロジーで快適にクルーズ中!" } }, "ko" : { @@ -20773,7 +22523,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Je draait op de nieuwste technologie!" } }, "pl" : { @@ -20849,7 +22599,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 我々は戻って来る。アップデートと共に…後で。" + "value" : "我々は戻って来る。アップデートと共に…後で。" } }, "ko" : { @@ -20861,7 +22611,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "We komen terug.. met updates.. later" } }, "pl" : { @@ -20925,7 +22675,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Un sou pour ton… absence de mises à jour." + "value" : "Un sou pour votre… absence de mises à jour." } }, "it" : { @@ -20937,7 +22687,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop 更新の道は、果てしなく険しい。" + "value" : "Loop更新の道は、果てしなく険しい。" } }, "ko" : { @@ -21013,7 +22763,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez déjà la meilleure version de Loop !" + "value" : "Vous avez déjà la meilleure version de Loop !" } }, "it" : { @@ -21025,7 +22775,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "君はもう最高の Loop を手にしてる!" + "value" : "君はもう最高のLoopを手にしてる!" } }, "ko" : { @@ -21113,7 +22863,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を更新するのは、富士山に登るより難しい。" + "value" : "Loopを更新するのは、富士山に登るより難しい。" } }, "ko" : { @@ -21277,7 +23027,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tout vient à point à qui sait attendre... les mises à jour." + "value" : "Tout vient à point à qui sait attendre… les mises à jour." } }, "it" : { @@ -21289,7 +23039,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "石の上にも三年… Loop 更新にはまだ早い。" + "value" : "石の上にも三年…Loop更新にはまだ早い。" } }, "ko" : { @@ -21377,7 +23127,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "99の問題があったとしても、アップデートはその1つじゃない。" + "value" : "99の問題があったとしても、アップデートはその1つじゃない。" } }, "ko" : { @@ -21541,7 +23291,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez atteint le niveau max !" + "value" : "Vous avez atteint le niveau max !" } }, "it" : { @@ -21817,7 +23567,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 新たな情報なし、司令官。" + "value" : "新たな情報なし、司令官。" } }, "ko" : { @@ -21893,7 +23643,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de mises à jour ? Nom de Zeus !" + "value" : "Pas de mise à jour ? Nom de Zeus !" } }, "it" : { @@ -21981,7 +23731,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de mise à jour, Mr Anderson" + "value" : "Pas de mise à jour, monsieur Anderson" } }, "it" : { @@ -22069,7 +23819,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de mises à jour à Ba Sing Se" + "value" : "Pas de mise à jour à Ba Sing Se" } }, "it" : { @@ -22157,7 +23907,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Des mises à jour ? Avec la conjoncture actuelle ?" + "value" : "Des mises à jour ? Avec la conjoncture actuelle ?" } }, "it" : { @@ -22245,7 +23995,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Revenez plus tard !" + "value" : "Revenez plus tard !" } }, "it" : { @@ -22333,7 +24083,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Loop fonctionne à plein régime !" + "value" : "Loop fonctionne à plein régime !" } }, "it" : { @@ -22345,7 +24095,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop は全盛期だ!" + "value" : "Loopは全盛期だ!" } }, "ko" : { @@ -22421,7 +24171,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tous les systèmes sont opérationnels !" + "value" : "Tous les systèmes sont opérationnels !" } }, "it" : { @@ -22509,7 +24259,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous êtes à jour :)" + "value" : "Vous êtes à jour :)" } }, "it" : { @@ -22597,7 +24347,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Aucune mise à jour pour le moment !" + "value" : "Aucune mise à jour pour le moment !" } }, "it" : { @@ -22773,7 +24523,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "La séquence est vide" + "value" : "Aucun élément dans la séquence" } }, "it" : { @@ -22785,7 +24535,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "繰り返す項目はありません" + "value" : "サイクルする項目はありません" } }, "ko" : { @@ -22842,79 +24592,79 @@ }, "de" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "%@'s Benachrichtigungen wurden deaktiviert." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "%@'s notification permissions are currently disabled." + "value" : "Notifications for %@ are turned off." } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "La¡os permisos de notificaciones de %@ están desactivados." } }, "fr" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "%@ n’a pas l’autorisation d’envoyer des notifications pour le moment." } }, "it" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "I permessi di notifica per %@ sono attualmente disabilitati." } }, "ja" : { "stringUnit" : { - "state" : "translated", - "value" : "%@ の通知権限は現在無効になっています。" + "state" : "needs_review", + "value" : "%@の通知は現在許可されていません。" } }, "ko" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "%@의 알림 권한이 현재 비활성화되어 있습니다." } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "%@’s melding toestemmingen zijn uitgeschakeld." } }, "pl" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Uprawnienia do powiadomień %@ są obecnie wyłączone." } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "As notificações de %@ está desabilitadas." } }, "ru" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Вы не дали %@ разрешение на отправку уведомлений." } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "%@的通知权限目前已被禁用。" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "%@的通知權限目前已被禁用。" } } @@ -22925,31 +24675,31 @@ "ar" : { "stringUnit" : { "state" : "translated", - "value" : "فتح الإعدادات" + "value" : "فتح إعدادات النظام" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Einstellungen öffnen" + "value" : "Systemeinstellungen öffnen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Open Settings" + "value" : "Open System Settings" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Abrir Ajustes" + "value" : "Abrir Ajustes del Sistema" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ouvrir les réglages" + "value" : "Ouvrir Réglages Système" } }, "it" : { @@ -22961,49 +24711,49 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "設定を開く" + "value" : "システム設定を開く" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "설정 열기" + "value" : "시스템 설정 열기" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Instellingen openen" + "value" : "Open Systeeminstellingen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Otwórz Ustawienia" + "value" : "Otwórz Ustawienia systemowe" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Abrir Configurações" + "value" : "Abrir Ajustes do Sistema" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Открыть настройки" + "value" : "Открыть Системные настройки" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "打开设置" + "value" : "打开系统设置" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "打開設置" + "value" : "打開「系統設定」" } } } @@ -23018,85 +24768,86 @@ }, "de" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Bitte schalte dies in den Einstellungen ein." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Please turn them on in System Settings." + "value" : "Turn them on in System Settings." } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Actívalos en la configuración del sistema." } }, "fr" : { "stringUnit" : { - "state" : "translated", - "value" : "Activez-les dans les réglages système." + "state" : "needs_review", + "value" : "Activez-les dans Réglages Système." } }, "it" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Per favore attivale nelle Impostazioni di Sistema." } }, "ja" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "システム設定で有効にしてください。" } }, "ko" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "시스템 설정에서 활성화해 주세요." } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Schakel ze in bij Systeeminstellingen." } }, "pl" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Włącz je w ustawieniach systemowych." } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Por favor, ligue-as nos Ajustes." } }, "ru" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Включите их в Настройках." } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "请在系统设置中开启。" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "請在系統設置中打開。" } } } }, - "Notify when unlocking new icons" : { + "Notify when new icons are unlocked" : { + "comment" : "Toggle that sends a notification when a new app icon is unlocked.", "localizations" : { "ar" : { "stringUnit" : { @@ -23110,12 +24861,6 @@ "value" : "Benachrichtige mich beim freischalten neuer App Icons" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Notify when unlocking new icons" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -23137,7 +24882,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "新しいアイコンを解除したときに通知" + "value" : "新しいアイコンをアンロックしたときに通知" } }, "ko" : { @@ -23272,91 +25017,85 @@ } } }, - "Options" : { - "comment" : "Section header shown in settings", + "Open System Settings" : { + "comment" : "Button in the alert asking for Accessibility permission", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "الخيارات" + "value" : "فتح إعدادات النظام" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Optionen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Options" + "value" : "Systemeinstellungen öffnen" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Opciones" + "value" : "Abrir Ajustes del Sistema" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Options" + "value" : "Ouvrir Réglages Système" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Opzioni" + "value" : "Apri Impostazioni di Sistema" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "オプション" + "value" : "システム設定を開く" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "옵션" + "value" : "시스템 설정 열기" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Opties" + "value" : "Open Systeeminstellingen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Opcje" + "value" : "Otwórz Ustawienia systemowe" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Opções" + "value" : "Abrir Ajustes do Sistema" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Настройки" + "value" : "Открыть Системные настройки" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "选项" + "value" : "打开系统设置" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "選項" + "value" : "打開「系統設定」" } } } @@ -23390,7 +25129,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Marge" + "value" : "Marges" } }, "it" : { @@ -23479,7 +25218,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Taille d’aperçu" + "value" : "Taille de la partie visible" } }, "it" : { @@ -23491,7 +25230,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "覗きサイズ" + "value" : "表示部分のサイズ" } }, "ko" : { @@ -23568,7 +25307,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Permissions" + "value" : "Autorisations" } }, "it" : { @@ -23580,7 +25319,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "権限" + "value" : "アクセス権" } }, "ko" : { @@ -23627,91 +25366,91 @@ } } }, - "Please include at least one modifier key." : { - "comment" : "An error message displayed when a custom keybind is created but does not include at least one modifier key.", + "Pinch" : { + "comment" : "Gesture kind: pinch (fingers move together, zooming out)\nMagnify gesture picker option: pinch", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Please include at least one modifier key." + "value" : "Pinch" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Please include at least one modifier key." + "value" : "Pinch" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Please include at least one modifier key." + "value" : "Pinch" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Please include at least one modifier key." + "value" : "Pinch" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Veuillez inclure au moins une touche de modification." + "value" : "Pincer" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Includi almeno un tasto modificatore." + "state" : "needs_review", + "value" : "Pinch" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "少なくとも1つの修飾キーを含めてください。" + "value" : "ピンチイン" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "하나 이상의 보조 키를 포함해 주세요." + "state" : "needs_review", + "value" : "Pinch" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Voeg ten minste één aanpassingstoets toe." + "state" : "needs_review", + "value" : "Pinch" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Proszę podać co najmniej jeden klawisz." + "state" : "needs_review", + "value" : "Pinch" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Por favor, inclua pelo menos uma tecla modificadora." + "state" : "needs_review", + "value" : "Pinch" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Пожалуйста, используйте хотя бы одну специальную клавишу." + "state" : "needs_review", + "value" : "Pinch" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "请包含至少一个修饰键。" + "state" : "needs_review", + "value" : "Pinch" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "請包括至少一個修飾鍵。" + "state" : "needs_review", + "value" : "Pinch" } } } @@ -23833,7 +25572,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Conserver les dimensions" + "value" : "Conserver la taille" } }, "it" : { @@ -23892,355 +25631,85 @@ } } }, - "Press \"Add\" to add a cycle item" : { + "Prevent Mission Control at top edge" : { + "comment" : "Toggle that prevents Mission Control from opening when a window is dragged to the top edge of the screen.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Press \"Add\" to add a cycle item" + "value" : "Prevent Mission Control at top edge" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Drücke \"Hinzufügen\" um etwas in den Zyklus hinzuzufügen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Press \"Add\" to add a cycle item" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Presiona \"añadir\" para añadir a la rotación " - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter un élément à la séquence." - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Premi “Aggiungi” per aggiungere un elemento da ciclare" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "「追加」を押すと、新しい繰り返し項目を追加できます。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "순환 항목을 추가하려면 \"추가\"를 누르세요" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Druk op “Toevoegen” om een cyclusitem toe te voegen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Naciśnij \"Dodaj\", aby dodać element cyklu" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Pressione \"adicionar\" para adicionar um item ao ciclo" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Нажмите \"Добавить\", чтобы добавить элементы цикла" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "点按“添加”以添加循环内容" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "點按“添加”來添加循環內容" - } - } - } - }, - "Press \"Add\" to add a keybind" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "اضغط على \"إضافة\" لإضافة مفتاح" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Drücke \"Hinzufügen\" um eine Tastenbelegung hinzuzufügen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Press \"Add\" to add a keybind" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Presiona añadir para añadir una combinación de teclas " - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter un raccourci" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Premi “Aggiungi” per aggiungere una scorciatoia" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "「追加」を押すと、新しいキー設定を追加できます。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "키 바인딩을 추가하려면 \"추가\"를 누르세요" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Druk op “Toevoegen” om een toetscombinatie toe te voegen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Naciśnij \"Dodaj\", aby dodać skrót klawiszowy" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Pressione \"Adicionar\" para adicionar um atalho" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Нажмите \"Добавить\", чтобы добавить сочетание клавиш" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "点按“添加”以添加快捷键" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "點按“添加”來添加按鍵綁定" - } - } - } - }, - "Press \"Add\" to add an action" : { - "comment" : "A description displayed below the list of radial menu actions, encouraging the user to add more.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add an action" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add an action" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Press \"Add\" to add an action" + "value" : "Mission Control unterdrücken" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Press \"Add\" to add an action" + "value" : "Prevent Mission Control at top edge" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter une action" + "value" : "Bloquer Mission Control" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Premi \"Aggiungi\" per aggiungere un'azione" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "「追加」を押すと、新しいアクションを追加できます。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "\"추가\"를 눌러 액션을 추가하세요." - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Klik op \"Toevoegen\" om een actie toe te voegen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Naciśnij \"Dodaj\", aby dodać akcję" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Pressione “Adicionar” para incluir uma ação" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Нажмите \"Добавить\", чтобы добавить действие" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "点按“添加”以添加操作" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "點按“添加”來添加操作" - } - } - } - }, - "Press \"Add\" to add an application" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "اضغط على \"إضافة\" لإضافة تطبيق" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Drücke \"Hinzufügen\" um eine Applikation hinzuzufügen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Press \"Add\" to add an application" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Presiona añadir para añadir una aplicación" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter une application" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Premi “Aggiungi” per aggiungere un'applicazione" + "value" : "Ignora Mission Control" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "「追加」を押すと、新しいアプリを追加できます。" + "value" : "Mission Controlを抑制" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "애플리케이션을 추가하려면 \"추가\"를 누르세요" + "value" : "Mission Control 억제" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Druk op “Toevoegen” om een applicatie toe te voegen" + "value" : "Mission Control onderdrukken" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Naciśnij \"Dodaj\", aby dodać aplikację" + "state" : "needs_review", + "value" : "Prevent Mission Control at top edge" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Pressione \"Adicionar\" para adicionar um aplicativo" + "value" : "Suprimir Controle de Missão" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Нажмите \"Добавить\", чтобы добавить приложение" + "value" : "Игнорировать Mission Control" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "点按“添加”以添加应用" + "value" : "禁用调度中心手势" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "點按“添加”來添加應用程式" + "value" : "禁用調度中心手勢" } } } @@ -24375,7 +25844,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "前の画面" + "value" : "前のディスプレイ" } }, "ko" : { @@ -24422,385 +25891,385 @@ } } }, - "Prioritize selected window’s corner radius" : { - "comment" : "Toggle that allows the user to prioritize the corner radius of the currently selected window over the default value.", + "px" : { + "comment" : "Unit symbol: pixels", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Prioritize selected window’s corner radius" + "state" : "translated", + "value" : "بكسل" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Eckenradius des gewählten Fensters priorisieren" + "value" : "px" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Prioritize selected window’s corner radius" + "value" : "px" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Prioritize selected window’s corner radius" + "value" : "px" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Prioriser le rayon des coins de la fenêtre sélectionnée" + "value" : "px" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Dai priorità al raggio degli angoli della finestra" + "value" : "px" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "選択中のウィンドウのコーナーの丸みを優先する" + "value" : "px" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "선택한 창의 모서리 반경 우선" + "value" : "픽셀" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Hoekradius van geselecteerde venster prioriseren" + "value" : "px" } }, "pl" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Prioritize selected window’s corner radius" + "state" : "translated", + "value" : "px" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Priorizar raio de canto da janela selecionada" + "value" : "px" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Установить приоритет скругления для выбранного окна" + "value" : "px" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "优先使用已选窗口的圆角半径" + "value" : "像素" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "優先使用已選視窗的圓角半徑" + "value" : "像素" } } } }, - "px" : { - "comment" : "Unit symbol: pixels", + "Quarters" : { + "comment" : "Section header in the action picker of the Keybinds tab", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "بكسل" + "value" : "أرباع" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Viertel" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Quarters" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "px" + "state" : "translated", + "value" : "Cuartos" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Quarts" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Quarti" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "4分割" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "픽셀" + "value" : "사분의 일" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Kwartalen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Ćwiartki" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Quadrantes" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "px" + "value" : "Четверти" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "像素" + "value" : "角落" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "像素" + "value" : "四等分" } } } }, - "Quarters" : { - "comment" : "Section header in the action picker of the Keybinds tab", + "Quit %@" : { + "comment" : "A button that quits the app.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "أرباع" + "state" : "needs_review", + "value" : "Quit %@" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Viertel" + "value" : "%@ beenden" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Quarters" + "value" : "Quit %@" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Cuartos" + "state" : "needs_review", + "value" : "Quit %@" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quart" + "value" : "Quitter %@" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Quarti" + "value" : "Esci da %@" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "4分割" + "value" : "%@を終了" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "사분의 일" + "value" : "종료 %@" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Kwartalen" + "value" : "Stop %@" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Ćwiartki" + "value" : "Zamknij %@" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Quadrantes" + "value" : "Sair %@" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Четверти" + "value" : "Выйти из %@" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "角落" + "value" : "退出%@" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "四等分" + "value" : "退出%@" } } } }, - "Quit %@" : { - "comment" : "A button that quits the app.", + "Radial menu" : { "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Quit %@" + "state" : "translated", + "value" : "قائمة دائرية" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "%@ beenden" + "value" : "Radialmenü" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Quit %@" + "value" : "Radial menu" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Quit %@" + "state" : "translated", + "value" : "Radial Menu" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quitter %@" + "value" : "Menu radial" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Esci da %@" + "value" : "Mostra menu radiale" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ を終了" + "value" : "円形メニュー" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "종료 %@" + "value" : "방사형 메뉴" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Stop %@" + "value" : "Radiaalmenu" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zamknij %@" + "value" : "Menu kołowe" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Sair %@" + "value" : "Menu radial" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Выйти из %@" + "value" : "Радиальное меню" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "退出%@" + "value" : "环形菜单" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "退出%@" + "value" : "環形菜單" } } } }, - "Radial menu" : { + "Radial Menu" : { + "comment" : "Label shown for a gesture configured to open the radial menu\nSection header shown in settings", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "قائمة دائرية" + "state" : "needs_review", + "value" : "Radial Menu" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Radialmenü" + "state" : "needs_review", + "value" : "Radial Menu" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Radial menu" + "value" : "Radial Menu" } }, "es" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Radial Menu" } }, @@ -24813,7 +26282,7 @@ "it" : { "stringUnit" : { "state" : "translated", - "value" : "Mostra menu radiale" + "value" : "Menu radiale" } }, "ja" : { @@ -24825,7 +26294,7 @@ "ko" : { "stringUnit" : { "state" : "translated", - "value" : "방사형 메뉴" + "value" : "원형 메뉴" } }, "nl-BE" : { @@ -24843,7 +26312,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Menu radial" + "value" : "Menu Radial" } }, "ru" : { @@ -24866,102 +26335,96 @@ } } }, - "Radial Menu" : { - "comment" : "Section header shown in settings", + "Radius" : { + "comment" : "Label for the preview corner radius slider, inside the “Corner Radius” section", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Radial Menu" + "state" : "translated", + "value" : "نصف قطر الزاوية" } }, "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Radial Menu" - } - }, - "en" : { "stringUnit" : { "state" : "translated", - "value" : "Radial Menu" + "value" : "Eckenradius" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Radial Menu" + "state" : "translated", + "value" : "Radio de las esquinas" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Menu Radial" + "value" : "Rayon des coins" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Menu radiale" + "value" : "Raggio degli angoli" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "円形メニュー" + "value" : "コーナーの丸み" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "원형 메뉴" + "value" : "모서리 반경" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Radiaalmenu" + "value" : "Hoekradius" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Menu kołowe" + "value" : "Zaokrąglenie rogów" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Menu Radial" + "value" : "Raio dos cantos" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Радиальное меню" + "value" : "Скругление" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "环形菜单" + "value" : "圆角半径" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "環形菜單" + "value" : "圓角半徑" } } } }, - "Relaunch to complete" : { + "Relaunch to Complete" : { "comment" : "A button title that appears when an update is being installed, instructing the user to relaunch the app to complete the installation.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Relaunch to complete" + "value" : "Relaunch to Complete" } }, "de" : { @@ -24970,16 +26433,10 @@ "value" : "Neustarten, um abzuschließen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Relaunch to complete" - } - }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Relaunch to complete" + "value" : "Relaunch to Complete" } }, "fr" : { @@ -24997,7 +26454,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "再起動して反映" + "value" : "再度開いて完了" } }, "ko" : { @@ -25133,7 +26590,7 @@ } } }, - "Remind me later" : { + "Remind Me Later" : { "localizations" : { "ar" : { "stringUnit" : { @@ -25147,12 +26604,6 @@ "value" : "Erinnere mich später" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Remind me later" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -25174,7 +26625,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "後で通知する" + "value" : "あとで通知" } }, "ko" : { @@ -25340,7 +26791,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Autoriser" + "value" : "Demander l’accès…" } }, "it" : { @@ -25352,7 +26803,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "許可を求める…" + "value" : "アクセス権を要求…" } }, "ko" : { @@ -25517,7 +26968,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser les raccourcis ?" + "value" : "Réinitialiser les raccourcis ?" } }, "it" : { @@ -25529,7 +26980,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をリセット" + "value" : "キー設定をリセットしますか?" } }, "ko" : { @@ -25576,267 +27027,256 @@ } } }, - "Reset radial menu actions" : { - "comment" : "A button label that resets the radial menu actions to their default configuration.", + "Reset radial menu actions?" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Reset radial menu actions" + "value" : "Reset radial menu actions?" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Reset radial menu actions" + "value" : "Reset radial menu actions?" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Reset radial menu actions" + "value" : "Reset radial menu actions?" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Reset radial menu actions" + "value" : "Reset radial menu actions?" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser les actions du menu radial" + "value" : "Réinitialiser les actions du menu radial ?" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Ripristina le azioni del menu radiale" + "value" : "Ripristinare le azioni del menu radiale?" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "円形メニューのアクションをリセット" + "value" : "円形メニューのアクションをリセットしますか?" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "원형 메뉴 액션 초기화" + "value" : "원형 메뉴 액션을 초기화하시겠습니까?" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Radiaalmenu-acties resetten" + "value" : "Acties van Radiaalmenu herstellen?" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Resetuj akcje menu kołowego" + "value" : "Zresetować akcje menu kołowego?" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Redefinir ações do menu radial" + "value" : "Redefinir ações do menu radial?" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Сбросить действия радиального меню" + "value" : "Сбросить действия радиального меню?" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "重置环形菜单操作" + "value" : "要重置所有环形菜单操作吗?" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "重置環形菜單操作" + "value" : "要重置所有環形菜單操作嗎?" } } } }, - "Reset radial menu actions?" : { + "Reset radial menu actions…" : { + "comment" : "Button that asks to reset the radial menu’s actions to their defaults.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Reset radial menu actions?" + "state" : "translated", + "value" : "إعادة تعيين إجراءات القائمة الدائرية…" } }, "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Reset radial menu actions?" - } - }, - "en" : { "stringUnit" : { "state" : "translated", - "value" : "Reset radial menu actions?" + "value" : "Radialmenü-Aktionen zurücksetzen …" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Reset radial menu actions?" + "state" : "translated", + "value" : "Restablecer acciones del menú radial…" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser les actions du menu radial ?" + "value" : "Réinitialiser les actions du menu radial…" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Ripristinare le azioni del menu radiale?" + "value" : "Ripristina le azioni del menu radiale…" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "円形メニューのアクションをリセット" + "value" : "円形メニューのアクションをリセット…" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "원형 메뉴 액션을 초기화하시겠습니까?" + "value" : "원형 메뉴 액션 초기화…" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Acties van Radiaalmenu herstellen?" + "value" : "Radiaalmenu-acties resetten…" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zresetować akcje menu kołowego?" + "value" : "Resetuj akcje menu kołowego…" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Redefinir ações do menu radial?" + "value" : "Redefinir ações do menu radial…" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Сбросить действия радиального меню?" + "value" : "Сбросить действия радиального меню…" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "要重置所有环形菜单操作吗?" + "value" : "重置环形菜单操作…" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "要重置所有環形菜單操作嗎?" + "value" : "重置環形菜單操作…" } } } }, - "Resize window under cursor" : { + "Reset…" : { + "comment" : "Button that asks to reset keybinds to their defaults.", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "تغيير حجم النافذة تحت المؤشر" + "value" : "إعادة تعيين…" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Fenstergrösse unter dem Mauszeiger ändern" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Resize window under cursor" + "value" : "Zurücksetzen …" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Redimensionar la ventana bajo el cursor" + "value" : "Restablecer…" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Redimensionner la fenêtre sous le curseur" + "value" : "Réinitialiser…" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Ridimensiona finestra sotto il cursore" + "value" : "Ripristina…" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソル下のウインドウをリサイズ" + "value" : "リセット…" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "커서 아래 창 크기 조정" + "value" : "재설정…" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Grootte van venster onder cursor wijzigen" + "value" : "Stel opnieuw in…" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zmień rozmiar okna pod kursorem" + "value" : "Wyzeruj…" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Redimensionar a janela embaixo do cursor" + "value" : "Redefinir…" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Изменить размер окна под курсором" + "value" : "Сбросить…" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "调整光标下的窗口大小" + "value" : "还原…" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "調整游標下的視窗大小" + "value" : "重置…" } } } @@ -25870,7 +27310,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Gérer la compatibilité avec Stage Manage" + "value" : "Respecter Stage Manager" } }, "it" : { @@ -25882,7 +27322,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Stage Manager を尊重" + "value" : "ステージマネージャを考慮" } }, "ko" : { @@ -25929,7 +27369,8 @@ } } }, - "Restore window frame on drag" : { + "Restore size when dragging" : { + "comment" : "Toggle that restores a window’s previous size when the user starts dragging it after Loop resized it.", "localizations" : { "ar" : { "stringUnit" : { @@ -25943,12 +27384,6 @@ "value" : "Fenster wiederherstellen beim ziehen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Restore window frame on drag" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -25970,7 +27405,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ドラッグ時にウインドウ枠を復元" + "value" : "ドラッグ時にウインドウのサイズを復元" } }, "ko" : { @@ -26018,7 +27453,7 @@ } }, "Right" : { - "comment" : "Label for a slider in Loop’s padding settings\nSide of a trigger key", + "comment" : "Label for a slider in Loop’s padding settings\nSide of a trigger key\nSwipe direction picker option: right", "localizations" : { "ar" : { "stringUnit" : { @@ -26047,7 +27482,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Droit" + "value" : "Droite" } }, "it" : { @@ -26147,7 +27582,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "右部繰り返し" + "value" : "右側サイクル" } }, "ko" : { @@ -26313,7 +27748,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Écran droit" + "value" : "Écran de droite" } }, "it" : { @@ -26325,7 +27760,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "右の画面" + "value" : "右のディスプレイ" } }, "ko" : { @@ -26580,7 +28015,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deux tiers droits" + "value" : "Deux tiers à droite" } }, "it" : { @@ -26758,7 +28193,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Changement d'écran" + "value" : "Changement d’écran" } }, "it" : { @@ -26770,7 +28205,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "画面移動" + "value" : "ディスプレイ移動" } }, "ko" : { @@ -26821,86 +28256,86 @@ "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Search…" + "state" : "translated", + "value" : "Search" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Suchen…" + "value" : "Suchen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Search…" + "value" : "Search" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Search…" + "state" : "translated", + "value" : "Search" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Rechercher…" + "value" : "Rechercher" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Cerca..." + "value" : "Cerca" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "検索…" + "value" : "検索" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "검색하다" + "value" : "검색" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Zoeken…" + "value" : "Zoeken" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Szukaj…" + "value" : "Szukaj" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Procurar…" + "value" : "Procurar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Поиск…" + "value" : "Поиск" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "搜索…" + "value" : "搜索" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "搜索…" + "value" : "搜尋" } } } @@ -26935,7 +28370,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deuxième quatrième" + "value" : "Deuxième quart" } }, "it" : { @@ -26959,7 +28394,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Tweede kwartier" + "value" : "Tweede kwart" } }, "pl" : { @@ -26994,93 +28429,9 @@ } } }, - "Select a keybinds file" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Select a keybinds file" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wähle eine Keybind-Datei aus" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Select a keybinds file" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Select a keybinds file" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sélectionner un fichier de raccourcis" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Seleziona file scorciatoie" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "キー設定ファイルを選択" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "키바인드 파일 선택" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Selecteer een bestand met toetscombinaties" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wybierz plik ze skrótami klawiszowymi" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Selecione o arquivo de atalhos do \"Loop\"" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Выберите файл с горячими клавишами" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "选择快捷键文件" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "選定按鍵綁定檔案" - } - } - } + "Select actions with cursor" : { + "comment" : "Toggle in advanced settings: when on, moving the cursor while Loop is open selects an action", + "isCommentAutoGenerated" : true }, "Send Feedback" : { "localizations" : { @@ -27111,7 +28462,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Envoyer un feedback" + "value" : "Envoyer des commentaires" } }, "it" : { @@ -27123,7 +28474,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ご意見を送る" + "value" : "フィードバックを送信" } }, "ko" : { @@ -27199,7 +28550,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Attribuer une touche d’activation" + "value" : "Attribuer une touche d’activation…" } }, "it" : { @@ -27258,95 +28609,6 @@ } } }, - "Set Current Icon" : { - "comment" : "Label for a button that lets the user set their icon for Loop", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "تعيين الأيقونة الحالية" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Aktuelles Icon auswählen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Set Current Icon" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Seleccionar icono actual" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Utiliser cette icône" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Icona selezionata" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "現在のアイコンに設定" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "현재 아이콘 설정" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zet icoon" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wybierz własną ikonę" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Definir Ícone Atual" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Установить иконку" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "设置为当前图标" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "設置為當前圖標" - } - } - } - }, "Settings" : { "comment" : "Section header shown in settings", "localizations" : { @@ -27465,7 +28727,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "À Propos" + "value" : "À propos" } }, "it" : { @@ -27477,7 +28739,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "概要" + "value" : "情報" } }, "ko" : { @@ -27553,7 +28815,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Couleur d'accentuation" + "value" : "Couleur d’accentuation" } }, "it" : { @@ -27565,7 +28827,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "テーマカラー" + "value" : "アクセントカラー" } }, "ko" : { @@ -27653,7 +28915,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "詳細設定" + "value" : "詳細" } }, "ko" : { @@ -27876,6 +29138,95 @@ } } }, + "Settings tab: Gestures" : { + "comment" : "Title of the gestures settings tab.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gestures" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Gestes" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ジェスチャ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + } + } + }, "Settings tab: Icon" : { "localizations" : { "ar" : { @@ -28169,7 +29520,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Menu Radial" + "value" : "Menu radial" } }, "it" : { @@ -28316,7 +29667,7 @@ } } }, - "Share feedback on our GitHub page, where you can let us know about any bugs, suggest features, or provide other valuable input. We also accept donations if you feel that Loop has improved your workflow :)" : { + "Share feedback on our GitHub page, where you can let us know about any bugs, suggest features, or share other ideas. If Loop has improved your workflow, you can also donate :)" : { "localizations" : { "ar" : { "stringUnit" : { @@ -28330,12 +29681,6 @@ "value" : "Teile uns dein Feedback auf unserer GitHub-Seite mit, wo man uns über etwaige Fehler informieren, Funktionen vorschlagen oder andere wertvolle Rückmeldungen geben kann. Wir nehmen auch Spenden entgegen, falls du der Meinung bist, dass Loop deine Arbeitsweise verbessert hat :)" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Share feedback on our GitHub page, where you can let us know about any bugs, suggest features, or provide other valuable input. We also accept donations if you feel that Loop has improved your workflow :)" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -28345,7 +29690,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Partagez vos retours sur notre page GitHub : vous pouvez y signaler des bugs, suggérer des fonctionnalités ou nous faire part de vos idées. Si Loop a amélioré votre productivité, vous pouvez aussi nous soutenir par un don :)\"" + "value" : "Partagez vos retours sur notre page GitHub : vous pouvez y signaler des bugs, suggérer des fonctionnalités ou nous faire part de vos idées. Si Loop a amélioré votre productivité, vous pouvez aussi nous soutenir par un don :)" } }, "it" : { @@ -28357,7 +29702,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "GitHub ページでフィードバックを共有してください。バグの報告や機能の提案、その他の貴重なご意見をお寄せいただけます。また、Loop があなたの作業効率を向上させたと感じた場合は、寄付も受け付けています (•‿•)" + "value" : "GitHubページでフィードバックを共有してください。バグの報告や機能の提案、その他の貴重なご意見をお寄せいただけます。また、Loopがあなたの作業効率を向上させたと感じた場合は、寄付も受け付けています (•‿•)" } }, "ko" : { @@ -28404,95 +29749,8 @@ } } }, - "Shift focus when stashed" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Shift focus when stashed" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fokus verschieben, wenn gestasht" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Shift focus when stashed" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Shift focus when stashed" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Changer le focus lors de l’aperçu" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sposta il focus quando nascondi" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "スタッシュ時にフォーカスを移動" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "스태시 시 포커스 전환" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Focus wisselen wanneer venster is opgeborgen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zmień ostrość, kiedy na stosie" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Desfocar quando oculto" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Поменять фокус при скрытии" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "收纳时移动焦点" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "收納時移動焦點" - } - } - } - }, - "Show in dock" : { + "Show in Dock" : { + "comment" : "Toggle that shows Loop’s icon in the Dock.", "localizations" : { "ar" : { "stringUnit" : { @@ -28506,12 +29764,6 @@ "value" : "Im Dock zeigen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show in dock" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -28521,7 +29773,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Afficher dans le dock" + "value" : "Afficher dans le Dock" } }, "it" : { @@ -28533,7 +29785,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Dock に表示" + "value" : "Dockに表示" } }, "ko" : { @@ -28580,94 +29832,6 @@ } } }, - "Show preview when looping" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "عرض المعاينة عند التكرار" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zeige eine Vorschau beim loopen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show preview when looping" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mostrar animación al mover" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Afficher un aperçu pendant l'utilisation" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mostra anteprima durante l'utilizzo" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "Loop 中にプレビューを表示" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "반복할 때 미리보기 표시" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Voorbeeld laten zien als je Loopt" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Pokaż podgląd podczas Loopowania" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mostrar prévia ao fazer loops" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Показывать превью при перемещении" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "在环绕窗口时显示预览" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "在環繞視窗時顯示預覽" - } - } - } - }, "Shrink" : { "comment" : "Section header in the action picker of the Keybinds tab", "localizations" : { @@ -29674,7 +30838,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réduire" + "value" : "Plus petit" } }, "it" : { @@ -29686,7 +30850,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "狭める" + "value" : "小さくする" } }, "ko" : { @@ -29763,7 +30927,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réduire proportionnellement" + "value" : "Plus petit (proportionnel)" } }, "it" : { @@ -29775,7 +30939,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "縮小する" + "value" : "比率を保って小さくする" } }, "ko" : { @@ -29822,6 +30986,89 @@ } } }, + "Snap by dragging to screen edges" : { + "comment" : "Toggle that enables Loop’s window snapping, where dragging a window to a screen edge resizes it.", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Snap by dragging to screen edges" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fenster Snapping aktivieren" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Snap by dragging to screen edges" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Activer le magnétisme des fenêtres" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Abilita aggancio ai bordi" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ウインドウスナップを有効化" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "창 스내핑 활성화" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Venster" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Włącz przyciąganie okien" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ativar encaixe automático de janelas" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Включить привязку окон" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "开启窗口吸附" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "啟用視窗吸附" + } + } + } + }, "Snappy" : { "comment" : "Animation speed setting", "localizations" : { @@ -30030,19 +31277,19 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Changement d'espace" + "value" : "Changement de Space" } }, "it" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Space Switching" + "state" : "translated", + "value" : "Cambio spazi" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "スペース移動" + "value" : "操作スペース移動" } }, "ko" : { @@ -30053,8 +31300,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Space Switching" + "state" : "translated", + "value" : "Space wisseling" } }, "pl" : { @@ -30089,6 +31336,95 @@ } } }, + "Spread" : { + "comment" : "Gesture kind: spread (fingers move apart, zooming in)\nMagnify gesture picker option: spread", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Spread" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Écarter" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ピンチアウト" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Spread" + } + } + } + }, "Stage Manager" : { "comment" : "Section header shown in settings", "localizations" : { @@ -30155,7 +31491,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Stage\" \"Manager\"" + "value" : "Stage Manager" } }, "ru" : { @@ -30207,7 +31543,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Taille de la bande du Stage Manager" + "value" : "Taille de la bande de Stage Manager" } }, "it" : { @@ -30266,451 +31602,546 @@ } } }, - "Start hidden" : { + "Stash" : { + "comment" : "Section header in the action picker of the Keybinds tab\nSection header shown in settings\nWindow action", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Start hidden" + "value" : "Stash" } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Start hidden" + "state" : "translated", + "value" : "Zwischenspeicher" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Start hidden" + "value" : "Stash" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Start hidden" + "value" : "Stash" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Démarrer masqué" + "value" : "Mettre de côté" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Avvia nascosta" + "value" : "Nascondi" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "起動時に非表示" + "value" : "スタッシュ" } }, "ko" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Start hidden" + "state" : "translated", + "value" : "스태시" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Start verborgen" + "value" : "Vensteropberging" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Uruchom jako ukryte" + "value" : "Stos" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Iniciar oculto" + "value" : "Ocultar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Запускать скрытым" + "value" : "Скрыть" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "开始隐藏" + "value" : "收纳" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "開始隱藏" + "value" : "收納" } } } }, - "Stash" : { - "comment" : "Section header in the action picker of the Keybinds tab\nSection header shown in settings\nWindow action", + "Style" : { + "comment" : "Section title for the preview background style picker.", + "isCommentAutoGenerated" : true + }, + "Swipe" : { + "comment" : "Gesture category label: swipe", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Stash" + "value" : "Swipe" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Zwischenspeicher" + "state" : "needs_review", + "value" : "Swipe" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Stash" + "value" : "Swipe" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Stash" + "value" : "Swipe" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Mettre de côté" + "value" : "Balayer" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Nascondi" + "state" : "needs_review", + "value" : "Swipe" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "スタッシュ" + "value" : "スワイプ" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "스태시" + "state" : "needs_review", + "value" : "Swipe" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Vensteropberging" + "state" : "needs_review", + "value" : "Swipe" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Stos" + "state" : "needs_review", + "value" : "Swipe" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Ocultar" + "state" : "needs_review", + "value" : "Swipe" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Скрыть" + "state" : "needs_review", + "value" : "Swipe" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "收纳" + "state" : "needs_review", + "value" : "Swipe" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "收納" + "state" : "needs_review", + "value" : "Swipe" } } } }, - "Supports macOS Tahoe’s Liquid Glass effects" : { - "comment" : "A tooltip that appears when hovering over the icon, explaining its function.", + "Swipe Down" : { + "comment" : "Gesture kind: directional swipe", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Supports macOS Tahoe’s Liquid Glass effects" + "value" : "Swipe Down" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Unterstützt macOS Tahoe’s Liquid Glass Effekte" + "state" : "needs_review", + "value" : "Swipe Down" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Supports macOS Tahoe’s Liquid Glass effects" + "value" : "Swipe Down" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Supports macOS Tahoe’s Liquid Glass effects" + "value" : "Swipe Down" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Supporte les effets Liquid Glass de macOS Tahoe" + "value" : "Balayer vers le bas" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Supporta gli effetti Liquid Glass di macOS Tahoe" + "state" : "needs_review", + "value" : "Swipe Down" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS Tahoe の Liquid Glass 効果に対応" + "value" : "下にスワイプ" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "macOS Tahoe의 Liquid Glass 효과 지원" + "state" : "needs_review", + "value" : "Swipe Down" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Heeft ondersteuning voor \"MacOS Tahoe Liquid Glass\"-effecten" + "state" : "needs_review", + "value" : "Swipe Down" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Wspiera efekt Liquid Glass systemu macOS Tahoe" + "state" : "needs_review", + "value" : "Swipe Down" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Suporta efeitos de Liquid Glass do macOS Tahoe" + "state" : "needs_review", + "value" : "Swipe Down" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Поддерживает эффект жидкого стекла из macOS Tahoe" + "state" : "needs_review", + "value" : "Swipe Down" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "支持macOS Tahoe液态玻璃效果" + "state" : "needs_review", + "value" : "Swipe Down" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "支持macOS Tahoe液態玻璃效果" + "state" : "needs_review", + "value" : "Swipe Down" } } } }, - "Suppress Mission Control" : { - "comment" : "A toggle that, when enabled, prevents Mission Control from opening when windows are dragged to the top of the screen.", + "Swipe Left" : { + "comment" : "Gesture kind: directional swipe", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Suppress Mission Control" + "value" : "Swipe Left" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Mission Control unterdrücken" + "state" : "needs_review", + "value" : "Swipe Left" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Suppress Mission Control" + "value" : "Swipe Left" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Suppress Mission Control" + "value" : "Swipe Left" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Supprimer la Mission Control" + "value" : "Balayer vers la gauche" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Ignora Mission Control" + "state" : "needs_review", + "value" : "Swipe Left" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Mission Control を抑制" + "value" : "左にスワイプ" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "Mission Control 억제" + "state" : "needs_review", + "value" : "Swipe Left" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Mission Control onderdrukken" + "state" : "needs_review", + "value" : "Swipe Left" } }, "pl" : { "stringUnit" : { "state" : "needs_review", - "value" : "Suppress Mission Control" + "value" : "Swipe Left" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Suprimir Controle de Missão" + "state" : "needs_review", + "value" : "Swipe Left" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Игнорировать Mission Control" + "state" : "needs_review", + "value" : "Swipe Left" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "禁用调度中心手势" + "state" : "needs_review", + "value" : "Swipe Left" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "禁用調度中心手勢" + "state" : "needs_review", + "value" : "Swipe Left" } } } }, - "Sync Wallpaper" : { + "Swipe Right" : { + "comment" : "Gesture kind: directional swipe", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "مزامنة خلفية الشاشة" + "state" : "needs_review", + "value" : "Swipe Right" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Hintergrundbild synchronisieren" + "state" : "needs_review", + "value" : "Swipe Right" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Sync Wallpaper" + "value" : "Swipe Right" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Sincronizar fondo" + "state" : "needs_review", + "value" : "Swipe Right" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Synchroniser avec le fond d'écran" + "value" : "Balayer vers la droite" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Sincronizza sfondo" + "state" : "needs_review", + "value" : "Swipe Right" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "壁紙を同期" + "value" : "右にスワイプ" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "배경화면 동기화" + "state" : "needs_review", + "value" : "Swipe Right" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Achtergrond synchroniseren" + "state" : "needs_review", + "value" : "Swipe Right" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Synchronizuj tapetę" + "state" : "needs_review", + "value" : "Swipe Right" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Sincronizar plano de fundo" + "state" : "needs_review", + "value" : "Swipe Right" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Синхронизировать с обоями" + "state" : "needs_review", + "value" : "Swipe Right" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "同步墙纸" + "state" : "needs_review", + "value" : "Swipe Right" } }, "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + } + } + }, + "Swipe Up" : { + "comment" : "Gesture kind: directional swipe", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "en" : { "stringUnit" : { "state" : "translated", - "value" : "同步牆紙" + "value" : "Swipe Up" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Balayer vers le haut" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "上にスワイプ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Up" } } } }, "System" : { - "comment" : "Accent color option", + "comment" : "Accent color option\nPreview background style: a translucent black fill, like the system's window tiling preview", "localizations" : { "ar" : { "stringUnit" : { @@ -30798,6 +32229,10 @@ } } }, + "Target window" : { + "comment" : "Label for the target window picker.", + "isCommentAutoGenerated" : true + }, "That keybind is already being used by %@." : { "localizations" : { "ar" : { @@ -30827,7 +32262,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ce raccourci est déjà utilisé par %@" + "value" : "Ce raccourci est déjà utilisé par %@." } }, "it" : { @@ -30839,7 +32274,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "そのキー設定はすでに %@ が使用しています。" + "value" : "そのキー設定は、%@ですでに使われています。" } }, "ko" : { @@ -31150,94 +32585,6 @@ } } }, - "There are other keybinds that conflict with this key combination." : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other keybinds that conflict with this key combination." - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Es gibt andere Tastenkombinationen, die mit dieser in Konflikt stehen." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "There are other keybinds that conflict with this key combination." - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other keybinds that conflict with this key combination." - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Cette combinaison est déjà utilisée par un autre raccourci." - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ci sono delle scorciatoie in conflitto con questi tasti." - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "このキーの組み合わせと競合する他のキー設定があります。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "이 키 조합과 충돌하는 다른 키바인드가 있습니다" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Andere toetscombinaties conflicteren met deze toetscombinatie." - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Istnieją skróty klawiszowe, które kolidują z tą kombinacją." - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Existem outras teclas que estão em conflito com esta combinação de teclas." - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "У вас уже есть другие назначения клавиш на эту комбинацию клавиш." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "此按键组合与已有快捷键冲突。" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "此按鍵組合與已有按鍵綁定衝突。" - } - } - } - }, "Thickness" : { "localizations" : { "ar" : { @@ -31356,7 +32703,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Troisième quatrième" + "value" : "Troisième quart" } }, "it" : { @@ -31380,7 +32727,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Derde kwartier" + "value" : "Derde kwart" } }, "pl" : { @@ -31457,7 +32804,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このアクションはキー設定に紐付けられています。このアクションを変更すると、両方に影響します。" + "value" : "このアクションはキー設定にリンクされています。このアクションを変更すると、両方に影響します。" } }, "ko" : { @@ -31505,7 +32852,7 @@ } }, "This macOS version is no longer supported." : { - "comment" : "Text displayed in a notification when the current macOS version is no longer supported.", + "comment" : "Text shown on the update button in the About settings page when the current macOS version is no longer supported.", "localizations" : { "ar" : { "stringUnit" : { @@ -31546,7 +32893,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "この macOS バージョンへのサポートは終了しました。" + "value" : "このmacOSバージョンへのサポートは終了しました。" } }, "ko" : { @@ -31593,37 +32940,31 @@ } } }, - "This will reset all keybinds to their original defaults." : { + "This resets all keybinds to their defaults." : { "comment" : "A message displayed in an alert when the user confirms resetting all keybinds.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "This will reset all keybinds to their original defaults." + "value" : "This resets all keybinds to their defaults." } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "This will reset all keybinds to their original defaults." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "This will reset all keybinds to their original defaults." + "value" : "This resets all keybinds to their defaults." } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "This will reset all keybinds to their original defaults." + "value" : "This resets all keybinds to their defaults." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tous les raccourcis seront réinitialisés à leurs paramètres d’origine." + "value" : "Tous les raccourcis seront réinitialisés à leurs valeurs par défaut." } }, "it" : { @@ -31682,37 +33023,31 @@ } } }, - "This will reset all radial menu actions to their default configuration." : { + "This resets all radial menu actions to their defaults." : { "comment" : "An alert message explaining that resetting the radial menu actions will reset them to their default configuration.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "This will reset all radial menu actions to their default configuration." + "value" : "This resets all radial menu actions to their defaults." } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "This will reset all radial menu actions to their default configuration." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "This will reset all radial menu actions to their default configuration." + "value" : "This resets all radial menu actions to their defaults." } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "This will reset all radial menu actions to their default configuration." + "value" : "This resets all radial menu actions to their defaults." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Toutes les actions du menu radial seront réinitialisées à leurs paramètres par défaut." + "value" : "Toutes les actions du menu radial seront réinitialisées à leurs valeurs par défaut." } }, "it" : { @@ -31771,6 +33106,89 @@ } } }, + "Title Bar Only" : { + "comment" : "Gesture activation zone restricted to a window's title bar", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Barre de titre uniquement" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "タイトルバーのみ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Title Bar Only" + } + } + } + }, "To save power, window animations are\nunavailable in Low Power Mode." : { "localizations" : { "ar" : { @@ -31800,7 +33218,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pour économiser de l’énergie, les animations de fenêtres\nne sont pas disponibles en mode basse énergie." + "value" : "Pour économiser de l’énergie, les animations de fenêtres\nne sont pas disponibles en mode économie d’énergie." } }, "it" : { @@ -31812,7 +33230,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "省エネルギーモードでは、ウインドウの\nアニメーションは無効になります。" + "value" : "低電力モードでは、ウインドウの\nアニメーションは無効になります。" } }, "ko" : { @@ -31989,7 +33407,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "上部繰り返し" + "value" : "上側サイクル" } }, "ko" : { @@ -32066,7 +33484,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Moitié haute" + "value" : "Moitié supérieure" } }, "it" : { @@ -32345,7 +33763,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "上の画面" + "value" : "上のディスプレイ" } }, "ko" : { @@ -32422,7 +33840,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tiers haut" + "value" : "Tiers supérieur" } }, "it" : { @@ -32570,91 +33988,85 @@ } } }, - "Treat left and right keys differently" : { - "comment" : "Setting label in the “Keybinds” tab for enabling separate behavior for left and right keys.", + "Trackpad gestures" : { + "comment" : "Toggle in gestures settings", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Treat left and right keys differently" + "value" : "Trackpad gestures" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Linke und rechte Tasten unterschiedlich behandeln" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Treat left and right keys differently" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Treat left and right keys differently" + "value" : "Trackpad gestures" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Traiter les touches gauche et droite différemment" + "value" : "Activer les gestes du trackpad" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Distinzione tra tasto sinistro e destro" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左右のキーを別扱い" + "value" : "トラックパッドジェスチャを有効化" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "왼쪽 키와 오른쪽 키를 다르게 취급" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Behandel linker- en rechtertoetsen anders" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Rozróżniaj klawisze po prawej i lewej stronie klawiatury" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Tratar as teclas esquerda e direita de forma diferente" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Разные левая и правая клавиши" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "分开对待键盘两侧的修饰键" + "state" : "needs_review", + "value" : "Trackpad gestures" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "分開對待鍵盤兩側的修飾鍵" + "state" : "needs_review", + "value" : "Trackpad gestures" } } } @@ -32688,7 +34100,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Délai d'activation" + "value" : "Délai d’activation" } }, "it" : { @@ -32777,7 +34189,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Touche d'activation" + "value" : "Touche d’activation" } }, "it" : { @@ -32836,31 +34248,25 @@ } } }, - "Try again later" : { + "Try Again Later" : { "comment" : "A button that is shown when an update fails to install.", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Try again later" + "value" : "Try Again Later" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Try again later" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Try again later" + "value" : "Try Again Later" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Try again later" + "value" : "Try Again Later" } }, "fr" : { @@ -32878,7 +34284,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "後で試す" + "value" : "あとで再試行" } }, "ko" : { @@ -32925,6 +34331,9 @@ } } }, + "Under Cursor" : { + "comment" : "Window selection option: act on the window under the cursor" + }, "Undo" : { "comment" : "Window action", "localizations" : { @@ -32967,7 +34376,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "元に戻す" + "value" : "取り消す" } }, "ko" : { @@ -33056,7 +34465,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "トリガーキーのリンク解除" + "value" : "トリガーキーのリンクを解除" } }, "ko" : { @@ -33221,7 +34630,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Taille récupérée" + "value" : "Taille une fois récupérée" } }, "it" : { @@ -33233,7 +34642,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "スタッシュ非表示時のサイズ" + "value" : "スタッシュ解除時のサイズ" } }, "ko" : { @@ -33280,91 +34689,91 @@ } } }, - "Update from: %@" : { - "comment" : "A label at the bottom of the update view that indicates the current app version and a message suggesting an update. The argument is the current app version.", + "Up" : { + "comment" : "Swipe direction picker option: up", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Update from: %@" + "value" : "Up" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Update from: %@" + "value" : "Up" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Update from: %@" + "value" : "Up" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Update from: %@" + "value" : "Up" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Version actuelle : %@" + "value" : "Haut" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Aggiorna da: %@" + "state" : "needs_review", + "value" : "Up" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "現在のバージョン: %@" + "value" : "上" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "업데이트 대상: %@" + "state" : "needs_review", + "value" : "Up" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Update van: %@" + "state" : "needs_review", + "value" : "Up" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Aktualizacja z: %@" + "state" : "needs_review", + "value" : "Up" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Atualizar da versão: %@" + "state" : "needs_review", + "value" : "Up" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Обновиться с %@" + "state" : "needs_review", + "value" : "Up" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "从%@更新" + "state" : "needs_review", + "value" : "Up" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "自%@更新" + "state" : "needs_review", + "value" : "Up" } } } @@ -33399,7 +34808,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Mise à jour…" + "value" : "Mettre à jour…" } }, "it" : { @@ -33588,7 +34997,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ がバックグラウンドで動作しているときのみ、アップデートがインストールされます。" + "value" : "%@がバックグラウンドで動作しているときのみ、アップデートがインストールされます。" } }, "ko" : { @@ -33635,267 +35044,262 @@ } } }, - "Use coordinates" : { + "Updating from %@" : { + "comment" : "A label at the bottom of the update view that indicates the current app version and a message suggesting an update. The argument is the current app version.", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "استخدام الإحداثيات" + "state" : "needs_review", + "value" : "Updating from %@" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Koordinaten benutzen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Use coordinates" + "state" : "needs_review", + "value" : "Updating from %@" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Usar coordenadas" + "state" : "needs_review", + "value" : "Updating from %@" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Utiliser des coordonnées" + "value" : "Version actuelle : %@" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Usa coordinate" + "value" : "Aggiorna da: %@" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "座標を使用" + "value" : "現在のバージョン: %@" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "좌표 사용" + "value" : "업데이트 대상: %@" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Gebruik coördinaten" + "value" : "Update van: %@" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Użyj współrzędnych" + "value" : "Aktualizacja z: %@" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Usar coordenadas" + "value" : "Atualizar da versão: %@" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Использовать координаты" + "value" : "Обновиться с %@" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "使用坐标" + "value" : "从%@更新" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "使用座標" + "value" : "自%@更新" } } } }, - "Use macOS center" : { - "comment" : "Toggle to enable macOS-style centering in custom actions", + "Use coordinates" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "استخدام مركز macOS" + "value" : "استخدام الإحداثيات" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "MacOS Mitte benutzen" + "value" : "Koordinaten benutzen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Use macOS center" + "value" : "Use coordinates" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Usar el centro de MacOS" + "value" : "Usar coordenadas" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Utiliser le centre selon macOS" + "value" : "Utiliser des coordonnées" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Usa centro macOS" + "value" : "Usa coordinate" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS の中央を使用" + "value" : "座標を使用" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "macOS 중앙 사용" + "value" : "좌표 사용" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Gebruik macOS-midden" + "value" : "Gebruik coördinaten" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Używaj środka według macOS" + "value" : "Użyj współrzędnych" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Usar o centro do MacOS" + "value" : "Usar coordenadas" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Использовать центр macOS" + "value" : "Использовать координаты" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "使用macOS屏幕中心" + "value" : "使用坐标" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "使用macOS屏幕中心" + "value" : "使用座標" } } } }, - "Use macOS window manager when available" : { + "Use macOS center" : { + "comment" : "Toggle to enable macOS-style centering in custom actions", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Use macOS window manager when available" + "state" : "translated", + "value" : "استخدام مركز macOS" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "macOS Fenster Manager verwenden, wenn verfügbar" + "value" : "MacOS Mitte benutzen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Use macOS window manager when available" + "value" : "Use macOS center" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Use macOS window manager when available" + "state" : "translated", + "value" : "Usar el centro de MacOS" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Utiliser le gestionnaire de fenêtres de macOS si possible" + "value" : "Utiliser le centre selon macOS" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Usa la gestione delle finestre di macOS quando possibile" + "value" : "Usa centro macOS" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "利用可能な場合は macOS のウインドウマネージャを使用" + "value" : "macOSの中央配置を使用" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "사용 가능한 경우 macOS 창 관리자 사용" + "value" : "macOS 중앙 사용" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Gebruik MacOS Window Manager als deze beschikbaar is" + "value" : "Gebruik macOS-midden" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Używaj managera okien macOS, kiedy to możliwe" + "value" : "Używaj środka według macOS" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Usar gerenciador de janelas do macOS quando disponível" + "value" : "Usar o centro do MacOS" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Использовать оконный менеджер macOS" + "value" : "Использовать центр macOS" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "尽量使用macOS原生窗口管理系统" + "value" : "使用macOS屏幕中心" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "儘可能使用macOS原生窗口管理系統。" + "value" : "使用macOS屏幕中心" } } } @@ -33929,7 +35333,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Valeurs fixes en pixels" + "value" : "Utiliser des pixels" } }, "it" : { @@ -33988,24 +35392,101 @@ } } }, - "Use this if you are using a custom menubar." : { + "Use This Icon" : { + "comment" : "Notification action button that sets the newly unlocked icon as Loop's icon", "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "استخدم هذا إذا كنت تستخدم شريط قوائم مخصص." + "state" : "needs_review", + "value" : "تعيين الأيقونة الحالية" } }, "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Aktuelles Icon auswählen" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Seleccionar icono actual" + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Utiliser cette icône" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Icona selezionata" + } + }, + "ja" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "現在のアイコンに設定" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "현재 아이콘 설정" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Zet icoon" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Wybierz własną ikonę" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Definir Ícone Atual" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Установить иконку" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "设置为当前图标" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "設置為當前圖標" + } + } + } + }, + "Use this if you use a custom menu bar." : { + "localizations" : { + "ar" : { "stringUnit" : { "state" : "translated", - "value" : "Benutze dies, falls eine eigene Menüleiste benutzt wird." + "value" : "استخدم هذا إذا كنت تستخدم شريط قوائم مخصص." } }, - "en" : { + "de" : { "stringUnit" : { "state" : "translated", - "value" : "Use this if you are using a custom menubar." + "value" : "Benutze dies, falls eine eigene Menüleiste benutzt wird." } }, "es" : { @@ -34017,7 +35498,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "À utiliser si vous avez une barre de menu personnalisée." + "value" : "À utiliser si vous avez une barre des menus personnalisée." } }, "it" : { @@ -34047,7 +35528,7 @@ "pl" : { "stringUnit" : { "state" : "needs_review", - "value" : "Use this if you are using a custom menubar." + "value" : "Use this if you use a custom menu bar." } }, "pt-BR" : { @@ -34118,7 +35599,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "バージョン:%@" + "value" : "バージョン%@" } }, "ko" : { @@ -34462,7 +35943,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Fond d'écran" + "value" : "Fond d’écran" } }, "it" : { @@ -34521,95 +36002,6 @@ } } }, - "Whether to allow Mission Control to open when windows\nare dragged to the top of the screen." : { - "comment" : "A tooltip that explains the purpose of the \"Suppress Mission Control\" toggle in the Behavior Configuration view.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Whether to allow Mission Control to open when windows\nare dragged to the top of the screen." - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Gibt an, ob das Öffnen von Mission Control erlaubt ist, wenn Fenster\nnach oben auf dem Bildschirm gezogen werden." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Whether to allow Mission Control to open when windows\nare dragged to the top of the screen." - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Whether to allow Mission Control to open when windows\nare dragged to the top of the screen." - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Autoriser la Mission Control à s'ouvrir lorsque les fenêtres\nsont déplacées en haut de l'écran." - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Indica se abilitare l'apertura di Mission Control quando le finestre\nvengono trascinate nella parte superiore dello schermo." - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ウインドウ上端ドラッグ時に\nMission Control を開くかどうか。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "창을 화면 상단으로 드래그할 때 Mission Control을 허용할지 여부." - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sta Mission Control toe te openen wanneer vensters naar de bovenkant van het scherm worden gesleept" - } - }, - "pl" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Whether to allow Mission Control to open when windows\nare dragged to the top of the screen." - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Se deseja permitir que o Controle de Missão abra quando janelas\nforem arrastadas para o topo da tela." - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Разрешить Mission Control при перетаскивании окон в верхнюю часть экрана." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "是否允许在拖动窗口至屏幕顶部时触发调度中心。" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "是否允許在拖動視窗至螢幕頂部時觸發調度中心。" - } - } - } - }, "Width" : { "localizations" : { "ar" : { @@ -34740,7 +36132,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウ" + "value" : "ウインドウ" } }, "ko" : { @@ -34876,182 +36268,8 @@ } } }, - "Window Snapping" : { - "comment" : "Section header shown in settings", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Window Snapping" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fenster Snapping" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Window Snapping" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Window Snapping" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Magnétisme des fenêtres" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Aggancio ai bordi" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ウィンドウスナップ" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "윈도우 스냅핑" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Vensterplakken" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Przyciąganie okien" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Encaixe de janelas" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Привязка окон" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "窗口贴靠" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "視窗貼靠" - } - } - } - }, - "Window snapping will still use the preview." : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "الالتقاط النافذة سيظل يستخدم المعاينة." - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Das Einrasten von Fenstern wird weiterhin die Vorschau verwenden." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Window snapping will still use the preview." - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Se previsualizará el ajuste de ventanas" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Le magnétisme des fenêtres utilisera toujours l'aperçu." - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Durante lo spostamento si potrà ancora vedere l’anteprima." - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ウインドウスナップは引き続きプレビューを使用します。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "윈도우 스냅핑은 여전히 미리보기를 사용할 것입니다." - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Window snapping gebruikt nog steeds het voorbeeld." - } - }, - "pl" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Window snapping will still use the preview." - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "O encaixe de janelas continuará usando a prévia." - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Использовать предпросмотр для привязки окон." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "窗口贴靠将仍然使用预览。" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "窗口貼靠將仍然使用預覽。" - } - } - } + "Window Snapping Only" : { + "comment" : "Preview visibility option: only show the preview when window snapping" }, "X" : { "comment" : "X axis label", @@ -35349,7 +36567,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous pouvez utiliser un maximum de %lld touches d'activation." + "value" : "Vous pouvez utiliser un maximum de %lld touches d’activation." } }, "it" : { @@ -35361,7 +36579,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "トリガーキーは %lld キーまでしか使えません。" + "value" : "トリガーキーには最大で%lld個のキーしか使用できません。" } }, "ko" : { @@ -35438,7 +36656,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Impossible d’exporter quelque chose qui n’existe pas !" + "value" : "Impossible d’exporter quelque chose qui n’existe pas !" } }, "it" : { @@ -35450,7 +36668,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "存在しないキー設定はエクスポートできません!" + "value" : "存在しないキー設定は書き出せません!" } }, "ko" : { @@ -35526,7 +36744,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez utilisé Loop %lld fois !" + "value" : "Vous avez utilisé Loop %lld fois !" } }, "it" : { @@ -35538,7 +36756,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%lld 回 Loop しました!" + "value" : "%lld回Loopしました!" } }, "ko" : { @@ -35614,7 +36832,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez bouclé… euh… j’ai perdu le compte…" + "value" : "Vous avez utilisé Loop… euh… j’ai perdu le compte…" } }, "it" : { @@ -35626,7 +36844,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop した…えっと…もう数えられない…" + "value" : "Loopした…えっと…もう数えられない…" } }, "ko" : { @@ -35672,7 +36890,10 @@ } } } + }, + "Z-shaped" : { + "comment" : "Name of the screen order that walks the screens row by row, like reading a page" } }, - "version" : "1.0" + "version" : "1.1" } \ No newline at end of file diff --git a/Loop/Migration/Migrator.swift b/Loop/Migration/Migrator.swift index 34455aa89..049dd59a7 100644 --- a/Loop/Migration/Migrator.swift +++ b/Loop/Migration/Migrator.swift @@ -151,7 +151,7 @@ enum Migrator { await showAlert( .init( localized: "Error reading keybinds alert title", - defaultValue: "Error Reading Keybinds" + defaultValue: "Couldn’t Import Keybinds" ), informativeText: .init( localized: "Error reading keybinds alert description", @@ -173,7 +173,7 @@ private extension Migrator { static func getSaveDirectoryURL() async throws -> URL { let savePanel = NSSavePanel() savePanel.directoryURL = Defaults[.lastMigratorURL] ?? documentsDirectory - savePanel.title = .init(localized: "Export keybinds") + savePanel.title = .init(localized: "Export Keybinds") savePanel.nameFieldStringValue = "Loop Keybinds.json" savePanel.canCreateDirectories = true savePanel.showsTagField = false @@ -289,7 +289,7 @@ private extension Migrator { static func getKeybindsFileURL() async throws -> URL { let openPanel = NSOpenPanel() openPanel.directoryURL = Defaults[.lastMigratorURL] ?? documentsDirectory - openPanel.title = .init(localized: "Select a keybinds file") + openPanel.title = .init(localized: "Choose a Keybinds File") openPanel.allowedContentTypes = [.json] openPanel.canChooseFiles = true openPanel.canChooseDirectories = false @@ -405,7 +405,7 @@ private extension Migrator { informativeText: .init(localized: "Do you want to merge or erase existing keybinds?"), buttons: [ .init(localized: "Import keybinds: merge", defaultValue: "Merge"), - .init(localized: "Import keybinds: erase", defaultValue: "Erase"), + .init(localized: "Import keybinds: erase", defaultValue: "Replace"), .init(localized: "Import keybinds: cancel", defaultValue: "Cancel") ] ) diff --git a/Loop/Private APIs/SkyLightSymbolLoader.swift b/Loop/Private APIs/SkyLightSymbolLoader.swift index d0888b87d..5c8ed69a0 100644 --- a/Loop/Private APIs/SkyLightSymbolLoader.swift +++ b/Loop/Private APIs/SkyLightSymbolLoader.swift @@ -72,8 +72,11 @@ extension SkyLightSymbolLoader { typealias SLSWindowIteratorGetTagsFunc = @convention(c) (_ iterator: CFTypeRef) -> UInt64 static let SLSWindowIteratorGetTags: SLSWindowIteratorGetTagsFunc? = loadSymbol("SLSWindowIteratorGetTags") - // As of macOS 26.3, `SLSWindowIteratorGetAttributes` will always return `0` based on disassembly. - // Unused in Loop at the moment. + // We just use `SLSGetWindowLevel` directly instead +// typealias SLSWindowIteratorGetLevelFunc = @convention(c) (_ iterator: CFTypeRef) -> CGWindowLevel +// static let SLSWindowIteratorGetLevel: SLSWindowIteratorGetLevelFunc? = loadSymbol("SLSWindowIteratorGetLevel") + + // As of macOS 26.3, `SLSWindowIteratorGetAttributes` will always return `0` based on disassembly // typealias SLSWindowIteratorGetAttributesFunc = @convention(c) (_ iterator: CFTypeRef) -> UInt64 // static let SLSWindowIteratorGetAttributes: SLSWindowIteratorGetAttributesFunc? = loadSymbol("SLSWindowIteratorGetAttributes") diff --git a/Loop/Private APIs/SkyLightToolBelt.swift b/Loop/Private APIs/SkyLightToolBelt.swift index 310cd4330..e12406306 100644 --- a/Loop/Private APIs/SkyLightToolBelt.swift +++ b/Loop/Private APIs/SkyLightToolBelt.swift @@ -236,6 +236,29 @@ enum SkyLightToolBelt { return hitWindowID != 0 ? hitWindowID : nil } + /// Checks whether a specific window has valid SkyLight tags and no parent window. + static func areWindowTagsValid(windowID: CGWindowID) -> Bool { + guard let SLSWindowQueryWindows = SkyLightSymbolLoader.SLSWindowQueryWindows, + let SLSWindowQueryResultCopyWindows = SkyLightSymbolLoader.SLSWindowQueryResultCopyWindows, + let SLSWindowIteratorAdvance = SkyLightSymbolLoader.SLSWindowIteratorAdvance, + let SLSWindowIteratorGetWindowID = SkyLightSymbolLoader.SLSWindowIteratorGetWindowID, + let SLSMainConnectionID = SkyLightSymbolLoader.SLSMainConnectionID + else { + log.error("Failed to load symbols in \(#function)") + return false + } + + let query = SLSWindowQueryWindows(SLSMainConnectionID(), [windowID] as CFArray, 0) + let iterator = SLSWindowQueryResultCopyWindows(query) + + while SLSWindowIteratorAdvance(iterator) { + guard SLSWindowIteratorGetWindowID(iterator) == windowID else { continue } + return areWindowTagsValid(iterator) + } + + return false + } + /// Captures images for each of the windows that are passed in. /// - Parameter windowIDs: The `CGWindowID`s for each of the windows to capture. /// - Returns: An array of `CGImage`s for each window, in the same order as the windows that were passed in. @@ -416,7 +439,7 @@ enum SkyLightToolBelt { let iterator = SLSWindowQueryResultCopyWindows(query) while SLSWindowIteratorAdvance(iterator) { - guard checkIfWindowIsValid(iterator), SLSWindowIteratorGetWindowID(iterator) == windowID else { + guard areWindowTagsValid(iterator), SLSWindowIteratorGetWindowID(iterator) == windowID else { continue } @@ -463,10 +486,10 @@ enum SkyLightToolBelt { config.perform(saveSelector) } - /// Checks if the current window in a `SLSWindowIterator` is valid for Loop to use. + /// Checks if the current window in an `SLSWindowIterator` has valid tags and no parent window. /// - Parameter iterator: The `SLSWindowIterator` object /// - Returns: Whether this window is valid. - private static func checkIfWindowIsValid(_ iterator: CFTypeRef) -> Bool { + private static func areWindowTagsValid(_ iterator: CFTypeRef) -> Bool { guard let SLSWindowIteratorGetParentID = SkyLightSymbolLoader.SLSWindowIteratorGetParentID, let SLSWindowIteratorGetTags = SkyLightSymbolLoader.SLSWindowIteratorGetTags else { diff --git a/Loop/Settings Window/Loop/AboutConfiguration.swift b/Loop/Settings Window/Loop/AboutConfiguration.swift index ffb687823..480be45b6 100644 --- a/Loop/Settings Window/Loop/AboutConfiguration.swift +++ b/Loop/Settings Window/Loop/AboutConfiguration.swift @@ -124,7 +124,7 @@ final class AboutConfigurationModel: ObservableObject { didCompleteCopyToClipboard = true Task { @MainActor in - try await Task.sleep(for: .seconds(2)) + try? await Task.sleep(for: .seconds(2)) didCompleteCopyToClipboard = false } } @@ -286,7 +286,7 @@ struct AboutConfigurationView: View { private var communitySection: some View { LuminareSection { Text( - "Share feedback on our GitHub page, where you can let us know about any bugs, suggest features, or provide other valuable input. We also accept donations if you feel that Loop has improved your workflow :)" + "Share feedback on our GitHub page, where you can let us know about any bugs, suggest features, or share other ideas. If Loop has improved your workflow, you can also donate :)" ) .padding(8) diff --git a/Loop/Settings Window/Loop/AdvancedConfiguration.swift b/Loop/Settings Window/Loop/AdvancedConfiguration.swift index fbf83d3b7..ef3c2583c 100644 --- a/Loop/Settings Window/Loop/AdvancedConfiguration.swift +++ b/Loop/Settings Window/Loop/AdvancedConfiguration.swift @@ -127,12 +127,12 @@ struct AdvancedConfigurationView: View { @Default(.useSystemWindowManagerWhenAvailable) var useSystemWindowManagerWhenAvailable @Default(.ignoreLowPowerMode) var ignoreLowPowerMode @Default(.animateWindowResizes) var animateWindowResizes - @Default(.hideOnNoSelection) var hideOnNoSelection @Default(.disableCursorInteraction) var disableCursorInteraction @Default(.ignoreFullscreen) var ignoreFullscreen @Default(.hapticFeedback) var hapticFeedback @Default(.sizeIncrement) var sizeIncrement @Default(.enableRadialMenuCustomization) var enableRadialMenuCustomization + @Default(.screenOrder) var screenOrder @State private var isConfirmingResetKeybinds: Bool = false @State private var isConfirmingResetRadialMenuActions: Bool = false @@ -141,6 +141,15 @@ struct AdvancedConfigurationView: View { animateWindowResizes && !ignoreLowPowerMode && model.isLowPowerModeEnabled } + /// The preference only takes effect where the macOS window manager integration is available + private var isSystemWindowManagerIntegrated: Bool { + if #available(macOS 15, *) { + useSystemWindowManagerWhenAvailable + } else { + false + } + } + var body: some View { LuminareForm { generalSection @@ -151,42 +160,60 @@ struct AdvancedConfigurationView: View { .onDisappear(perform: model.stopTracking) } .animation(luminareAnimation, value: enableRadialMenuCustomization) + .animation(luminareAnimation, value: useSystemWindowManagerWhenAvailable) } private var generalSection: some View { LuminareSection { if #available(macOS 15.0, *) { - LuminareToggle("Use macOS window manager when available", isOn: $useSystemWindowManagerWhenAvailable) + LuminareToggle("Integrate with macOS window manager", isOn: $useSystemWindowManagerWhenAvailable) } - LuminareToggle(isOn: $animateWindowResizes) { - Text("Animate window resize") - .padding(.trailing, 4) - .luminareToolTip(attachedTo: .topTrailing, hidden: !showLowPowerModeWarning) { - HStack(spacing: 4) { - Text("To save power, window animations are\nunavailable in Low Power Mode.") - .multilineTextAlignment(.leading) - - if let url = URL(string: "x-apple.systempreferences:com.apple.preference.battery") { - Button { - openURL(url) - } label: { - Image(systemName: "arrow.up.forward") - .foregroundStyle(.secondary) - .padding(4) + // The macOS window manager's own animation setting applies instead + if !isSystemWindowManagerIntegrated { + LuminareToggle(isOn: $animateWindowResizes) { + Text("Animate window resizing") + .padding(.trailing, 4) + .luminareToolTip(attachedTo: .topTrailing, hidden: !showLowPowerModeWarning) { + HStack(spacing: 4) { + Text("To save power, window animations are\nunavailable in Low Power Mode.") + .multilineTextAlignment(.leading) + + if let url = URL(string: "x-apple.systempreferences:com.apple.preference.battery") { + Button { + openURL(url) + } label: { + Image(systemName: "arrow.up.forward") + .foregroundStyle(.secondary) + .padding(4) + } + .buttonStyle(.plain) } - .buttonStyle(.plain) } + .padding(6) } - .padding(6) - } - .animation(luminareAnimation, value: showLowPowerModeWarning) + .animation(luminareAnimation, value: showLowPowerModeWarning) + } } - LuminareToggle("Disable cursor interaction", isOn: $disableCursorInteraction) - LuminareToggle("Ignore fullscreen windows", isOn: $ignoreFullscreen) + LuminareToggle( + "Select actions with cursor", + isOn: Binding( + get: { !disableCursorInteraction }, + set: { disableCursorInteraction = !$0 } + ) + ) + LuminareToggle("Ignore full-screen windows", isOn: $ignoreFullscreen) LuminareToggle("Haptic feedback", isOn: $hapticFeedback) + LuminarePickerMenu( + "Next/previous screen order", + selection: $screenOrder, + items: ScreenOrder.allCases + ) { order in + Text("\(order.image) \(Text(order.name))") + } + LuminareSlider( "Size increment", value: $sizeIncrement.doubleBinding, @@ -201,11 +228,9 @@ struct AdvancedConfigurationView: View { private var radialMenuSection: some View { LuminareSection(String(localized: "Radial Menu", comment: "Section header shown in settings")) { - LuminareToggle("Hide when no action is selected", isOn: $hideOnNoSelection) - LuminareToggle(isOn: $enableRadialMenuCustomization) { HStack { - Text("Allow radial menu customization") + Text("Customize actions") if enableRadialMenuCustomization { Button { @@ -224,7 +249,7 @@ struct AdvancedConfigurationView: View { isConfirmingResetRadialMenuActions = true } label: { HStack { - Text("Reset radial menu actions") + Text("Reset radial menu actions…") if model.showResetRadialMenuActionsSuccessIndicator { Image(systemName: "checkmark") @@ -238,7 +263,7 @@ struct AdvancedConfigurationView: View { Button("Cancel", role: .cancel) {} Button("Reset", role: .destructive, action: model.resetRadialMenuActions) } message: { - Text("This will reset all radial menu actions to their default configuration.") + Text("This resets all radial menu actions to their defaults.") } } } @@ -249,7 +274,7 @@ struct AdvancedConfigurationView: View { LuminareButtonRow { Button(action: model.importPrompt) { HStack { - Text("Import") + Text("Import…") if model.showImportKeybindsSuccessIndicator { Image(systemName: "checkmark") @@ -261,7 +286,7 @@ struct AdvancedConfigurationView: View { Button(action: model.exportPrompt) { HStack { - Text("Export") + Text("Export…") if model.showExportKeybindsSuccessIndicator { Image(systemName: "checkmark") @@ -275,7 +300,7 @@ struct AdvancedConfigurationView: View { isConfirmingResetKeybinds = true } label: { HStack { - Text("Reset") + Text("Reset…") if model.showResetKeybindsSuccessIndicator { Image(systemName: "checkmark") @@ -288,7 +313,7 @@ struct AdvancedConfigurationView: View { Button("Cancel", role: .cancel) {} Button("Reset", role: .destructive, action: model.resetKeybinds) } message: { - Text("This will reset all keybinds to their original defaults.") + Text("This resets all keybinds to their defaults.") } } .luminareRoundingBehavior(top: true, bottom: true) @@ -310,7 +335,12 @@ struct AdvancedConfigurationView: View { .foregroundStyle(.green) } - Text("Accessibility access") + // macOS 27 renamed the Accessibility privacy pane to Device Control and Data Access + if #available(macOS 27, *) { + Text("Device Control and Data Access", comment: "Name of the privacy pane in macOS 27 and later, shown as a permission in settings") + } else { + Text("Accessibility access", comment: "Name of the privacy pane in macOS 26 and earlier, shown as a permission in settings") + } } } content: { Text("Request…", comment: "Button to request accessibility access") diff --git a/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift b/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift index 218348871..dbe04934b 100644 --- a/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift +++ b/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift @@ -17,11 +17,11 @@ struct ExcludedAppsConfigurationView: View { LuminareForm { LuminareSection { LuminareButtonRow { - Button("Add") { + Button(String(localized: "Add", comment: "Used to add items to a list")) { showAppChooser() } - Button("Remove", role: .destructive) { + Button(String(localized: "Remove", comment: "Used to remove items from a list"), role: .destructive) { excludedApps.removeAll { selectedApps.contains($0) } } .disabled(selectedApps.isEmpty) @@ -37,15 +37,11 @@ struct ExcludedAppsConfigurationView: View { ExcludedListAppView(url: item.wrappedValue) .equatable() } emptyView: { - HStack { - Spacer() - VStack { - Text("No excluded applications") - .font(.title3) - Text("Press \"Add\" to add an application") - .font(.caption) - } - Spacer() + VStack { + Text("No excluded apps") + .font(.title3) + Text("Click “Add” to add an app") + .font(.caption) } .foregroundStyle(.secondary) .padding() diff --git a/Loop/Settings Window/Settings/Behavior/BehaviorConfiguration.swift b/Loop/Settings Window/Settings/Behavior/BehaviorConfiguration.swift index d7136d0ff..1556f4e2b 100644 --- a/Loop/Settings Window/Settings/Behavior/BehaviorConfiguration.swift +++ b/Loop/Settings Window/Settings/Behavior/BehaviorConfiguration.swift @@ -13,15 +13,12 @@ struct BehaviorConfigurationView: View { @Environment(\.luminareAnimation) private var luminareAnimation @Default(.launchAtLogin) var launchAtLogin - @Default(.startHidden) var startHidden - @Default(.hideMenuBarIcon) var hideMenuBarIcon @Default(.animationConfiguration) var animationConfiguration @Default(.windowSnapping) var windowSnapping @Default(.suppressMissionControlOnTopDrag) var suppressMissionControlOnTopDrag @Default(.restoreWindowFrameOnDrag) var restoreWindowFrameOnDrag @Default(.useSystemWindowManagerWhenAvailable) var useSystemWindowManagerWhenAvailable @Default(.useScreenWithCursor) var useScreenWithCursor - @Default(.moveCursorWithWindow) var moveCursorWithWindow @Default(.resizeWindowUnderCursor) var resizeWindowUnderCursor @Default(.focusWindowOnResize) var focusWindowOnResize @Default(.respectStageManager) var respectStageManager @@ -37,8 +34,7 @@ struct BehaviorConfigurationView: View { LuminareForm { generalSection windowSection - cursorSection - windowSnappingSection + draggingSection stageManagerSection stashSection } @@ -53,13 +49,9 @@ struct BehaviorConfigurationView: View { } private var generalSection: some View { - LuminareSection(String(localized: "General", comment: "Section header shown in settings")) { + LuminareSection { LuminareToggle("Launch at login", isOn: $launchAtLogin) - LuminareToggle("Start hidden", isOn: $startHidden) - - LuminareToggle("Hide menu bar icon", isOn: $hideMenuBarIcon) - LuminareSliderPicker( "Animation speed", AnimationConfiguration.allCases.reversed(), @@ -73,11 +65,23 @@ struct BehaviorConfigurationView: View { private var windowSection: some View { LuminareSection(String(localized: "Window", comment: "Section header shown in settings")) { - LuminareToggle("Move window to cursor's screen", isOn: $useScreenWithCursor) + LuminarePickerMenu( + "Target window", + selection: windowSelection, + items: WindowSelection.allCases + ) { selection in + Text("\(Image(systemName: selection.icon)) \(selection.title)") + } + + // If the system WM is enabled, the window under the cursor requires focus. + if resizeWindowUnderCursor, !useSystemWindowManagerWhenAvailable { + LuminareToggle("Focus window on resize", isOn: $focusWindowOnResize) + } + + LuminareToggle("Move to cursor’s screen", isOn: $useScreenWithCursor) - // Enabling the system window manager will override these options. + // Enabling the system window manager will override this option. if !useSystemWindowManagerWhenAvailable { - LuminareToggle("Restore window frame on drag", isOn: $restoreWindowFrameOnDrag) LuminareButton("Padding", "Configure…") { isPaddingConfigurationViewPresented = true } @@ -90,52 +94,39 @@ struct BehaviorConfigurationView: View { } } - private var cursorSection: some View { - LuminareSection(String(localized: "Cursor", comment: "Section header shown in settings")) { - // This can only be enabled when the preview is visible. - // Because when the preview is disabled, the window moves live with cursor movement, - // so moving the cursor would be unusable. - if previewVisibility { - LuminareToggle("Move cursor with window", isOn: $moveCursorWithWindow) - } - - LuminareToggle("Resize window under cursor", isOn: $resizeWindowUnderCursor) + private var windowSelection: Binding { + Binding( + get: { resizeWindowUnderCursor ? .underCursor : .frontmost }, + set: { resizeWindowUnderCursor = $0 == .underCursor } + ) + } - // If the system WM is enabled, the window under the cursor requires focus. - if resizeWindowUnderCursor, !useSystemWindowManagerWhenAvailable { - LuminareToggle("Focus window on resize", isOn: $focusWindowOnResize) + private var draggingSection: some View { + LuminareSection(String(localized: "Dragging", comment: "Section header shown in settings, for settings about dragging windows")) { + // Enabling the system window manager will override this option. + if !useSystemWindowManagerWhenAvailable { + LuminareToggle("Restore size when dragging", isOn: $restoreWindowFrameOnDrag) } - } - } - private var windowSnappingSection: some View { - LuminareSection(String(localized: "Window Snapping", comment: "Section header shown in settings")) { if #available(macOS 15, *) { LuminareToggle(isOn: $windowSnapping) { if SystemWindowManager.MoveAndResize.snappingEnabled { - Text("Enable window snapping") + Text("Snap by dragging to screen edges") .padding(.trailing, 4) .luminareToolTip(attachedTo: .topTrailing) { - Text("macOS's \"Tile by dragging windows to screen edges\" feature is currently\nenabled, which will conflict with Loop's window snapping functionality.") + Text("macOS’s “Tile by dragging windows to screen edges” is turned on,\nwhich conflicts with Loop’s window snapping.") .padding(6) } } else { - Text("Enable window snapping") + Text("Snap by dragging to screen edges") } } } else { - LuminareToggle("Enable window snapping", isOn: $windowSnapping) + LuminareToggle("Snap by dragging to screen edges", isOn: $windowSnapping) } if windowSnapping { - LuminareToggle(isOn: $suppressMissionControlOnTopDrag) { - Text("Suppress Mission Control") - .padding(.trailing, 4) - .luminareToolTip(attachedTo: .topTrailing) { - Text("Whether to allow Mission Control to open when windows\nare dragged to the top of the screen.") - .padding(6) - } - } + LuminareToggle("Prevent Mission Control at top edge", isOn: $suppressMissionControlOnTopDrag) } } } @@ -159,7 +150,7 @@ struct BehaviorConfigurationView: View { private var stashSection: some View { LuminareSection(String(localized: "Stash", comment: "Section header shown in settings")) { - LuminareToggle("Animated", isOn: $animateStashedWindows) + LuminareToggle("Animate stashing", isOn: $animateStashedWindows) LuminareSlider( String(localized: "Peek size", comment: "Thickness of the visible portion of the window when stashed"), @@ -170,10 +161,30 @@ struct BehaviorConfigurationView: View { suffix: Text("px", comment: "Unit symbol: pixels") ) - LuminareToggle("Shift focus when stashed", isOn: $shiftFocusWhenStashed) + LuminareToggle("Focus next window when stashing", isOn: $shiftFocusWhenStashed) } .onChange(of: stashedWindowVisiblePadding) { _ in Task { await StashManager.shared.onConfigurationChanged() } } } } + +/// Which window Loop acts on, stored as `resizeWindowUnderCursor` +private enum WindowSelection: CaseIterable { + case frontmost + case underCursor + + var title: String { + switch self { + case .frontmost: String(localized: "Active", comment: "Target window option: act on the active window") + case .underCursor: String(localized: "Under Cursor", comment: "Window selection option: act on the window under the cursor") + } + } + + var icon: String { + switch self { + case .frontmost: "interface.window.on.rectangle.dashed" + case .underCursor: "interface.window.and.pointer.arrow" + } + } +} diff --git a/Loop/Settings Window/Settings/Behavior/Padding Configuration/PaddingConfigurationView.swift b/Loop/Settings Window/Settings/Behavior/Padding Configuration/PaddingConfigurationView.swift index bdd624875..280d095d6 100644 --- a/Loop/Settings Window/Settings/Behavior/Padding Configuration/PaddingConfigurationView.swift +++ b/Loop/Settings Window/Settings/Behavior/Padding Configuration/PaddingConfigurationView.swift @@ -52,7 +52,7 @@ struct PaddingConfigurationView: View { Button { isPresented = false } label: { - Text("Close", comment: "Label for a button that closes a modal window") + Text("Done", comment: "Label for a button that closes a modal window") } .buttonStyle(.luminare(overrideUseMainStyle: true)) .luminareCornerRadius(8) @@ -209,7 +209,7 @@ struct PaddingConfigurationView: View { Text("External bar", comment: "Label for a slider in Loop’s padding settings") .padding(.trailing, 4) .luminareToolTip(attachedTo: .topTrailing) { - Text("Use this if you are using a custom menubar.") + Text("Use this if you use a custom menu bar.") .padding(6) } } diff --git a/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift b/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift new file mode 100644 index 000000000..e73ac7f64 --- /dev/null +++ b/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift @@ -0,0 +1,310 @@ +// +// GestureConfigurationView.swift +// Loop +// +// Created by Kai Azim on 2026-04-16. +// + +import Luminare +import SwiftUI + +struct GestureConfigurationView: View { + @Environment(\.luminareAnimation) private var luminareAnimation + + @State private var gesture: GestureBinding + @Binding private var externalGesture: GestureBinding + @Binding private var isPresented: Bool + + init(gesture: Binding, isPresented: Binding) { + self.gesture = gesture.wrappedValue + self._externalGesture = gesture + self._isPresented = isPresented + } + + private var kindBinding: Binding { + Binding( + get: { gesture.kind }, + set: { newKind in + let oldKind = gesture.kind + gesture.kind = newKind + + if newKind == .radialMenu { + gesture.action = .radialMenuActions + } else if oldKind == .radialMenu { + gesture.action = .singleAction(.custom(.init(.noAction))) + } + } + ) + } + + private var categoryBinding: Binding { + Binding( + get: { GestureCategory(kind: gesture.kind) }, + set: { category in + switch category { + case .all: + kindBinding.wrappedValue = .radialMenu + case .swipe: + if !gesture.kind.isDirectionalSwipe { + kindBinding.wrappedValue = .swipeRight + } + case .magnify: + kindBinding.wrappedValue = .magnifyOut + } + } + ) + } + + private var swipeDirectionBinding: Binding { + Binding( + get: { SwipeDirection(kind: gesture.kind) ?? .right }, + set: { kindBinding.wrappedValue = $0.kind } + ) + } + + private var magnifyGestureBinding: Binding { + Binding( + get: { MagnifyGesture(kind: gesture.kind) ?? .magnifyOut }, + set: { kindBinding.wrappedValue = $0.kind } + ) + } + + private var fingerCountBinding: Binding { + Binding( + get: { gesture.fingerCount }, + set: { count in + gesture.fingerCount = count + + if isActivationZoneDisabled { + gesture.activationZone = .titlebar + } + } + ) + } + + private var isActivationZoneDisabled: Bool { + gesture.fingerCount <= 2 + } + + var body: some View { + LuminareForm { + LuminareSection(outerPadding: 0) { + LuminareTextField( + gesture.defaultName, + text: Binding( + get: { gesture.name ?? "" }, + set: { gesture.name = $0 } + ) + ) + .luminareFilledStates(.none) + .luminareBorderedStates(.none) + } + + LuminareSection { + LuminarePicker( + compactElements: GestureCategory.allCases, + selection: categoryBinding + ) { category in + HStack(spacing: 6) { + category.image + .frame(width: 12) + + Text(category.displayName) + } + .fixedSize() + } + .luminareContentSize(hasFixedHeight: true) + .luminareRoundingBehavior(top: true, bottom: gesture.kind == .radialMenu) + + if GestureCategory(kind: gesture.kind) == .swipe { + LuminarePickerMenu( + "Direction", + selection: swipeDirectionBinding, + items: SwipeDirection.allCases + ) { direction in + Text("\(direction.image) \(direction.displayName)") + } + } + + if GestureCategory(kind: gesture.kind) == .magnify { + LuminarePickerMenu( + "Gesture", + selection: magnifyGestureBinding, + items: MagnifyGesture.allCases + ) { magnifyGesture in + Text("\(magnifyGesture.image) \(magnifyGesture.displayName)") + } + } + } + .luminareCornerRadius(16) + + LuminareSection { + LuminareSliderPicker( + "Fingers", + Array(2...5), + selection: fingerCountBinding + ) { count in + Text("\(count)") + .monospaced() + } + .luminareSliderPickerLayout(.compact(textBoxWidth: 24)) + + LuminarePicker( + compactElements: GestureBinding.ActivationZone.allCases, + selection: $gesture.activationZone + ) { option in + HStack(spacing: 6) { + Image(systemName: option.systemImage) + + Text(option.displayName) + } + .fixedSize() + } + .luminareContentSize(hasFixedHeight: true) + .luminareRoundingBehavior(bottom: true) + .opacity(isActivationZoneDisabled ? 0.5 : 1) + .disabled(isActivationZoneDisabled) + } + .luminareCornerRadius(16) + + Button { + isPresented = false + } label: { + Text("Done", comment: "Label for a button that closes a modal window") + } + .buttonStyle(.luminare(overrideUseMainStyle: true)) + .luminareCornerRadius(8) + } + .animation(luminareAnimation, value: gesture.kind) + .onChange(of: gesture) { externalGesture = $0 } + } +} + +private enum GestureCategory: CaseIterable, Equatable { + case all + case swipe + case magnify + + init(kind: GestureBinding.Kind) { + switch kind { + case .radialMenu: + self = .all + case .swipeUp, .swipeDown, .swipeLeft, .swipeRight: + self = .swipe + case .magnifyOut, .magnifyIn: + self = .magnify + } + } + + var displayName: String { + switch self { + case .all: + String(localized: "Both", comment: "Gesture category label: swipe and magnify gestures") + case .swipe: + String(localized: "Swipe", comment: "Gesture category label: swipe") + case .magnify: + String(localized: "Magnify", comment: "Gesture category label: magnify") + } + } + + var image: Image { + switch self { + case .all: + Image(.loop) + case .swipe: + Image(systemName: "arrow.up.and.down.and.arrow.left.and.right") + case .magnify: + Image(systemName: "arrow.down.left.and.arrow.up.right") + } + } +} + +private enum SwipeDirection: CaseIterable { + case up + case down + case left + case right + + init?(kind: GestureBinding.Kind) { + switch kind { + case .swipeUp: + self = .up + case .swipeDown: + self = .down + case .swipeLeft: + self = .left + case .swipeRight: + self = .right + case .radialMenu, .magnifyOut, .magnifyIn: + return nil + } + } + + var kind: GestureBinding.Kind { + switch self { + case .up: + .swipeUp + case .down: + .swipeDown + case .left: + .swipeLeft + case .right: + .swipeRight + } + } + + var displayName: String { + switch self { + case .up: + String(localized: "Up", comment: "Swipe direction picker option: up") + case .down: + String(localized: "Down", comment: "Swipe direction picker option: down") + case .left: + String(localized: "Left", comment: "Swipe direction picker option: left") + case .right: + String(localized: "Right", comment: "Swipe direction picker option: right") + } + } + + var image: Image { + kind.image + } +} + +private enum MagnifyGesture: CaseIterable { + case magnifyOut + case magnifyIn + + init?(kind: GestureBinding.Kind) { + switch kind { + case .magnifyOut: + self = .magnifyOut + case .magnifyIn: + self = .magnifyIn + case .radialMenu, .swipeUp, .swipeDown, .swipeLeft, .swipeRight: + return nil + } + } + + var kind: GestureBinding.Kind { + switch self { + case .magnifyOut: + .magnifyOut + case .magnifyIn: + .magnifyIn + } + } + + var displayName: String { + switch self { + case .magnifyOut: + String(localized: "Pinch", comment: "Magnify gesture picker option: pinch") + case .magnifyIn: + String(localized: "Spread", comment: "Magnify gesture picker option: spread") + } + } + + var image: Image { + kind.image + } +} diff --git a/Loop/Settings Window/Settings/Gestures/GestureItemView.swift b/Loop/Settings Window/Settings/Gestures/GestureItemView.swift new file mode 100644 index 000000000..47ce8aa8e --- /dev/null +++ b/Loop/Settings Window/Settings/Gestures/GestureItemView.swift @@ -0,0 +1,280 @@ +// +// GestureItemView.swift +// Loop +// +// Created by Kai Azim on 2026-04-16. +// + +import Defaults +import Luminare +import SwiftUI + +struct GestureItemView: View { + @Environment(\.luminareAnimation) private var luminareAnimation + + @Default(.keybinds) private var keybinds + + @State private var gesture: GestureBinding + @Binding private var externalGesture: GestureBinding + private let hasConflict: Bool + + @State private var isActionPickerPresented = false + @State private var isGestureConfigPresented = false + @State private var isConfiguringCustom = false + @State private var isConfiguringCycle = false + + init(_ gesture: Binding, hasConflict: Bool) { + self.gesture = gesture.wrappedValue + self._externalGesture = gesture + self.hasConflict = hasConflict + } + + private var resolvedAction: WindowAction? { + switch gesture.action { + case .radialMenuActions: + nil + case let .singleAction(actionType): + actionType.resolvedAction + } + } + + private var isKeybindReference: Bool { + if case let .singleAction(actionType) = gesture.action { + return actionType.isKeybindReference + } + return false + } + + private var actionTypeBinding: Binding { + Binding( + get: { + if case let .singleAction(actionType) = gesture.action { + return actionType + } + return .custom(.init(.noAction)) + }, + set: { newValue in + gesture.action = .singleAction(newValue) + } + ) + } + + private var actionBinding: Binding { + Binding( + get: { + resolvedAction ?? .init(.noAction) + }, + set: { newAction in + if case let .singleAction(actionType) = gesture.action { + switch actionType { + case .custom: + gesture.action = .singleAction(.custom(newAction)) + case let .keybindReference(id): + if let index = Defaults[.keybinds].firstIndex(where: { $0.id == id }) { + keybinds[index] = newAction + } + } + } + } + ) + } + + var body: some View { + ZStack { + actionSelection + .frame(maxWidth: .infinity, alignment: .leading) + + HStack(spacing: 12) { + if isKeybindReference { + Image(systemName: "keyboard") + .foregroundStyle(.secondary) + .help("This action is linked to a keybind. Changes made to this action will affect both.") + } + + gestureConfiguration + .luminareToolTip(attachedTo: .topTrailing, hidden: !hasConflict) { + Text(String(localized: "Another gesture is set up the same way.", comment: "Tooltip shown on a conflicting gesture in settings")) + .padding(6) + } + } + .frame(maxWidth: .infinity, alignment: .trailing) + } + .padding(.horizontal, 12) + .onChange(of: resolvedAction?.direction) { _ in + if resolvedAction?.direction.isCustomizable == true { + isConfiguringCustom = true + } + if resolvedAction?.direction == .cycle { + isConfiguringCycle = true + } + } + .onChange(of: gesture) { externalGesture = $0 } + } + + private var actionSelection: some View { + actionIndicator + .luminarePopover( + isPresented: $isActionPickerPresented, + arrowEdge: .top, + attachmentAnchor: .topLeading, + shouldHideAnchor: true, + shouldAnimate: false + ) { + RadialMenuActionPickerView(selection: actionTypeBinding) + .frame(width: 300, height: 300) + } + .onChange(of: isActionPickerPresented) { _ in + if !isActionPickerPresented { + PickerListEventMonitorManager.shared.removeAllMonitors() + } + } + } + + private var gestureConfiguration: some View { + Button { + isGestureConfigPresented = true + } label: { + VStack(alignment: .trailing, spacing: 2) { + Text(gesture.displayName) + .fontWeight(.regular) + .lineLimit(1) + + if gesture.activationZone == .titlebar { + Text(gesture.activationZone.displayName) + .font(.caption) + .foregroundStyle(.secondary) + } + } + .padding(.horizontal, 4) + .contentShape(.rect) + .animation(luminareAnimation, value: gesture.activationZone) + } + .luminareContentSize(contentMode: .fit, hasFixedHeight: true) + .luminareRoundingBehavior(top: true, bottom: true) + .luminareFilledStates([.hovering, .pressed]) + .luminareBorderedStates(.hovering) + .luminareMinHeight(24) + .opacity(hasConflict ? 0.5 : 1) + .help(String(localized: "Customize this gesture.", comment: "Help text shown when hovering a gesture configuration button")) + .padding(.leading, -4) + .luminareModal(isPresented: $isGestureConfigPresented) { + GestureConfigurationView( + gesture: $gesture, + isPresented: $isGestureConfigPresented + ) + .frame(width: 380) + } + .luminareModalCornerRadius(24) + } + + private var actionIndicator: some View { + HStack(spacing: 2) { + let opensRadialMenu = gesture.action == .radialMenuActions + + // The radial menu can't be changed here, but shares the button so it lines up with other actions + Button { + if !opensRadialMenu { + isActionPickerPresented.toggle() + } + } label: { + HStack(spacing: 8) { + if opensRadialMenu { + Image(.loop) + .frame(width: 18) + .foregroundStyle(.secondary) + + Text(String(localized: "Radial Menu", comment: "Label shown for a gesture configured to open the radial menu")) + .fontWeight(.regular) + .lineLimit(1) + .foregroundStyle(.secondary) + } else if let action = resolvedAction { + IconView(action: action) + + if let info = action.direction.infoText { + Text(action.getName()) + .fontWeight(.regular) + .lineLimit(1) + .padding(.trailing, 4) + .luminareToolTip(attachedTo: .topTrailing) { + Text(info) + .padding(6) + } + } else { + Text(action.getName()) + .fontWeight(.regular) + .lineLimit(1) + } + } else { + // A single action only fails to resolve when its linked keybind was removed + Image(systemName: "bolt.horizontal.fill") + .foregroundStyle(.secondary) + + Text("Linked keybind not found") + .fontWeight(.regular) + .lineLimit(1) + .foregroundStyle(.secondary) + } + } + .padding(.horizontal, 4) + } + .luminareContentSize(contentMode: .fit, hasFixedHeight: true) + .luminareRoundingBehavior(top: true, bottom: true) + .luminareFilledStates([.hovering, .pressed]) + .luminareBorderedStates(.hovering) + .luminareMinHeight(24) + .help(String(localized: "Customize this gesture’s action.", comment: "Help text shown when hovering a gesture's action button")) + .allowsHitTesting(!opensRadialMenu) + .padding(.leading, -4) + + Group { + if let resolvedAction { + if resolvedAction.direction.isCustomizable { + Button { + isConfiguringCustom = true + } label: { + Image(systemName: "slider.horizontal.3") + } + .buttonStyle(.plain) + .luminareModal(isPresented: $isConfiguringCustom) { + if resolvedAction.direction == .custom { + CustomActionConfigurationView( + action: actionBinding, + isPresented: $isConfiguringCustom + ) + .frame(width: 400) + } else { + StashActionConfigurationView( + action: actionBinding, + isPresented: $isConfiguringCustom + ) + .frame(width: 400) + } + } + .luminareModalCornerRadius(24) + .help(String(localized: "Customize this action’s custom frame.", comment: "Help text on the slider icon next to a gesture action with a custom frame")) + } + + if resolvedAction.direction == .cycle { + Button { + isConfiguringCycle = true + } label: { + Image(systemName: "repeat") + } + .buttonStyle(.plain) + .luminareModal(isPresented: $isConfiguringCycle) { + CycleActionConfigurationView( + action: actionBinding, + isPresented: $isConfiguringCycle + ) + .frame(width: 400) + } + .luminareModalCornerRadius(24) + .help(String(localized: "Customize what this action cycles through.", comment: "Help text on the cycle icon next to a gesture action that cycles")) + } + } + } + .font(.title3) + .foregroundStyle(.secondary) + } + } +} diff --git a/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift b/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift new file mode 100644 index 000000000..41f30c221 --- /dev/null +++ b/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift @@ -0,0 +1,105 @@ +// +// GesturesConfigurationView.swift +// Loop +// +// Created by Kai Azim on 2026-04-16. +// + +import Defaults +import Luminare +import SwiftUI + +final class GesturesConfigurationModel: ObservableObject { + @Published var selectedGestures = Set() +} + +struct GesturesConfigurationView: View { + @Environment(\.luminareAnimation) private var luminareAnimation + @EnvironmentObject private var windowModel: SettingsWindowManager + @StateObject private var model = GesturesConfigurationModel() + + @Default(.enableGestures) private var enableGestures + @Default(.gestures) private var gestures + + private var conflictingGestureIDs: Set { + GestureBinding.conflictingActionableIDs(in: gestures) + } + + var body: some View { + LuminareForm { + settingsSection + + if enableGestures { + gesturesSection + } + } + .animation(luminareAnimation, value: enableGestures) + } + + private var settingsSection: some View { + LuminareSection { + LuminareToggle(String(localized: "Trackpad gestures", comment: "Toggle in gestures settings"), isOn: $enableGestures) + } + } + + private var gesturesSection: some View { + LuminareSection { + LuminareButtonRow { + Button(String(localized: "Add", comment: "Used to add items to a list")) { + gestures.insert( + GestureBinding(), + at: 0 + ) + } + + Button(String(localized: "Remove", comment: "Used to remove items from a list"), role: .destructive) { + let selectedIDs = Set(model.selectedGestures.map(\.id)) + gestures.removeAll { selectedIDs.contains($0.id) } + } + .disabled(model.selectedGestures.isEmpty) + .keyboardShortcut(.delete) + } + .luminareRoundingBehavior(top: true) + + LuminareList( + items: $gestures, + selection: $model.selectedGestures, + id: \.id + ) { gesture in + GestureItemView( + gesture, + hasConflict: conflictingGestureIDs.contains(gesture.wrappedValue.id) + ) + } emptyView: { + VStack { + Text(String(localized: "No gestures", comment: "Empty state title in gestures settings")) + .font(.title3) + Text(String(localized: "Click “Add” to add a gesture", comment: "Empty state subtitle in gestures settings")) + .font(.caption) + } + .foregroundStyle(.secondary) + .padding() + } + .luminareRoundingBehavior(bottom: true) + .onChange(of: model.selectedGestures, initial: true) { + if model.selectedGestures.count == 1, + case let .singleAction(actionType) = model.selectedGestures.first?.action, + let action = actionType.resolvedAction { + windowModel.isPreviewingUserSelection = true + windowModel.setPreviewedAction(to: action) + } else { + windowModel.isPreviewingUserSelection = false + } + } + .onDisappear { + windowModel.isPreviewingUserSelection = false + } + } header: { + Text("Gestures", comment: "Section header shown in gestures settings") + .fontWeight(.medium) + } footer: { + Text("Continue the swipe or magnify gesture to step through cycle actions.", comment: "Section footer shown in settings") + .font(.caption) + } + } +} diff --git a/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift b/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift index 3ffcc3bd3..02683bbc5 100644 --- a/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift +++ b/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift @@ -16,7 +16,14 @@ struct DirectionPickerView: View { private let isInCycle: Bool private var sections: [PickerSection] { - PickerSection.windowDirections + let sections = PickerSection.windowDirections + + guard isInCycle else { return sections } + return sections.compactMap { section in + // Remove repeatable actions; we're already in a cycle + let items = section.items.filter { !WindowAction($0).allowsRapidRepeat } + return items.isEmpty ? nil : PickerSection(section.title, items) + } } private var moreSection: PickerSection { @@ -42,7 +49,7 @@ struct DirectionPickerView: View { var body: some View { VStack(spacing: 0) { TextField( - String(localized: "Search for a window action", defaultValue: "Search…"), + String(localized: "Search for a window action", defaultValue: "Search"), text: $searchText ) .textFieldStyle(.plain) diff --git a/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift b/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift index d29fd319c..1b419fd20 100644 --- a/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift +++ b/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift @@ -16,7 +16,7 @@ struct Keycorder: View { let keyLimit: Int = 6 - @Default(.triggerKey) var triggerKey + @Default(.triggerKey) private var triggerKey @Binding private var validCurrentKeybind: Set @State private var selectionKeybind: Set @@ -202,7 +202,7 @@ struct Keycorder: View { // Validate keybind requirements when in bypass mode if bypassTriggerKey == true, selectionKeybind.filter(\.isModifier).isEmpty { - errorMessage = "Please include at least one modifier key." + errorMessage = "Include at least one modifier key." shake() shouldError = true return false diff --git a/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift b/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift index 573ad0563..ec267c2d6 100644 --- a/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift +++ b/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift @@ -10,22 +10,20 @@ import Luminare import SwiftUI struct KeybindItemView: View { - @Environment(\.luminareAnimation) var luminareAnimation - @Default(.triggerKey) private var triggerKey @Default(.keybinds) private var keybinds @State private var action: WindowAction - @Binding private var boundAction: WindowAction - - @State private var isConfiguringCustom: Bool = false - @State private var isConfiguringCycle: Bool = false + @Binding private var externalAction: WindowAction private let cycleIndex: Int? - @State private var isDirectionPickerPresented = false + + @State private var isActionPickerPresented = false + @State private var isConfiguringCustom = false + @State private var isConfiguringCycle = false init(_ action: Binding, cycleIndex: Int? = nil) { self.action = action.wrappedValue - self._boundAction = action + self._externalAction = action self.cycleIndex = cycleIndex } @@ -50,7 +48,7 @@ struct KeybindItemView: View { var body: some View { ZStack { - titleAndButtons + actionSelection .frame(maxWidth: .infinity, alignment: .leading) keybindCombination @@ -65,12 +63,63 @@ struct KeybindItemView: View { isConfiguringCycle = true } } - .onChange(of: action) { boundAction = $0 } + .onChange(of: action) { externalAction = $0 } } - private var titleAndButtons: some View { + private var actionSelection: some View { + actionIndicator + .luminarePopover( + isPresented: $isActionPickerPresented, + arrowEdge: .top, + attachmentAnchor: .topLeading, + shouldHideAnchor: true, + shouldAnimate: false + ) { + DirectionPickerView( + direction: $action.direction, + isInCycle: cycleIndex != nil + ) + .frame(width: 300, height: 300) + } + .onChange(of: isActionPickerPresented) { _ in + if !isActionPickerPresented { + PickerListEventMonitorManager.shared.removeAllMonitors() + } + } + } + + private var actionIndicator: some View { HStack(spacing: 2) { - label() + Button { + isActionPickerPresented.toggle() + } label: { + HStack(spacing: 8) { + IconView(action: action) + + if let info = action.direction.infoText { + Text(action.getName()) + .fontWeight(.regular) + .lineLimit(1) + .padding(.trailing, 4) + .luminareToolTip(attachedTo: .topTrailing) { + Text(info) + .padding(6) + } + } else { + Text(action.getName()) + .fontWeight(.regular) + .lineLimit(1) + } + } + .padding(.horizontal, 4) + } + .luminareContentSize(contentMode: .fit, hasFixedHeight: true) + .luminareRoundingBehavior(top: true, bottom: true) + .luminareFilledStates([.hovering, .pressed]) + .luminareBorderedStates(.hovering) + .luminareMinHeight(24) + .help("Customize this keybind’s action.") + .padding(.leading, -4) Group { if action.direction.isCustomizable { @@ -96,7 +145,7 @@ struct KeybindItemView: View { } } .luminareModalCornerRadius(24) - .help("Customize this action's custom frame.") + .help("Customize this action’s custom frame.") } if action.direction == .cycle { @@ -120,27 +169,6 @@ struct KeybindItemView: View { .font(.title3) .foregroundStyle(.secondary) } - .background(alignment: .leading) { - Color.clear - .frame(width: 300 - 24) - .luminarePopover( - isPresented: $isDirectionPickerPresented, - arrowEdge: .top, - shouldHideAnchor: true, - shouldAnimate: false - ) { - DirectionPickerView( - direction: $action.direction, - isInCycle: cycleIndex != nil - ) - .frame(width: 300, height: 300) - } - .onChange(of: isDirectionPickerPresented) { _ in - if !isDirectionPickerPresented { - PickerListEventMonitorManager.shared.removeAllMonitors() - } - } - } } private var keybindCombination: some View { @@ -154,7 +182,7 @@ struct KeybindItemView: View { keycorderSection() .padding(.leading, 4) .luminareToolTip(attachedTo: .topLeading, hidden: !hasDuplicateKeybinds) { - Text("There are other keybinds that conflict with this key combination.") + Text("Another keybind uses this key combination.") .padding(6) } .luminareTint(overridingWith: .red) @@ -185,39 +213,6 @@ struct KeybindItemView: View { action.bypassTriggerKey = false } - private func label() -> some View { - Button { - isDirectionPickerPresented.toggle() - } label: { - HStack(spacing: 8) { - IconView(action: action) - - if let info = action.direction.infoText { - Text(action.getName()) - .fontWeight(.regular) - .lineLimit(1) - .padding(.trailing, 4) - .luminareToolTip(attachedTo: .topTrailing) { - Text(info) - .padding(6) - } - } else { - Text(action.getName()) - .fontWeight(.regular) - .lineLimit(1) - } - } - .padding(.horizontal, 4) - } - .luminareContentSize(contentMode: .fit, hasFixedHeight: true) - .luminareRoundingBehavior(top: true, bottom: true) - .luminareFilledStates([.hovering, .pressed]) - .luminareBorderedStates(.hovering) - .luminareMinHeight(24) - .help("Customize this keybind's action.") - .padding(.leading, -4) - } - private func keycorderSection() -> some View { HStack(spacing: 6) { if action.bypassTriggerKey != true { diff --git a/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift index 8a9fdc7f8..c01060176 100644 --- a/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift @@ -27,6 +27,7 @@ struct KeybindsConfigurationView: View { @Default(.doubleClickToTrigger) private var doubleClickToTrigger @Default(.middleClickTriggersLoop) private var middleClickTriggersLoop @Default(.enableTriggerDelayOnMiddleClick) private var enableTriggerDelayOnMiddleClick + @Default(.hideOnNoSelectionForKeybinds) private var hideOnNoSelectionForKeybinds @Default(.keybinds) private var keybinds /// If the user has "enabled" the trigger delay. @@ -70,8 +71,8 @@ struct KeybindsConfigurationView: View { @ViewBuilder private var settingsSection: some View { - LuminareSection(String(localized: "Settings", comment: "Section header shown in settings")) { - LuminareToggle("Treat left and right keys differently", isOn: $sideDependentTriggerKey) + LuminareSection { + LuminareToggle("Distinguish left and right modifier keys", isOn: $sideDependentTriggerKey) LuminareSlider( "Trigger delay", @@ -83,6 +84,11 @@ struct KeybindsConfigurationView: View { suffix: Text("s", comment: "Unit symbol: seconds") ) + LuminareToggle( + String(localized: "Hide when no action is selected", comment: "Toggle to hide the radial menu whenever no action is selected"), + isOn: $hideOnNoSelectionForKeybinds + ) + LuminareToggle("Double-click to trigger", isOn: $doubleClickToTrigger) LuminareToggle("Middle-click to trigger", isOn: $middleClickTriggersLoop) @@ -93,7 +99,7 @@ struct KeybindsConfigurationView: View { LuminareSection(String(localized: "Cycles", comment: "Section header shown in settings")) { LuminareToggle(isOn: $cycleModeRestartEnabled) { - Text("Always start cycles from first item") + Text("Always start from the first action") .padding(.trailing, 4) .luminareToolTip(attachedTo: .topTrailing) { Text("By default, Loop resumes cycles from where you last left off in each window.") @@ -110,11 +116,11 @@ struct KeybindsConfigurationView: View { private var keybindsSection: some View { LuminareSection(String(localized: "Keybinds", comment: "Section header shown in settings")) { LuminareButtonRow { - Button("Add") { + Button(String(localized: "Add", comment: "Used to add items to a list")) { keybinds.insert(.init(.noAction), at: 0) } - Button("Remove", role: .destructive) { + Button(String(localized: "Remove", comment: "Used to remove items from a list"), role: .destructive) { keybinds.removeAll(where: model.selectedKeybinds.contains) } .disabled(model.selectedKeybinds.isEmpty) @@ -130,15 +136,11 @@ struct KeybindsConfigurationView: View { KeybindItemView(keybind) .environmentObject(model) } emptyView: { - HStack { - Spacer() - VStack { - Text("No keybinds") - .font(.title3) - Text("Press \"Add\" to add a keybind") - .font(.caption) - } - Spacer() + VStack { + Text("No keybinds") + .font(.title3) + Text("Click “Add” to add a keybind") + .font(.caption) } .foregroundStyle(.secondary) .padding() diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift index 8462a63ac..3d048cee3 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift @@ -12,8 +12,8 @@ import SwiftUI struct CustomActionConfigurationView: View { @Environment(\.luminareAnimation) private var luminareAnimation - @Binding var windowAction: WindowAction - @Binding var isPresented: Bool + @Binding private var windowAction: WindowAction + @Binding private var isPresented: Bool @State private var action: WindowAction @State private var currentTab: Tab = .position @@ -174,7 +174,7 @@ struct CustomActionConfigurationView: View { Button { isPresented = false } label: { - Text("Close", comment: "Label for a button that closes a modal window") + Text("Done", comment: "Label for a button that closes a modal window") } } .buttonStyle(.luminare(overrideUseMainStyle: true)) diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift index ff2f3b681..4c4a34904 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift @@ -10,8 +10,8 @@ import Luminare import SwiftUI struct CycleActionConfigurationView: View { - @Binding var windowAction: WindowAction - @Binding var isPresented: Bool + @Binding private var windowAction: WindowAction + @Binding private var isPresented: Bool @State private var action: WindowAction // this is so that onChange is called for each property @@ -36,7 +36,7 @@ struct CycleActionConfigurationView: View { LuminareSection(outerPadding: 0) { LuminareButtonRow { - Button("Add") { + Button(String(localized: "Add", comment: "Used to add items to a list")) { if action.cycle == nil { action.cycle = [] } @@ -44,7 +44,7 @@ struct CycleActionConfigurationView: View { action.cycle?.insert(.init(.noAction), at: 0) } - Button("Remove", role: .destructive) { + Button(String(localized: "Remove", comment: "Used to remove items from a list"), role: .destructive) { action.cycle?.removeAll(where: { selectedKeybinds.contains($0) }) } .disabled(selectedKeybinds.isEmpty) @@ -69,15 +69,11 @@ struct CycleActionConfigurationView: View { ) .environmentObject(KeybindsConfigurationModel()) } emptyView: { - HStack { - Spacer() - VStack { - Text("Nothing to cycle through") - .font(.title3) - Text("Press \"Add\" to add a cycle item") - .font(.caption) - } - Spacer() + VStack { + Text("Nothing to cycle through") + .font(.title3) + Text("Click “Add” to add an action") + .font(.caption) } .foregroundStyle(.secondary) .padding() @@ -90,7 +86,7 @@ struct CycleActionConfigurationView: View { Button { isPresented = false } label: { - Text("Close", comment: "Label for a button that closes a modal window") + Text("Done", comment: "Label for a button that closes a modal window") } .buttonStyle(.luminare(overrideUseMainStyle: true)) .luminareCornerRadius(8) diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift index 6f9a5d62d..5ed039231 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift @@ -13,8 +13,8 @@ import SwiftUI struct StashActionConfigurationView: View { @Environment(\.luminareAnimation) private var luminareAnimation - @Binding var windowAction: WindowAction - @Binding var isPresented: Bool + @Binding private var windowAction: WindowAction + @Binding private var isPresented: Bool @State private var action: WindowAction @State private var currentTab: Tab = .position @@ -163,7 +163,7 @@ struct StashActionConfigurationView: View { Button { isPresented = false } label: { - Text("Close", comment: "Label for a button that closes a modal window") + Text("Done", comment: "Label for a button that closes a modal window") } } .buttonStyle(.luminare(overrideUseMainStyle: true)) diff --git a/Loop/Settings Window/SettingsContentView.swift b/Loop/Settings Window/SettingsContentView.swift index 9266083cf..95c8e8fd5 100644 --- a/Loop/Settings Window/SettingsContentView.swift +++ b/Loop/Settings Window/SettingsContentView.swift @@ -16,6 +16,18 @@ struct SettingsContentView: View { @Environment(\.luminareAnimation) private var animation @Environment(\.luminareTitleBarHeight) private var titleBarHeight @Default(.enableRadialMenuCustomization) var enableRadialMenuCustomization + @Default(.radialMenuVisibility) var radialMenuVisibility + @Default(.previewVisibility) var previewVisibility + @Default(.windowSnapping) var windowSnapping + + private var showRadialMenu: Bool { + model.showRadialMenu && radialMenuVisibility + } + + /// Window snapping always uses the preview, so it's only unused when both are off + private var showPreview: Bool { + model.showPreview && (previewVisibility || windowSnapping) + } private var showRadialMenuGuide: Bool { enableRadialMenuCustomization && model.showRadialMenu && model.currentTab == .radialMenu @@ -76,14 +88,14 @@ struct SettingsContentView: View { // We use an overlay instead of a ZStack so the inspector’s contents // don’t influence the layout of the surrounding views (mainly as a precaution) Color.clear.overlay { - if model.showPreview || showRadialMenuGuide { + if showPreview || showRadialMenuGuide { PreviewView(viewModel: model.previewViewModel) .onGeometryChange(for: CGSize.self, of: \.size) { model.setPreviewBounds(CGRect(origin: .zero, size: $0)) } } - if model.showRadialMenu { + if showRadialMenu { RadialMenuView(viewModel: model.radialMenuViewModel) .allowsHitTesting(false) } @@ -92,7 +104,7 @@ struct SettingsContentView: View { RadialMenuActionsGuide() } } - .animation(animation, value: [model.showRadialMenu, model.showPreview]) + .animation(animation, value: [showRadialMenu, showPreview]) .padding(12) .frame(width: 520) } diff --git a/Loop/Settings Window/SettingsTab.swift b/Loop/Settings Window/SettingsTab.swift index b143ec480..5c3aa4fbe 100644 --- a/Loop/Settings Window/SettingsTab.swift +++ b/Loop/Settings Window/SettingsTab.swift @@ -20,6 +20,7 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { case behavior case keybinds + case gestures case advanced case excludedApps @@ -32,23 +33,25 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { var color: Color { switch self { case .icon: - Color(#colorLiteral(red: 0.2235294118, green: 0.3843137255, blue: 0.6274509804, alpha: 1)) + Color(#colorLiteral(red: 0.310, green: 0.498, blue: 0.843, alpha: 1)) case .accentColor: - Color(#colorLiteral(red: 0.8235294118, green: 0.3529411765, blue: 0.337254902, alpha: 1)) + Color(#colorLiteral(red: 0.914, green: 0.404, blue: 0.380, alpha: 1)) case .radialMenu: - Color(#colorLiteral(red: 0.8078431373, green: 0.6235294118, blue: 0.3254901961, alpha: 1)) + Color(#colorLiteral(red: 0.851, green: 0.663, blue: 0.310, alpha: 1)) case .preview: - Color(#colorLiteral(red: 0.2901960784, green: 0.5647058824, blue: 0.7882352941, alpha: 1)) + Color(#colorLiteral(red: 0.2705882353, green: 0.662745098, blue: 0.9019607843, alpha: 1)) case .behavior: - Color(#colorLiteral(red: 0.4373228079, green: 0.6609574352, blue: 0.2663080928, alpha: 1)) + Color(#colorLiteral(red: 0.463, green: 0.722, blue: 0.278, alpha: 1)) case .keybinds: - Color(#colorLiteral(red: 0.3882352941, green: 0.2823529412, blue: 0.1960784314, alpha: 1)) + Color(#colorLiteral(red: 0.651, green: 0.424, blue: 0.247, alpha: 1)) + case .gestures: + Color(#colorLiteral(red: 0.4352941176, green: 0.4588235294, blue: 0.9098039216, alpha: 1)) case .advanced: - Color(#colorLiteral(red: 0.4823529412, green: 0.4745098039, blue: 0.6588235294, alpha: 1)) + Color(#colorLiteral(red: 0.5647058824, green: 0.4941176471, blue: 0.8470588235, alpha: 1)) case .excludedApps: - Color(#colorLiteral(red: 0.5882352941, green: 0.3137254902, blue: 0.3019607843, alpha: 1)) + Color(#colorLiteral(red: 0.784, green: 0.357, blue: 0.341, alpha: 1)) case .about: - Color(#colorLiteral(red: 0.4509803922, green: 0.4509803922, blue: 0.4509803922, alpha: 1)) + Color(#colorLiteral(red: 0.541, green: 0.541, blue: 0.541, alpha: 1)) } } @@ -60,6 +63,7 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { case .preview: .init(localized: "Settings tab: Preview", defaultValue: "Preview") case .behavior: .init(localized: "Settings tab: Behavior", defaultValue: "Behavior") case .keybinds: .init(localized: "Settings tab: Keybindings", defaultValue: "Keybinds") + case .gestures: .init(localized: "Settings tab: Gestures", defaultValue: "Gestures") case .advanced: .init(localized: "Settings tab: Advanced", defaultValue: "Advanced") case .excludedApps: .init(localized: "Settings tab: Excluded Apps", defaultValue: "Excluded Apps") case .about: .init(localized: "Settings tab: About", defaultValue: "About") @@ -74,6 +78,7 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { case .preview: Image(systemName: "inset.filled.center.rectangle") case .behavior: Image(systemName: "gearshape.fill") case .keybinds: Image(systemName: "keyboard.fill") + case .gestures: Image(systemName: "hand.draw.fill") case .advanced: Image(systemName: "wrench.adjustable.fill") case .excludedApps: Image(systemName: "xmark.octagon.fill") case .about: Image(systemName: "info.circle.fill") @@ -95,6 +100,7 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { case .preview: PreviewConfigurationView() case .behavior: BehaviorConfigurationView() case .keybinds: KeybindsConfigurationView() + case .gestures: GesturesConfigurationView() case .advanced: AdvancedConfigurationView() case .excludedApps: ExcludedAppsConfigurationView() case .about: AboutConfigurationView() @@ -102,7 +108,7 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { } static let themingTabs: [Self] = [.icon, .accentColor, .radialMenu, .preview] - static let settingsTabs: [Self] = [.behavior, .keybinds] + static let settingsTabs: [Self] = [.behavior, .keybinds, .gestures] static let loopTabs: [Self] = [.advanced, .excludedApps, .about] } @@ -116,34 +122,11 @@ struct SettingsTabIconView: View { .foregroundStyle(tab.color.gradient) .opacity(0.8) .overlay { - // Only add shine in dark mode; in light mode it makes the icon look fuzzy/blurred. - if colorScheme == .dark, #available(macOS 26.0, *) { - borderShine(in: .rect(cornerRadius: 6)) - } - tab.image .font(.system(size: 12, weight: .medium)) .foregroundStyle(.white) - .shadow(color: .black.opacity(0.4), radius: 1) + .shadow(color: .black.opacity(0.25), radius: 1) } .frame(width: 22, height: 22) } - - /// Mimics macOS Tahoe's icon shine - private func borderShine(in shape: some InsettableShape) -> some View { - shape - .strokeBorder(.white, lineWidth: 1) - .mask { - LinearGradient( - colors: [ - .white, - .clear, - .white.opacity(0.5) - ], - startPoint: .topLeading, - endPoint: .bottomTrailing - ) - } - .opacity(0.4) - } } diff --git a/Loop/Settings Window/Theming/AccentColorConfiguration.swift b/Loop/Settings Window/Theming/AccentColorConfiguration.swift index 3e59a37c6..f7dad887b 100644 --- a/Loop/Settings Window/Theming/AccentColorConfiguration.swift +++ b/Loop/Settings Window/Theming/AccentColorConfiguration.swift @@ -82,7 +82,7 @@ struct AccentColorConfigurationView: View { private var syncWallpaperButton: some View { Button(action: syncWallpaper) { HStack { - Text("Sync Wallpaper") + Text("Match Wallpaper") if didSyncWallpaper { Image(systemName: "checkmark") diff --git a/Loop/Settings Window/Theming/IconConfiguration.swift b/Loop/Settings Window/Theming/IconConfiguration.swift index 68f29f56c..b78ca59a9 100644 --- a/Loop/Settings Window/Theming/IconConfiguration.swift +++ b/Loop/Settings Window/Theming/IconConfiguration.swift @@ -58,7 +58,7 @@ final class IconConfigurationModel: ObservableObject { if Defaults[.notificationWhenIconUnlocked] { AppDelegate.sendNotification( Bundle.main.appName, - .init(localized: "Icon notifications enabled", defaultValue: "You will now be notified when you unlock a new icon.") + .init(localized: "Icon notifications enabled", defaultValue: "You’ll be notified when you unlock a new icon.") ) if !AppDelegate.areNotificationsEnabled() { Defaults[.notificationWhenIconUnlocked] = false @@ -71,10 +71,10 @@ final class IconConfigurationModel: ObservableObject { Task { @MainActor in guard let window = SettingsWindowManager.shared.window else { return } let alert = NSAlert() - alert.messageText = .init(localized: "Notification permits: info", defaultValue: "\(Bundle.main.appName)'s notification permissions are currently disabled.") - alert.informativeText = .init(localized: "Notification permits: request", defaultValue: "Please turn them on in System Settings.") + alert.messageText = .init(localized: "Notification permits: info", defaultValue: "Notifications for \(Bundle.main.appName) are turned off.") + alert.informativeText = .init(localized: "Notification permits: request", defaultValue: "Turn them on in System Settings.") - let button = alert.addButton(withTitle: .init(localized: "Notification permits: open notification settings", defaultValue: "Open Settings")) + let button = alert.addButton(withTitle: .init(localized: "Notification permits: open notification settings", defaultValue: "Open System Settings")) // Reference: https://x.com/leoshimo/status/1975642593569738755 if #available(macOS 26.0, *) { @@ -132,10 +132,10 @@ struct IconConfigurationView: View { .luminareRoundingBehavior(top: true, bottom: true) } - LuminareSection(String(localized: "Options", comment: "Section header shown in settings")) { - LuminareToggle("Show in dock", isOn: $showDockIcon) + LuminareSection { + LuminareToggle("Show in Dock", isOn: $showDockIcon) LuminareToggle( - "Notify when unlocking new icons", + "Notify when new icons are unlocked", isOn: Binding( get: { notificationWhenIconUnlocked @@ -162,14 +162,6 @@ struct IconVew: View { @State private var nextUnlockCount: Int = -1 @State private var loopsLeft: Int = -1 - private var showLiquidGlassIndicator: Bool { - if #available(macOS 26.0, *), icon.isDefault { - true - } else { - false - } - } - var body: some View { ZStack { if hasBeenUnlocked { @@ -177,13 +169,6 @@ struct IconVew: View { } else { lockedIconView } - - Color.clear - .luminareToolTip(attachedTo: .topTrailing, hidden: !showLiquidGlassIndicator) { - Text("Supports macOS Tahoe’s Liquid Glass effects") - .padding(6) - } - .padding(8) } .onAppear { hasBeenUnlocked = icon.isSelectable diff --git a/Loop/Settings Window/Theming/PreviewConfiguration.swift b/Loop/Settings Window/Theming/PreviewConfiguration.swift index 0cc8cdf68..c6016c850 100644 --- a/Loop/Settings Window/Theming/PreviewConfiguration.swift +++ b/Loop/Settings Window/Theming/PreviewConfiguration.swift @@ -13,109 +13,150 @@ struct PreviewConfigurationView: View { @Environment(\.luminareAnimation) private var luminareAnimation @Default(.previewVisibility) private var previewVisibility - @Default(.moveCursorWithWindow) private var moveCursorWithWindow + @Default(.windowSnapping) private var windowSnapping @Default(.previewPadding) private var previewPadding @Default(.previewCornerRadius) private var previewCornerRadius @Default(.previewBorderThickness) private var previewBorderThickness @Default(.previewUseWindowCornerRadius) private var previewUseWindowCornerRadius + @Default(.previewBackgroundStyle) private var previewBackgroundStyle @Default(.previewBackgroundEnableBlur) private var previewBackgroundEnableBlur @Default(.previewBackgroundAccentOpacity) private var previewBackgroundAccentOpacity var body: some View { LuminareForm { LuminareSection { - LuminareToggle( - isOn: Binding( - get: { - previewVisibility - }, - set: { - previewVisibility = $0 - - if !previewVisibility { - moveCursorWithWindow = false - } - } + // Window snapping always uses the preview, so only offer that choice when it's enabled + if windowSnapping { + LuminarePickerMenu( + "Preview", + selection: previewVisibilityOption, + items: PreviewVisibilityOption.allCases + ) { option in + Text(option.title) + } + } else { + LuminareToggle( + "Preview", + isOn: Binding( + get: { previewVisibilityOption.wrappedValue == .always }, + set: { previewVisibilityOption.wrappedValue = $0 ? .always : .windowSnappingOnly } + ) ) - ) { - Text("Show preview when looping") - .padding(.trailing, 4) - .luminareToolTip(attachedTo: .topTrailing, hidden: previewVisibility) { - Text("Window snapping will still use the preview.") - .padding(6) - } - .animation(luminareAnimation, value: previewVisibility) } - LuminareSlider( - "Padding", - value: $previewPadding.doubleBinding, - in: 0...20, - format: .number.precision(.fractionLength(0...0)), - clampsUpper: false, - clampsLower: true, - suffix: Text("px", comment: "Unit symbol: pixels") - ) - - // On macOS Sequoia and below, simply show the corner radius slider. - if #unavailable(macOS 26) { + if isPreviewUsed { LuminareSlider( - "Corner radius", - value: $previewCornerRadius.doubleBinding, - in: 0...25, + "Padding", + value: $previewPadding.doubleBinding, + in: 0...20, format: .number.precision(.fractionLength(0...0)), clampsUpper: false, clampsLower: true, suffix: Text("px", comment: "Unit symbol: pixels") ) - } - - LuminareSlider( - "Border thickness", - value: $previewBorderThickness.doubleBinding, - in: 0...10, - format: .number.precision(.fractionLength(0...0)), - clampsUpper: false, - clampsLower: true, - suffix: Text("px", comment: "Unit symbol: pixels") - ) - } - // On macOS Tahoe and above, Loop has the ability to read the selected window's corner radius. - // So display it in a separate section, with the option to configure this functionality. - if #available(macOS 26, *) { - LuminareSection("Corner Radius") { - LuminareToggle( - "Prioritize selected window’s corner radius", - isOn: $previewUseWindowCornerRadius - ) + // On macOS Sequoia and below, simply show the corner radius slider. + if #unavailable(macOS 26) { + LuminareSlider( + "Corner radius", + value: $previewCornerRadius.doubleBinding, + in: 0...25, + format: .number.precision(.fractionLength(0...0)), + clampsUpper: false, + clampsLower: true, + suffix: Text("px", comment: "Unit symbol: pixels") + ) + } LuminareSlider( - previewUseWindowCornerRadius ? "Default corner radius" : "Corner radius", - value: $previewCornerRadius.doubleBinding, - in: 0...25, + "Border thickness", + value: $previewBorderThickness.doubleBinding, + in: 0...10, format: .number.precision(.fractionLength(0...0)), clampsUpper: false, clampsLower: true, suffix: Text("px", comment: "Unit symbol: pixels") ) } - .animation(luminareAnimation, value: previewUseWindowCornerRadius) } - LuminareSection("Background") { - LuminareToggle("Enable blur", isOn: $previewBackgroundEnableBlur) - - LuminareSlider( - "Accent opacity", - value: $previewBackgroundAccentOpacity.doubleBinding, - in: 0...1, - step: 0.1, - format: .percent.precision(.fractionLength(0...0)), - clampsUpper: true, - clampsLower: true - ) + if isPreviewUsed { + // On macOS Tahoe and above, Loop has the ability to read the selected window's corner radius. + // So display it in a separate section, with the option to configure this functionality. + if #available(macOS 26, *) { + LuminareSection("Corner Radius") { + LuminareToggle( + "Match target window", + isOn: $previewUseWindowCornerRadius + ) + + if !previewUseWindowCornerRadius { + LuminareSlider( + "Radius", + value: $previewCornerRadius.doubleBinding, + in: 0...25, + format: .number.precision(.fractionLength(0...0)), + clampsUpper: false, + clampsLower: true, + suffix: Text("px", comment: "Unit symbol: pixels") + ) + } + } + } + + LuminareSection("Background") { + LuminarePickerMenu( + "Style", + selection: $previewBackgroundStyle, + items: PreviewBackgroundStyle.allCases + ) { style in + Text(style.displayName) + } + + if previewBackgroundStyle == .custom { + LuminareToggle("Blur", isOn: $previewBackgroundEnableBlur) + + LuminareSlider( + "Accent opacity", + value: $previewBackgroundAccentOpacity.doubleBinding, + in: 0...1, + step: 0.1, + format: .percent.precision(.fractionLength(0...0)), + clampsUpper: true, + clampsLower: true + ) + } + } + .animation(luminareAnimation, value: previewBackgroundStyle) } } + .animation(luminareAnimation, value: previewUseWindowCornerRadius) + .animation(luminareAnimation, value: windowSnapping) + .animation(luminareAnimation, value: previewVisibility) + } + + /// Window snapping always uses the preview, so it's only unused when both are off + private var isPreviewUsed: Bool { + previewVisibility || windowSnapping + } + + private var previewVisibilityOption: Binding { + Binding( + get: { previewVisibility ? .always : .windowSnappingOnly }, + set: { previewVisibility = $0 == .always } + ) + } +} + +/// When the preview is shown, stored as `previewVisibility` +private enum PreviewVisibilityOption: CaseIterable { + case always + case windowSnappingOnly + + var title: String { + switch self { + case .always: String(localized: "Always", comment: "Preview visibility option: show the preview when looping and window snapping") + case .windowSnappingOnly: String(localized: "Window Snapping Only", comment: "Preview visibility option: only show the preview when window snapping") + } } } diff --git a/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift b/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift index 2799521de..58c356a96 100644 --- a/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift +++ b/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift @@ -10,19 +10,17 @@ import Luminare import SwiftUI struct RadialMenuActionItemView: View { - @Environment(\.luminareItemBeingHovered) private var isHovering - @Default(.keybinds) private var keybinds @State private var action: RadialMenuAction - @State private var isConfiguringCustom: Bool = false - @State private var isConfiguringCycle: Bool = false - @State private var isPickerPresented = false - @Binding private var externalAction: RadialMenuAction private let moveUp: () -> () private let moveDown: () -> () + @State private var isActionPickerPresented = false + @State private var isConfiguringCustom = false + @State private var isConfiguringCycle = false + init( _ action: Binding, moveUp: @escaping () -> (), @@ -34,9 +32,29 @@ struct RadialMenuActionItemView: View { self.moveDown = moveDown } + private var actionBinding: Binding { + Binding( + get: { + action.resolved ?? .init(.noAction) + }, + set: { newAction in + switch action.type { + case .custom: + action.type = .custom(newAction) + case .keybindReference: + guard let index = Defaults[.keybinds].firstIndex(where: { $0.id == action.associatedActionId }) else { + return + } + + keybinds[index] = newAction + } + } + ) + } + var body: some View { HStack(spacing: 12) { - label + actionSelection Spacer() @@ -67,61 +85,66 @@ struct RadialMenuActionItemView: View { } } .padding(.horizontal, 12) - .onChange(of: action) { newAction in - externalAction = newAction - - guard let resolvedAction = action.resolved else { - isConfiguringCustom = false - isConfiguringCycle = false - return + .onChange(of: action.resolved?.direction) { _ in + if action.resolved?.direction.isCustomizable == true { + isConfiguringCustom = true } - - Task { - isConfiguringCustom = resolvedAction.direction.isCustomizable - isConfiguringCycle = resolvedAction.direction == .cycle + if action.resolved?.direction == .cycle { + isConfiguringCycle = true } } + .onChange(of: action) { externalAction = $0 } } - private var label: some View { + private var actionSelection: some View { actionIndicator - .background(alignment: .leading) { - Color.clear - .frame(width: 300 - 24) - .luminarePopover( - isPresented: $isPickerPresented, - arrowEdge: .top, - shouldHideAnchor: true, - shouldAnimate: false - ) { - RadialMenuActionPickerView(selection: $action.type) - .frame(width: 300, height: 300) - } - .onChange(of: isPickerPresented) { _ in - if !isPickerPresented { - PickerListEventMonitorManager.shared.removeAllMonitors() - } - } + .luminarePopover( + isPresented: $isActionPickerPresented, + arrowEdge: .top, + attachmentAnchor: .topLeading, + shouldHideAnchor: true, + shouldAnimate: false + ) { + RadialMenuActionPickerView(selection: $action.type) + .frame(width: 300, height: 300) + } + .onChange(of: isActionPickerPresented) { _ in + if !isActionPickerPresented { + PickerListEventMonitorManager.shared.removeAllMonitors() + } } } - var actionIndicator: some View { + private var actionIndicator: some View { HStack(spacing: 2) { Button { - isPickerPresented = true + isActionPickerPresented.toggle() } label: { HStack(spacing: 8) { if let action = action.resolved { IconView(action: action) - Text(action.getName()) - .fontWeight(.regular) - .lineLimit(1) + if let info = action.direction.infoText { + Text(action.getName()) + .fontWeight(.regular) + .lineLimit(1) + .padding(.trailing, 4) + .luminareToolTip(attachedTo: .topTrailing) { + Text(info) + .padding(6) + } + } else { + Text(action.getName()) + .fontWeight(.regular) + .lineLimit(1) + } } else { Image(systemName: "bolt.horizontal.fill") .foregroundStyle(.secondary) - Text("Failed to resolve linked keybind") + Text("Linked keybind not found") + .fontWeight(.regular) + .lineLimit(1) .foregroundStyle(.secondary) } } @@ -132,28 +155,11 @@ struct RadialMenuActionItemView: View { .luminareFilledStates([.hovering, .pressed]) .luminareBorderedStates(.hovering) .luminareMinHeight(24) + .help("Customize this radial menu action.") .padding(.leading, -4) Group { if let resolvedAction = action.resolved { - let actionBinding = Binding( - get: { - resolvedAction - }, - set: { newAction in - switch action.type { - case .custom: - action.type = .custom(newAction) - case .keybindReference: - guard let index = Defaults[.keybinds].firstIndex(where: { $0.id == action.associatedActionId }) else { - return - } - - keybinds[index] = newAction - } - } - ) - if resolvedAction.direction.isCustomizable { Button { isConfiguringCustom = true @@ -176,8 +182,8 @@ struct RadialMenuActionItemView: View { .frame(width: 400) } } - .luminareCornerRadius(24) - .help("Customize this action's custom frame.") + .luminareModalCornerRadius(24) + .help("Customize this action’s custom frame.") } if resolvedAction.direction == .cycle { @@ -194,13 +200,13 @@ struct RadialMenuActionItemView: View { ) .frame(width: 400) } - .luminareCornerRadius(24) + .luminareModalCornerRadius(24) .help("Customize what this action cycles through.") } } } .font(.title3) - .foregroundStyle(isHovering ? .primary : .secondary) + .foregroundStyle(.secondary) } } } diff --git a/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionPickerView.swift b/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionPickerView.swift index dea82aa37..333676769 100644 --- a/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionPickerView.swift +++ b/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionPickerView.swift @@ -58,7 +58,7 @@ struct RadialMenuActionPickerView: View { var body: some View { VStack(spacing: 0) { TextField( - String(localized: "Search for a window action", defaultValue: "Search…"), + String(localized: "Search for a window action", defaultValue: "Search"), text: $searchText ) .textFieldStyle(.plain) diff --git a/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift b/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift index 03affaab9..60b63c127 100644 --- a/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift +++ b/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift @@ -10,13 +10,13 @@ import Luminare import SwiftUI struct RadialMenuConfigurationView: View { - @EnvironmentObject private var windowModel: SettingsWindowManager @Environment(\.luminareAnimation) private var luminareAnimation + @EnvironmentObject private var windowModel: SettingsWindowManager @Default(.radialMenuVisibility) private var radialMenuVisibility @Default(.radialMenuCornerRadius) private var radialMenuCornerRadius @Default(.radialMenuThickness) private var radialMenuThickness - @Default(.enableRadialMenuCustomization) var enableRadialMenuCustomization + @Default(.enableRadialMenuCustomization) private var enableRadialMenuCustomization @Default(.radialMenuActions) private var radialMenuActions @State private var selectedRadialMenuActions: Set = [] @@ -62,14 +62,14 @@ struct RadialMenuConfigurationView: View { if enableRadialMenuCustomization { LuminareSection( String(localized: "Actions", comment: "Header for radial menu section shown in settings"), - String(localized: "Left-click to step through cycle actions.", comment: "Section footer shown in settings") + String(localized: "Click to step through cycle actions.", comment: "Section footer shown in settings") ) { LuminareButtonRow { - Button("Add") { + Button(String(localized: "Add", comment: "Used to add items to a list")) { radialMenuActions.insert(.custom(.init(.noAction)), at: 0) } - Button("Remove", role: .destructive) { + Button(String(localized: "Remove", comment: "Used to remove items from a list"), role: .destructive) { radialMenuActions.removeAll(where: selectedRadialMenuActions.contains) } .disabled(selectedRadialMenuActions.isEmpty) @@ -88,15 +88,11 @@ struct RadialMenuConfigurationView: View { moveDown: { moveAction(action.wrappedValue, down: true) } ) } emptyView: { - HStack { - Spacer() - VStack { - Text("No radial menu actions") - .font(.title3) - Text("Press \"Add\" to add an action") - .font(.caption) - } - Spacer() + VStack { + Text("No radial menu actions") + .font(.title3) + Text("Click “Add” to add an action") + .font(.caption) } .foregroundStyle(.secondary) .padding() diff --git a/Loop/Stashing/StashManager.swift b/Loop/Stashing/StashManager.swift index 2025d364a..690128c30 100644 --- a/Loop/Stashing/StashManager.swift +++ b/Loop/Stashing/StashManager.swift @@ -36,6 +36,7 @@ import SwiftUI /// ## Considerations: /// - Currently supports only one revealed window at a time. @Loggable +@MainActor final class StashManager { static let shared = StashManager() private init() {} @@ -110,32 +111,31 @@ final class StashManager { } } - /// Determines whether the given window action should be intercepted by the StashManager. - /// - /// If the action targets a stashed window that is no longer visible, the currently focused - /// window will be stashed in its place. The stashed window is then either revealed or hidden, - /// depending on its current state. This allows the StashManager to take over the behavior, - /// bypassing the default flow handled by the LoopManager. - /// - /// - Parameter action: The window action triggered. - /// - Returns: `true` if the action is handled by the StashManager and the normal flow should be bypassed; otherwise, `false`. - @discardableResult - func handleIfStashed(_ action: WindowAction, screen: NSScreen) -> Bool { + /// Returns the stashed window matching the given action and screen, if one exists. + func stashedWindow(for action: WindowAction, on screen: NSScreen) -> StashedWindowInfo? { guard action.direction == .stash, let stashedWindow = store.stashedWindow(for: action, on: screen), !stashedWindow.window.isWindowHidden, !stashedWindow.window.isApplicationHidden else { + return nil + } + + return stashedWindow + } + + /// Toggles the stashed window matching the given action and screen, if one exists. + @discardableResult + func toggleStashedWindow(for action: WindowAction, on screen: NSScreen) async -> Bool { + guard let stashedWindow = stashedWindow(for: action, on: screen) else { return false } - log.info("Intercepting window action for stashed window \(stashedWindow.window.description)") + log.info("Toggling stashed window \(stashedWindow.window.description)") - Task { - if store.isWindowRevealed(stashedWindow.window.cgWindowID) { - await hideWindow(stashedWindow) - } else { - await revealWindow(stashedWindow) - } + if store.isWindowRevealed(stashedWindow.window.cgWindowID) { + await hideWindow(stashedWindow) + } else { + await revealWindow(stashedWindow) } return true @@ -434,7 +434,9 @@ private extension StashManager { .leftMouseDragged // Dragging items to stashed windows ], callback: { [weak self] cgEvent in - self?.handleMouseMoved(cgEvent: cgEvent) + Task { @MainActor in + self?.handleMouseMoved(cgEvent: cgEvent) + } } ) monitor.start() diff --git a/Loop/Stashing/StashedWindowStore.swift b/Loop/Stashing/StashedWindowStore.swift index 0948868a0..8cec0bc0d 100644 --- a/Loop/Stashing/StashedWindowStore.swift +++ b/Loop/Stashing/StashedWindowStore.swift @@ -10,6 +10,7 @@ import Foundation import Scribe import SwiftUI +@MainActor protocol StashedWindowsStoreDelegate: AnyObject { var stashedWindowVisiblePadding: CGFloat { get } func onStashedWindowsRestored() @@ -18,6 +19,7 @@ protocol StashedWindowsStoreDelegate: AnyObject { /// Keep the stashed windows and the revealed window ids both in memory and in Defaults. /// Restore windows stashed from a previous session. @Loggable +@MainActor final class StashedWindowsStore { weak var delegate: StashedWindowsStoreDelegate? diff --git a/Loop/Updater/UpdateDownloader.swift b/Loop/Updater/UpdateDownloader.swift index f46cd4a9b..91d46f4b6 100644 --- a/Loop/Updater/UpdateDownloader.swift +++ b/Loop/Updater/UpdateDownloader.swift @@ -15,7 +15,7 @@ final class UpdateDownloader: NSObject { private var urlSession: URLSession? private var downloadTask: URLSessionDownloadTask? - private var progressClosure: ((UpdateProgress) async -> ())? + private var progressClosure: (@MainActor (UpdateProgress) -> ())? private var completionClosure: ((Result) -> ())? private(set) var isDownloading = false private var performanceTracker: PerformanceTracker = .init() @@ -32,7 +32,7 @@ final class UpdateDownloader: NSObject { func downloadUpdate( manifest: UpdateManifest, - progress: @escaping (UpdateProgress) async -> () + progress: @escaping @MainActor (UpdateProgress) -> () ) async throws -> URL { guard !isDownloading else { throw DownloadError.downloadInProgress @@ -75,7 +75,7 @@ final class UpdateDownloader: NSObject { private func setupDownload( url: URL, - progress: @escaping (UpdateProgress) async -> (), + progress: @escaping @MainActor (UpdateProgress) -> (), completion: @escaping (Result) -> () ) { isDownloading = true @@ -173,7 +173,7 @@ extension UpdateDownloader: URLSessionDownloadDelegate { totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64 ) { - Task { + Task { @MainActor in guard self.isDownloading else { return } let progress = self.performanceTracker.updateProgress( @@ -182,7 +182,7 @@ extension UpdateDownloader: URLSessionDownloadDelegate { totalBytesExpectedToWrite: totalBytesExpectedToWrite ) - await self.progressClosure?(progress) + self.progressClosure?(progress) } } diff --git a/Loop/Updater/UpdateInstaller.swift b/Loop/Updater/UpdateInstaller.swift index 3cee1c0bd..1af8cc5ae 100644 --- a/Loop/Updater/UpdateInstaller.swift +++ b/Loop/Updater/UpdateInstaller.swift @@ -50,7 +50,7 @@ actor UpdateInstaller { func installUpdate( from downloadURL: URL, manifest: UpdateManifest, - progress: @escaping (UpdateProgress) async -> () + progress: @escaping @MainActor @Sendable (UpdateProgress) -> () ) async throws { log.info("Starting installation of update: \(manifest.version)") @@ -169,9 +169,9 @@ actor UpdateInstaller { private func askUserForRelocation() async -> Bool { let alert = NSAlert() alert.messageText = String(localized: "Move to Applications Folder?") - alert.informativeText = String(localized: "\(Bundle.main.appName) is not in your Applications folder. Would you like to install the update to your Applications folder instead?") + alert.informativeText = String(localized: "\(Bundle.main.appName) isn’t in your Applications folder. Would you like to install the update to your Applications folder instead?") alert.alertStyle = .informational - alert.addButton(withTitle: String(localized: "Install to Applications")) + alert.addButton(withTitle: String(localized: "Install in Applications Folder")) alert.addButton(withTitle: String(localized: "Keep in Current Location")) return alert.runModal() == .alertFirstButtonReturn } @@ -634,11 +634,11 @@ actor UpdateInstaller { let alert = NSAlert() alert.messageText = String(localized: "Administrator Authorization Required") alert.informativeText = String( - localized: "\(Bundle.main.appName) could not install the update at \(failedTargetPath) (\(failureReason)). Would you like to install this update in your Applications folder instead?" + localized: "\(Bundle.main.appName) couldn’t install the update at \(failedTargetPath) (\(failureReason)). Would you like to install this update in your Applications folder instead?" ) alert.alertStyle = .warning alert.addButton( - withTitle: String(localized: "Install in Your Applications Folder") + withTitle: String(localized: "Install in Applications Folder") ) alert.addButton( withTitle: String(localized: "Cancel Update") diff --git a/Loop/Updater/Updater.swift b/Loop/Updater/Updater.swift index ee1b9d567..c94b9d892 100755 --- a/Loop/Updater/Updater.swift +++ b/Loop/Updater/Updater.swift @@ -70,8 +70,7 @@ final class Updater: ObservableObject { } private static func checkIfUpdatesEnabled() -> Bool { - if let env = ProcessInfo.processInfo.environment["LOOP_SKIP_UPDATE_CHECK"], - env == "1" || env.lowercased() == "true" { + if ProcessInfo.processInfo.isEnvironmentFlagEnabled("LOOP_SKIP_UPDATE_CHECK") { return false } return Defaults[.updatesEnabled] @@ -88,8 +87,12 @@ final class Updater: ObservableObject { if !NSApp.isActive, NSApp.windows.allSatisfy({ !$0.isVisible }) { log.info("Automatic updates enabled, installing update...") Task { - try await downloadAndInstallUpdate() - await relaunchAfterUpdate() + do { + try await downloadAndInstallUpdate() + await relaunchAfterUpdate() + } catch { + // downloadAndInstallUpdate already logs the failure and updates installState + } } } else { log.info("Automatic updates enabled, but Loop is active. Skipping installation.") @@ -120,8 +123,9 @@ final class Updater: ObservableObject { private func makeUpdateCheckerTask() -> Task<(), Never>? { Task { while !Task.isCancelled { - // 6 hours - try? await Task.sleep(for: .seconds(21600)) + // Clamped to avoid hitting GitHub's unauthenticated API rate limit + let hours = max(Defaults[.updateCheckInterval], 0.25) + try? await Task.sleep(for: .seconds(hours * 3600)) await self.fetchLatestInfo() } diff --git a/Loop/Updater/UpdaterModels.swift b/Loop/Updater/UpdaterModels.swift index c613ebb1e..8202827d9 100644 --- a/Loop/Updater/UpdaterModels.swift +++ b/Loop/Updater/UpdaterModels.swift @@ -207,9 +207,9 @@ enum InstallState: Equatable { case .installing: " " // Helps with alignment for the animation once the update finishes case .readyToRestart: - String(localized: "Relaunch to complete") + String(localized: "Relaunch to Complete") case .failed: - String(localized: "Install failed") + String(localized: "Install Failed") } } @@ -258,7 +258,7 @@ enum UpdateAvailability { var text: String { switch self { case .unavailable: - String(localized: "Check for updates…") + String(localized: "Check for Updates…") case .available: String(localized: "Update…") case .osNotSupported: diff --git a/Loop/Updater/Views/UpdateView.swift b/Loop/Updater/Views/UpdateView.swift index b066886e7..feed2c192 100644 --- a/Loop/Updater/Views/UpdateView.swift +++ b/Loop/Updater/Views/UpdateView.swift @@ -144,7 +144,7 @@ struct UpdateView: View { Image(systemName: "arrow.right") Text(targetVersion.shortDisplay) } else { - Text("Update from: \(Text(currentVersion.shortDisplay))") + Text("Updating from \(Text(currentVersion.shortDisplay))") .fontWeight(.semibold) } } @@ -181,7 +181,7 @@ struct UpdateView: View { Button { Updater.shared.dismissWindow() } label: { - Text(updater.installState.isFailure ? "Try again later" : "Remind me later") + Text(updater.installState.isFailure ? "Try Again Later" : "Remind Me Later") .contentTransition(.numericText()) .padding(.trailing, 4) .luminareToolTip(attachedTo: .topTrailing, hidden: updater.installState.errorDescription == nil) { @@ -207,7 +207,8 @@ struct UpdateView: View { return } - try await Updater.shared.downloadAndInstallUpdate() + // Failures are logged and surfaced through installState + try? await Updater.shared.downloadAndInstallUpdate() } } label: { ZStack { diff --git a/Loop/Utilities/AccessibilityManager.swift b/Loop/Utilities/AccessibilityManager.swift index cfd292113..587e973fa 100644 --- a/Loop/Utilities/AccessibilityManager.swift +++ b/Loop/Utilities/AccessibilityManager.swift @@ -104,17 +104,27 @@ final class AccessibilityManager { resetInputMonitoring() let alert = NSAlert() - alert.messageText = .init( - localized: "Accessibility Request: Title", - defaultValue: "\(Bundle.main.appName) Needs Accessibility Permissions" - ) + // macOS 27 renamed the Accessibility privacy pane to Device Control and Data Access + alert.messageText = if #available(macOS 27, *) { + .init( + localized: "Accessibility Request: Title (macOS 27)", + defaultValue: "\(Bundle.main.appName) Needs Device Control and Data Access", + comment: "Title of the alert asking for permission, using the name of the privacy pane in macOS 27 and later" + ) + } else { + .init( + localized: "Accessibility Request: Title", + defaultValue: "\(Bundle.main.appName) Needs Accessibility Permission", + comment: "Title of the alert asking for permission, using the name of the privacy pane in macOS 26 and earlier" + ) + } alert.informativeText = String( localized: "Accessibility Request: Content", - defaultValue: "Please grant access to be able to resize windows." + defaultValue: "Grant access in System Settings so \(Bundle.main.appName) can resize windows." ) // Reference: https://x.com/leoshimo/status/1975642593569738755 - let button = alert.addButton(withTitle: .init(localized: "OK")) + let button = alert.addButton(withTitle: .init(localized: "Open System Settings", comment: "Button in the alert asking for Accessibility permission")) if #available(macOS 26.0, *) { button.tintProminence = .primary } diff --git a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift index 77c8ba06a..bc7de4ec0 100644 --- a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift +++ b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift @@ -10,7 +10,7 @@ import Scribe /// Active event monitor that can process and alter events when needed. final class ActiveEventMonitor: BaseEventTapMonitor { - private let eventCallback: (CGEvent) -> Unmanaged? + private let eventCallback: (CGEventTapProxy, CGEvent) -> Unmanaged? enum EventHandling { case forward @@ -47,45 +47,60 @@ final class ActiveEventMonitor: BaseEventTapMonitor { /// - placement: whether to add this monitor as a head or tail relative to other event monitors within this tap. /// - events: the events to capture within this event monitor. /// - callback: a callback to process and potentially alter received events. - init( + convenience init( _ name: String, tapLocation: CGEventTapLocation = .cgSessionEventTap, placement: CGEventTapPlacement = .tailAppendEventTap, events: [CGEventType], callback: @escaping (CGEvent) -> Unmanaged? ) { - self.eventCallback = callback + self.init( + name, + tapLocation: tapLocation, + placement: placement, + events: events, + proxyCallback: { _, event in callback(event) } + ) + } + + /// Initializes an `ActiveEventMonitor` whose callback also receives the tap proxy. + /// The proxy is only valid for the duration of the callback, and can be used with `CGEventTapPostEvent` + /// to post events from this tap's position, ahead of the event currently being processed. + /// - Parameters: + /// - name: a human-readable identifier used in log messages. + /// - tapLocation: the location at which this event tap will be placed. + /// - placement: whether to add this monitor as a head or tail relative to other event monitors within this tap. + /// - events: the events to capture within this event monitor. + /// - proxyCallback: a callback to process and potentially alter received events, called on `EventTapThread`. + init( + _ name: String, + tapLocation: CGEventTapLocation = .cgSessionEventTap, + placement: CGEventTapPlacement = .tailAppendEventTap, + events: [CGEventType], + proxyCallback: @escaping (CGEventTapProxy, CGEvent) -> Unmanaged? + ) { + self.eventCallback = proxyCallback super.init() let eventsOfInterest = events.reduce(CGEventMask(0)) { $0 | (1 << $1.rawValue) } - let callback: CGEventTapCallBack = { _, _, event, refcon in - // Try and obtain a reference to self, but if we fail, just return the unprocessed event. - guard let refcon else { - return Unmanaged.passUnretained(event) - } + let callback: CGEventTapCallBack = { proxy, eventType, event, refcon in + guard let refcon else { return nil } let observer = Unmanaged.fromOpaque(refcon).takeUnretainedValue() - if event.type == .tapDisabledByTimeout { - // Tap timed out, schedule a restart on the tap thread so the circuit breaker can run + // Tap management notifications carry a null event, so read eventType, not event.type + // Disabled by the system for being slow or for secure input + if eventType == .tapDisabledByTimeout || eventType == .tapDisabledByUserInput { if observer.isEnabled { - let tapRunLoop = EventTapThread.shared.runLoop - CFRunLoopPerformBlock(tapRunLoop, CFRunLoopMode.commonModes as CFTypeRef) { - observer.attemptRestart() - } - CFRunLoopWakeUp(tapRunLoop) + observer.attemptRestart() } - return Unmanaged.passUnretained(event) - } - - if event.type == .tapDisabledByUserInput { - // Explicitly disabled by the user/system, don't auto-restart - return Unmanaged.passUnretained(event) + return nil } - return observer.handleEvent(event: event) + guard unsafeBitCast(event, to: UnsafeRawPointer?.self) != nil else { return nil } + return observer.handleEvent(proxy: proxy, event: event) } - let userInfo = Unmanaged.passUnretained(self).toOpaque() + let userInfo = Unmanaged.passRetained(self).toOpaque() if let eventTap = CGEvent.tapCreate( tap: tapLocation, @@ -98,10 +113,11 @@ final class ActiveEventMonitor: BaseEventTapMonitor { setupRunLoopSource(eventTap: eventTap, readableIdentifier: name) } else { log.info("Failed to create event tap") + Unmanaged.passUnretained(self).release() } } - private func handleEvent(event: CGEvent) -> Unmanaged? { - eventCallback(event) + private func handleEvent(proxy: CGEventTapProxy, event: CGEvent) -> Unmanaged? { + eventCallback(proxy, event) } } diff --git a/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift b/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift index 646cc85a0..1dcdb4bf3 100644 --- a/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift +++ b/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift @@ -24,23 +24,33 @@ class BaseEventTapMonitor: EventMonitorProtocol, Identifiable, Equatable { private var readableIdentifier: String? private(set) var isEnabled: Bool = false + /// True while the tap's refcon holds a passRetained reference to self + private var refconRetainOutstanding: Bool = false + private var restartTimestamps: [ContinuousClock.Instant] = [] deinit { tearDownEventTap() } + /// Subclasses must pass `Unmanaged.passRetained(self).toOpaque()` as the tap's userInfo + /// before calling this, so the base class can balance that retain in `tearDownEventTap` func setupRunLoopSource(eventTap: CFMachPort, readableIdentifier: String) { let runLoop = EventTapThread.shared.runLoop self.readableIdentifier = readableIdentifier - if let runLoopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0) { - self.eventTap = eventTap - self.runLoop = runLoop - self.runLoopSource = runLoopSource - CFRunLoopAddSource(runLoop, runLoopSource, .commonModes) - CFRunLoopWakeUp(runLoop) + guard let runLoopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0) else { + CFMachPortInvalidate(eventTap) + Unmanaged.passUnretained(self).release() + return } + + refconRetainOutstanding = true + self.eventTap = eventTap + self.runLoop = runLoop + self.runLoopSource = runLoopSource + CFRunLoopAddSource(runLoop, runLoopSource, .commonModes) + CFRunLoopWakeUp(runLoop) } func start() { @@ -80,22 +90,31 @@ class BaseEventTapMonitor: EventMonitorProtocol, Identifiable, Equatable { lhs.id == rhs.id } - /// Attempts to re-enable the tap after a timeout, giving up if it's restarting too frequently. + /// Re-enables the tap after the system disabled it. + /// If it's restarting too frequently, pauses first so a stalled tap doesn't keep interrupting input. func attemptRestart() { let now = ContinuousClock.now let windowStart = now - Self.restartWindow restartTimestamps.removeAll { $0 < windowStart } restartTimestamps.append(now) - let identifier = readableIdentifier ?? id.uuidString - - if restartTimestamps.count > Self.maxRestartsInWindow { - log.warn("Event tap '\(identifier)' restart cascade detected, tearing down") - tearDownEventTap() + guard restartTimestamps.count > Self.maxRestartsInWindow else { + start() return } - start() + let identifier = readableIdentifier ?? id.uuidString + log.warn("Event tap '\(identifier)' restart cascade detected, pausing for \(Self.restartWindow)") + restartTimestamps.removeAll() + + let runLoop = EventTapThread.shared.runLoop + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(2)) { [weak self] in + CFRunLoopPerformBlock(runLoop, CFRunLoopMode.commonModes as CFTypeRef) { [weak self] in + guard let self, isEnabled else { return } + start() + } + CFRunLoopWakeUp(runLoop) + } } private func tearDownEventTap() { @@ -110,18 +129,29 @@ class BaseEventTapMonitor: EventMonitorProtocol, Identifiable, Equatable { self.runLoopSource = nil isEnabled = false + // Balance the passRetained from setup on the tap thread, after invalidation, + // so any in-flight callback finishes before self can deallocate + let releaseToken: Unmanaged? = refconRetainOutstanding ? Unmanaged.passUnretained(self) : nil + refconRetainOutstanding = false + if let eventTap, CFMachPortIsValid(eventTap) { CGEvent.tapEnable(tap: eventTap, enable: false) - CFMachPortInvalidate(eventTap) } - guard let runLoop, let runLoopSource else { return } + guard let runLoop, let runLoopSource else { + if let eventTap, CFMachPortIsValid(eventTap) { + CFMachPortInvalidate(eventTap) + } + releaseToken?.release() + return + } - // Keep the tap callback's refcon pointer valid until any in-flight callback finishes - let monitor = self CFRunLoopPerformBlock(runLoop, CFRunLoopMode.commonModes as CFTypeRef) { + if let eventTap, CFMachPortIsValid(eventTap) { + CFMachPortInvalidate(eventTap) + } CFRunLoopRemoveSource(runLoop, runLoopSource, .commonModes) - _ = monitor + releaseToken?.release() } CFRunLoopWakeUp(runLoop) } diff --git a/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift b/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift index 5549c28cd..d8eb31508 100644 --- a/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift +++ b/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift @@ -31,36 +31,25 @@ final class PassiveEventMonitor: BaseEventTapMonitor { super.init() let eventsOfInterest = events.reduce(CGEventMask(0)) { $0 | (1 << $1.rawValue) } - let callback: CGEventTapCallBack = { _, _, event, refcon in - // Try and obtain a reference to self - guard let refcon else { - return Unmanaged.passUnretained(event) - } + let callback: CGEventTapCallBack = { _, eventType, event, refcon in + guard let refcon else { return nil } let observer = Unmanaged.fromOpaque(refcon).takeUnretainedValue() - if event.type == .tapDisabledByTimeout { - // Tap timed out, schedule a restart on the tap thread so the circuit breaker can run + // Tap management notifications carry a null event, so read eventType, not event.type + // Disabled by the system for being slow or for secure input + if eventType == .tapDisabledByTimeout || eventType == .tapDisabledByUserInput { if observer.isEnabled { - let tapRunLoop = EventTapThread.shared.runLoop - CFRunLoopPerformBlock(tapRunLoop, CFRunLoopMode.commonModes as CFTypeRef) { - observer.attemptRestart() - } - CFRunLoopWakeUp(tapRunLoop) + observer.attemptRestart() } - return Unmanaged.passUnretained(event) - } - - if event.type == .tapDisabledByUserInput { - // Explicitly disabled by the user/system, don't auto-restart - return Unmanaged.passUnretained(event) + return nil } - // Call the callback but always pass the unmodified event through + guard unsafeBitCast(event, to: UnsafeRawPointer?.self) != nil else { return nil } observer.eventCallback(event) return Unmanaged.passUnretained(event) } - let userInfo = Unmanaged.passUnretained(self).toOpaque() + let userInfo = Unmanaged.passRetained(self).toOpaque() if let eventTap = CGEvent.tapCreate( tap: tapLocation, @@ -73,6 +62,7 @@ final class PassiveEventMonitor: BaseEventTapMonitor { setupRunLoopSource(eventTap: eventTap, readableIdentifier: name) } else { log.info("Failed to create event tap") + Unmanaged.passUnretained(self).release() } } } diff --git a/Loop/Utilities/MissionControl.swift b/Loop/Utilities/MissionControl.swift new file mode 100644 index 000000000..61d8c8c3f --- /dev/null +++ b/Loop/Utilities/MissionControl.swift @@ -0,0 +1,28 @@ +// +// MissionControl.swift +// Loop +// +// Created by Kai Azim on 2026-09-24. +// + +import AppKit + +enum MissionControl { + private static let overlayIdentifiers: Set = ["mc", "appexpose"] + + /// The Dock posts no notifications for these, but adds a group to its AX tree while each is showing + static var isShowing: Bool { + guard let dock = NSRunningApplication.runningApplications(withBundleIdentifier: "com.apple.dock").first else { + return false + } + + let dockElement = AXUIElementCreateApplication(dock.processIdentifier) + // Loop can't open while this runs, so don't wait out the default timeout on a hung Dock + AXUIElementSetMessagingTimeout(dockElement, 0.1) + + return dockElement.children.contains { element in + guard let identifier: String = try? element.getValue(.identifier) else { return false } + return overlayIdentifiers.contains(identifier) + } + } +} diff --git a/Loop/Utilities/ScreenOrder.swift b/Loop/Utilities/ScreenOrder.swift new file mode 100644 index 000000000..c6b50dc2c --- /dev/null +++ b/Loop/Utilities/ScreenOrder.swift @@ -0,0 +1,343 @@ +// +// ScreenOrder.swift +// Loop +// +// Created by Anand Hegde on 2026-09-20. +// + +import Defaults +import SwiftUI + +/// The order in which "Next/Previous Screen" walks through the user's screens. +enum ScreenOrder: Int, Defaults.Serializable, CaseIterable, Identifiable { + /// Row by row from top to bottom, and each row from left to right. + case zShaped = 0 + + /// Around the arrangement, starting from the screen at the top left. "Previous screen" + /// walks it counterclockwise. + case clockwise = 1 + + var id: Self { self } + + var name: LocalizedStringKey { + switch self { + case .zShaped: + "Z-shaped" + case .clockwise: + "Clockwise" + } + } + + var image: Image { + switch self { + case .zShaped: + Image(.arrowTriangleheadSwapRotated) + case .clockwise: + // Named arrow.trianglehead.2.clockwise.rotate.90 since macOS 15; the old name works everywhere. + Image(systemName: "arrow.triangle.2.circlepath") + } + } + + /// Sorts screens into the traversal order this case describes. + /// - Parameters: + /// - elements: the screens to sort. + /// - frame: the frame of a screen, in a coordinate space whose y axis points up. + /// - Returns: the screens, in the order they should be cycled through. + func sorted(_ elements: [Element], frame: (Element) -> CGRect) -> [Element] { + switch self { + case .zShaped: + elements.sorted { Self.zShapedOrder(frame($0), frame($1)) } + case .clockwise: + Self.clockwiseOrder(elements, frame: frame) + } + } +} + +// MARK: - Z-shaped order + +private extension ScreenOrder { + /// Whether one screen comes before another when reading the arrangement like a page. + static func zShapedOrder(_ lhs: CGRect, _ rhs: CGRect) -> Bool { + if rhs.maxY <= lhs.minY { + return true + } + + if lhs.maxY <= rhs.minY { + return false + } + + return lhs.minX < rhs.minX + } +} + +// MARK: - Clockwise order + +private extension ScreenOrder { + /// Walks around the arrangement, outermost screens first. + /// + /// The outline of the arrangement is traced clockwise from the top left corner of its top + /// left screen, and each screen is visited the first time the outline reaches it. Screens + /// the outline never reaches are inside the arrangement, and are walked the same way once + /// the ones around them have been. + /// + /// The outline steps straight across gaps between screens rather than following them in, + /// so a gap doesn't pull the screens deep inside it into the middle of the cycle. + /// + /// Only the screens' edges are used, never their centers, so a row stays a row however its + /// screens are aligned, and resizing a screen doesn't move its neighbors to another ring. + static func clockwiseOrder(_ elements: [Element], frame: (Element) -> CGRect) -> [Element] { + // Two screens cycle the same way whatever order they're in. + guard elements.count > 2 else { + return elements.sorted { zShapedOrder(frame($0), frame($1)) } + } + + let frames = elements.map(frame) + var remaining = Array(frames.indices) + var result: [Element] = [] + + while !remaining.isEmpty { + let ring = outermostRing(of: remaining, frames: frames) + + // A ring always has a screen in it, but should one ever come back empty, keep the + // rest in the order they were given rather than loop here forever. + guard !ring.isEmpty else { + result += remaining.map { elements[$0] } + break + } + + result += ring.map { elements[$0] } + + let visited = Set(ring) + remaining.removeAll { visited.contains($0) } + } + + return result + } +} + +// MARK: - Outline + +private extension ScreenOrder { + /// A corner of a cell in the grid that the arrangement is cut into. + struct Vertex: Hashable { + let column: Int + let row: Int + } + + /// Listed clockwise, so that turning right is the next case along. + enum Direction: Int { + case right, down, left, up + } + + /// One side of a grid cell that lies on the outline, pointing clockwise around the arrangement. + struct OutlineEdge: Equatable { + let from: Vertex + let to: Vertex + let direction: Direction + + /// The screen this part of the outline belongs to, or `nil` where it bridges a gap. + let screen: Int? + } + + /// Traces the outline of the given screens and returns the ones on it, in clockwise order, + /// starting from the screen at the top left. + /// - Parameters: + /// - screens: indices into `frames` of the screens to consider. + /// - frames: the frames of every screen, in a coordinate space whose y axis points up. + /// - Returns: indices into `frames`. Never empty unless `screens` is. + static func outermostRing(of screens: [Int], frames: [CGRect]) -> [Int] { + guard screens.count > 1 else { + return screens + } + + // Cut the arrangement along every screen edge, so that each cell of the grid is either + // entirely inside one screen or entirely outside all of them. + let xs = Set(screens.flatMap { [frames[$0].minX, frames[$0].maxX] }).sorted() + let ys = Set(screens.flatMap { [frames[$0].minY, frames[$0].maxY] }).sorted() + let columns = xs.count - 1 + let rows = ys.count - 1 + + let owners: [[Int?]] = (0 ..< columns).map { column in + (0 ..< rows).map { row in + let middle = CGPoint(x: (xs[column] + xs[column + 1]) / 2, y: (ys[row] + ys[row + 1]) / 2) + return screens.first { frames[$0].contains(middle) } + } + } + + // Fill in the gaps: any empty cell with the arrangement on both sides of it, left and + // right or above and below, is treated as part of it, so the outline bridges the gap. + var isSolid = owners.map { $0.map { $0 != nil } } + var didFill = true + + while didFill { + didFill = false + + for column in 0 ..< columns { + for row in 0 ..< rows where !isSolid[column][row] { + let isBetweenColumns = (0 ..< column).contains { isSolid[$0][row] } + && (column + 1 ..< columns).contains { isSolid[$0][row] } + let isBetweenRows = (0 ..< row).contains { isSolid[column][$0] } + && (row + 1 ..< rows).contains { isSolid[column][$0] } + + if isBetweenColumns || isBetweenRows { + isSolid[column][row] = true + didFill = true + } + } + } + } + + func solid(_ column: Int, _ row: Int) -> Bool { + (0 ..< columns).contains(column) && (0 ..< rows).contains(row) && isSolid[column][row] + } + + /// The screen the outline runs along, looking inwards through any bridged gap. + /// + /// A gap less than half as deep as the screen at the bottom of it is tall (or wide, for a + /// gap in the side of the arrangement) is only screens being slightly out of line, like a + /// row with one screen a point lower, so the outline belongs to that screen. Anything + /// deeper is a real gap, and the outline across it belongs to no screen. + func screen(behind direction: Direction, of column: Int, _ row: Int) -> Int? { + var column = column + var row = row + let outline = switch direction { + case .right: ys[row + 1] + case .down: xs[column + 1] + case .left: ys[row] + case .up: xs[column] + } + + while solid(column, row) { + if let owner = owners[column][row] { + let depth = switch direction { + case .right: outline - ys[row + 1] + case .down: outline - xs[column + 1] + case .left: ys[row] - outline + case .up: xs[column] - outline + } + + let size = switch direction { + case .right, .left: frames[owner].height + case .down, .up: frames[owner].width + } + + return depth < size / 2 ? owner : nil + } + + switch direction { + case .right: row -= 1 + case .down: column -= 1 + case .left: row += 1 + case .up: column += 1 + } + } + + return nil + } + + // Every side of a cell that faces empty space is part of the outline. + var outgoing: [Vertex: [OutlineEdge]] = [:] + var edgeCount = 0 + + for column in 0 ..< columns { + for row in 0 ..< rows where isSolid[column][row] { + let topLeft = Vertex(column: column, row: row + 1) + let topRight = Vertex(column: column + 1, row: row + 1) + let bottomRight = Vertex(column: column + 1, row: row) + let bottomLeft = Vertex(column: column, row: row) + var edges: [(from: Vertex, to: Vertex, direction: Direction)] = [] + + if !solid(column, row + 1) { + edges.append((topLeft, topRight, .right)) + } + + if !solid(column + 1, row) { + edges.append((topRight, bottomRight, .down)) + } + + if !solid(column, row - 1) { + edges.append((bottomRight, bottomLeft, .left)) + } + + if !solid(column - 1, row) { + edges.append((bottomLeft, topLeft, .up)) + } + + for edge in edges { + outgoing[edge.from, default: []].append( + OutlineEdge( + from: edge.from, + to: edge.to, + direction: edge.direction, + screen: screen(behind: edge.direction, of: column, row) + ) + ) + } + + edgeCount += edges.count + } + } + + // The top of the highest cell is always on the outside of the arrangement, never around a hole in it. + guard + let column = (0 ..< columns).first(where: { solid($0, rows - 1) }), + let start = outgoing[Vertex(column: column, row: rows)]?.first(where: { $0.direction == .right }) + else { + return screens + } + + var outline: [OutlineEdge] = [] + var edge = start + + repeat { + outline.append(edge) + + // Where two screens only meet at a corner, which macOS doesn't allow, turning right + // keeps the outline around one of them. The other is then walked as its own ring. + let options = outgoing[edge.to] ?? [] + let next = [1, 0, 3].lazy + .compactMap { turn in + options.first { $0.direction.rawValue == (edge.direction.rawValue + turn) % 4 } + } + .first + + guard let next else { + break + } + + edge = next + } while edge != start && outline.count <= edgeCount + + // The cycle has no natural beginning, so start it where the eye does: at the top left + // corner of the screen nearest the top left of the arrangement. zShapedOrder can't pick + // it, as it contradicts itself for staggered screens, which would make the start (and + // with it the whole cycle, since screens can be on the outline twice) depend on which + // order the screens are looked at in. + let bounds = screens.reduce(CGRect.null) { $0.union(frames[$1]) } + + func distanceFromTopLeft(_ screen: Int) -> (CGFloat, CGFloat, CGFloat) { + let frame = frames[screen] + return (hypot(frame.minX - bounds.minX, frame.maxY - bounds.maxY), frame.minX, -frame.maxY) + } + + guard let first = outline.compactMap(\.screen).min(by: { distanceFromTopLeft($0) < distanceFromTopLeft($1) }) else { + return screens + } + + let startIndex = outline.indices + .filter { outline[$0].screen == first && outline[$0].direction == .right } + .min { outline[$0].from.column < outline[$1].from.column } + ?? outline.firstIndex { $0.screen == first } + ?? 0 + + var ring: [Int] = [] + + for offset in outline.indices { + if let screen = outline[(startIndex + offset) % outline.count].screen, !ring.contains(screen) { + ring.append(screen) + } + } + + return ring + } +} diff --git a/Loop/Utilities/ScreenUtility.swift b/Loop/Utilities/ScreenUtility.swift index 93df80e6e..068bef985 100644 --- a/Loop/Utilities/ScreenUtility.swift +++ b/Loop/Utilities/ScreenUtility.swift @@ -5,6 +5,7 @@ // Created by Kai Azim on 2024-01-11. // +import Defaults import SwiftUI enum ScreenUtility { @@ -94,17 +95,7 @@ enum ScreenUtility { /// Sorts all NSScreens in an order such that the next/previous screen are in positional order. private static func getOrderedScreens() -> [NSScreen] { - NSScreen.screens.sorted { screen1, screen2 in - if screen2.frame.maxY <= screen1.frame.minY { - return true - } - - if screen1.frame.maxY <= screen2.frame.minY { - return false - } - - return screen1.frame.minX < screen2.frame.minX - } + Defaults[.screenOrder].sorted(NSScreen.screens) { $0.frame } } // MARK: Directional Screens diff --git a/Loop/Window Action Indicators/Preview Window/PreviewBackgroundStyle.swift b/Loop/Window Action Indicators/Preview Window/PreviewBackgroundStyle.swift new file mode 100644 index 000000000..7bd868431 --- /dev/null +++ b/Loop/Window Action Indicators/Preview Window/PreviewBackgroundStyle.swift @@ -0,0 +1,25 @@ +// +// PreviewBackgroundStyle.swift +// Loop +// +// Created by Kai Azim on 2026-09-30. +// + +import Defaults +import Foundation + +/// How the preview window's background is drawn. +enum PreviewBackgroundStyle: String, Defaults.Serializable, CaseIterable { + /// A translucent black fill, like the system's window tiling preview. + case system + + /// A configurable blur and accent color gradient. + case custom + + var displayName: String { + switch self { + case .system: String(localized: "System", comment: "Preview background style: a translucent black fill, like the system's window tiling preview") + case .custom: String(localized: "Custom", comment: "Preview background style: a configurable blur and accent color") + } + } +} diff --git a/Loop/Window Action Indicators/Preview Window/PreviewView.swift b/Loop/Window Action Indicators/Preview Window/PreviewView.swift index f4f1aeed6..15815fc30 100644 --- a/Loop/Window Action Indicators/Preview Window/PreviewView.swift +++ b/Loop/Window Action Indicators/Preview Window/PreviewView.swift @@ -15,7 +15,9 @@ struct PreviewView: View { @Default(.previewPadding) private var previewPadding @Default(.previewCornerRadius) private var previewCornerRadius + @Default(.previewUseWindowCornerRadius) private var previewUseWindowCornerRadius @Default(.previewBorderThickness) private var previewBorderThickness + @Default(.previewBackgroundStyle) private var previewBackgroundStyle @Default(.previewBackgroundEnableBlur) private var previewEnableBlur @Default(.previewBackgroundAccentOpacity) private var previewBackgroundAccentOpacity @@ -30,12 +32,18 @@ struct PreviewView: View { return inset } - // Fall back to the user's default radius + // Fall back to 16pt when using window radii, otherwise the user's radius + let radius: CGFloat = if #available(macOS 26, *), previewUseWindowCornerRadius { + 16 + } else { + previewCornerRadius + } + return RectangleCornerRadii( - topLeading: previewCornerRadius, - bottomLeading: previewCornerRadius, - bottomTrailing: previewCornerRadius, - topTrailing: previewCornerRadius + topLeading: radius, + bottomLeading: radius, + bottomTrailing: radius, + topTrailing: radius ) } @@ -55,8 +63,11 @@ struct PreviewView: View { private func windowView() -> some View { ZStack { ZStack { + Color.black + .opacity(previewBackgroundStyle == .system ? 0.15 : 0) + VisualEffectView(material: .hudWindow, blendingMode: .behindWindow, state: .active) - .opacity(previewEnableBlur ? 1 : 0) + .opacity(previewBackgroundStyle == .custom && previewEnableBlur ? 1 : 0) .animation(luminareAnimation, value: previewEnableBlur) LinearGradient( @@ -69,9 +80,10 @@ struct PreviewView: View { startPoint: .topLeading, endPoint: .bottomTrailing ) - .opacity(previewBackgroundAccentOpacity) + .opacity(previewBackgroundStyle == .custom ? previewBackgroundAccentOpacity : 0) .animation(luminareAnimation, value: previewBackgroundAccentOpacity) } + .animation(luminareAnimation, value: previewBackgroundStyle) .clipShape(.rect(cornerRadii: cornerRadii)) UnevenRoundedRectangle(cornerRadii: cornerRadii) @@ -91,6 +103,7 @@ struct PreviewView: View { ), lineWidth: previewBorderThickness ) + .shadow(color: .black.opacity(0.2), radius: 10) } .padding(previewPadding + previewBorderThickness / 2) .animation(luminareAnimation, value: [accentColorController.color1, accentColorController.color2]) diff --git a/Loop/Window Action Indicators/Radial Menu/RadialMenuController.swift b/Loop/Window Action Indicators/Radial Menu/RadialMenuController.swift index 44f9463f7..a63c01138 100644 --- a/Loop/Window Action Indicators/Radial Menu/RadialMenuController.swift +++ b/Loop/Window Action Indicators/Radial Menu/RadialMenuController.swift @@ -16,8 +16,12 @@ final class RadialMenuController: WindowActionIndicator { private var controller: NSWindowController? private var closeTask: Task<(), Never>? + func update(context: ResizeContext) { + viewModel.updateContext(with: context) + } + func open(context: ResizeContext) { - defer { viewModel.updateContext(with: context) } + update(context: context) closeTask?.cancel() closeTask = nil diff --git a/Loop/Window Action Indicators/Radial Menu/RadialMenuViewModel.swift b/Loop/Window Action Indicators/Radial Menu/RadialMenuViewModel.swift index d738adc48..52c988986 100644 --- a/Loop/Window Action Indicators/Radial Menu/RadialMenuViewModel.swift +++ b/Loop/Window Action Indicators/Radial Menu/RadialMenuViewModel.swift @@ -47,13 +47,25 @@ final class RadialMenuViewModel: ObservableObject { radialMenuActions.last } + /// Directional swipe gestures act like slots, pointing the radial menu the way the fingers moved + private func directionalGestureAngle(for action: WindowAction) -> Angle? { + guard Defaults[.enableGestures] else { return nil } + + return Defaults[.gestures].lazy.compactMap { gesture -> Angle? in + guard case let .singleAction(actionType) = gesture.action, actionType.id == action.id else { return nil } + return gesture.kind.radialMenuAngle + }.first + } + var shouldFillRadialMenu: Bool { // If the user has the center action selected, then fill the radial menu if effectiveWindowAction.id == centerRadialMenuAction?.associatedActionId { return true } - guard !directionalRadialMenuActions.contains(where: { $0.associatedActionId == effectiveWindowAction.id }) else { + guard !directionalRadialMenuActions.contains(where: { $0.associatedActionId == effectiveWindowAction.id }), + directionalGestureAngle(for: effectiveWindowAction) == nil + else { return false } @@ -73,8 +85,9 @@ final class RadialMenuViewModel: ObservableObject { } var shouldHideDirectionSelector: Bool { - // If the current action is a user-set radial menu action, always show the direction selector - if radialMenuActions.contains(where: { $0.associatedActionId == effectiveWindowAction.id }) { + // If the current action is a user-set radial menu or directional gesture action, always show the direction selector + if radialMenuActions.contains(where: { $0.associatedActionId == effectiveWindowAction.id }) || + directionalGestureAngle(for: effectiveWindowAction) != nil { return false } @@ -143,6 +156,10 @@ final class RadialMenuViewModel: ObservableObject { return Angle(degrees: CGFloat(index) * actionAngleSpan - 90) } + if let gestureAngle = directionalGestureAngle(for: effectiveWindowAction) { + return gestureAngle + } + // Otherwise, default to the current action's radial menu angle return currentAction.radialMenuAngle(context: context) } @@ -151,7 +168,9 @@ final class RadialMenuViewModel: ObservableObject { guard abs(closestAngle.degrees) < 179 else { return false } if let previousAction { - return directionalRadialMenuActions.contains(where: { $0.associatedActionId == previousAction.id }) || previousAction.direction.hasRadialMenuAngle + return directionalRadialMenuActions.contains(where: { $0.associatedActionId == previousAction.id }) || + directionalGestureAngle(for: previousAction) != nil || + previousAction.direction.hasRadialMenuAngle } return false diff --git a/Loop/Window Action Indicators/WindowActionIndicatorService.swift b/Loop/Window Action Indicators/WindowActionIndicatorService.swift index 7ceb204a9..7fc2feb27 100644 --- a/Loop/Window Action Indicators/WindowActionIndicatorService.swift +++ b/Loop/Window Action Indicators/WindowActionIndicatorService.swift @@ -13,8 +13,15 @@ final class WindowActionIndicatorService { private let radialMenuController = RadialMenuController() private let previewController = PreviewController() - func openAndUpdate(context: ResizeContext) { - if Defaults[.hideOnNoSelection], context.action.direction == .noSelection { + func openAndUpdate( + context: ResizeContext, + hideOnNoSelection: Bool + ) { + if hideOnNoSelection, + context.action.direction == .noSelection { + // The radial menu caches its selected action across presentations, so it must receive + // `.noSelection`. The preview has no selection state and should only be closed here. + radialMenuController.update(context: context) closeAll() return } diff --git a/Loop/Core/SystemWindowManager.swift b/Loop/Window Management/SystemWindowManager.swift similarity index 100% rename from Loop/Core/SystemWindowManager.swift rename to Loop/Window Management/SystemWindowManager.swift diff --git a/Loop/Window Management/Window Action/CycleActionCoordinator.swift b/Loop/Window Management/Window Action/CycleActionCoordinator.swift index 4015fc88d..45d8d27c1 100644 --- a/Loop/Window Management/Window Action/CycleActionCoordinator.swift +++ b/Loop/Window Management/Window Action/CycleActionCoordinator.swift @@ -11,6 +11,9 @@ struct CycleActionCoordinator { enum SelectionMode { case advance(CycleProgressStore.Direction) case selectCurrent + /// Like `selectCurrent`, but coming from outside the cycle resumes this session's progress. + /// Used by gestures, where moving back into an already visited action shouldn't move on in its cycle. + case resumeCurrent } struct Proposal { @@ -34,6 +37,12 @@ struct CycleActionCoordinator { let currentActionBelongsToCycle = cycleAction.cycle?.contains { $0.id == currentAction.id } == true + let isInsideCycle = currentActionBelongsToCycle || Self.isRepeatingLongerKeybind( + currentAction: currentAction, + currentParentAction: currentParentAction, + keybindSequenceOriginAction: keybindSequenceOriginAction, + in: cycleAction + ) let restartAtBeginning = Self.shouldRestartAtBeginning( whenEnabled: restartAtBeginningWhenInterrupted, currentAction: currentAction, @@ -41,30 +50,31 @@ struct CycleActionCoordinator { keybindSequenceOriginAction: keybindSequenceOriginAction, in: cycleAction ) - let seedAction: WindowAction? = if restartAtBeginning { - nil - } else if currentActionBelongsToCycle { - currentAction + + // Inside the cycle, progress continues from this session. Entering it starts from the window's recorded + // progress, except for gestures moving back into an action they already visited. + let origin: CycleProgressStore.Origin = if isInsideCycle { + .sessionProgress(fallback: currentActionBelongsToCycle ? currentAction : nil) + } else if case .resumeCurrent = mode { + .sessionProgress(fallback: nil) } else { - recordedAction + .action(restartAtBeginning ? nil : recordedAction) } - let selection: CycleProgressStore.Selection? = switch mode { - case let .advance(direction): - progressStore.proposeSelection( - for: targetWindowID, - in: cycleAction, - seededBy: seedAction, - restartAtBeginning: restartAtBeginning, - direction: direction - ) - case .selectCurrent: - progressStore.proposeCurrentSelection( - for: targetWindowID, - in: cycleAction, - seededBy: currentActionBelongsToCycle ? currentAction : nil - ) + + // Selecting a cycle from outside shows what advancing into it would select + let direction: CycleProgressStore.Direction? = switch mode { + case let .advance(direction): direction + case .selectCurrent: isInsideCycle ? nil : .forward + case .resumeCurrent: nil } + let selection = progressStore.proposeSelection( + for: targetWindowID, + in: cycleAction, + from: origin, + moving: direction + ) + guard let selection else { return nil } @@ -107,10 +117,12 @@ struct CycleActionCoordinator { keybindSequenceOriginAction: WindowAction?, in cycleAction: WindowAction ) -> Bool { - let currentKeybind = currentParentAction?.keybind ?? currentAction.keybind - let isRepeatingLongerKeybind = keybindSequenceOriginAction?.id == cycleAction.id - && !currentKeybind.isEmpty - && currentKeybind.isStrictSubset(of: cycleAction.keybind) + let isRepeatingLongerKeybind = isRepeatingLongerKeybind( + currentAction: currentAction, + currentParentAction: currentParentAction, + keybindSequenceOriginAction: keybindSequenceOriginAction, + in: cycleAction + ) return isEnabled && ( !isRepeatingLongerKeybind && ( @@ -119,4 +131,17 @@ struct CycleActionCoordinator { ) ) } + + /// Holding a shorter keybind while repeating the cycle's longer one briefly selects the shorter action first + private static func isRepeatingLongerKeybind( + currentAction: WindowAction, + currentParentAction: WindowAction?, + keybindSequenceOriginAction: WindowAction?, + in cycleAction: WindowAction + ) -> Bool { + let currentKeybind = currentParentAction?.keybind ?? currentAction.keybind + return keybindSequenceOriginAction?.id == cycleAction.id + && !currentKeybind.isEmpty + && currentKeybind.isStrictSubset(of: cycleAction.keybind) + } } diff --git a/Loop/Window Management/Window Action/CycleProgressStore.swift b/Loop/Window Management/Window Action/CycleProgressStore.swift index 7c251581e..5fc8ef2aa 100644 --- a/Loop/Window Management/Window Action/CycleProgressStore.swift +++ b/Loop/Window Management/Window Action/CycleProgressStore.swift @@ -41,15 +41,20 @@ struct CycleProgressStore { private var cursors: [Key: Cursor] = [:] - /// Returns the next child without updating progress. - /// - /// Restarts at the first child when requested. Otherwise, uses stored progress before `seedAction`. + enum Origin { + /// This session's last selection, which also tells duplicate children apart, or `fallback` without one + case sessionProgress(fallback: WindowAction?) + /// `action`, or before the first child if it's `nil` or not part of the cycle + case action(WindowAction?) + } + + /// Returns the child `direction` moves to from `origin`, or `origin` itself without a direction. + /// Doesn't update progress until the selection is committed. mutating func proposeSelection( for targetWindowID: CGWindowID, in cycleAction: WindowAction, - seededBy seedAction: WindowAction?, - restartAtBeginning: Bool, - direction: Direction + from origin: Origin, + moving direction: Direction? ) -> Selection? { let key = Key( targetWindowID: targetWindowID, @@ -64,27 +69,20 @@ struct CycleProgressStore { return nil } - if restartAtBeginning { - return Selection(action: children[0], index: 0, key: key) - } - - if let cursor = cursors[key] { - if let currentIndex = validatedIndex(for: cursor, in: children) { - let index = nextIndex(after: currentIndex, count: children.count, direction: direction) - return Selection(action: children[index], index: index, key: key) - } - - // The selected child was removed, so re-seed from the updated cycle - cursors[key] = nil + let originIndex: Int? = switch origin { + case let .sessionProgress(fallback): + sessionIndex(for: key, in: children, matching: fallback) ?? index(of: fallback, in: children) + case let .action(action): + index(of: action, in: children) } - if let seedAction, - let seedIndex = children.firstIndex(where: { $0.id == seedAction.id }) { - let index = nextIndex(after: seedIndex, count: children.count, direction: direction) - return Selection(action: children[index], index: index, key: key) + let index = if let originIndex, let direction { + nextIndex(after: originIndex, count: children.count, direction: direction) + } else { + originIndex ?? 0 } - return Selection(action: children[0], index: 0, key: key) + return Selection(action: children[index], index: index, key: key) } /// Records and returns a selection only if it still matches the current cycle @@ -130,37 +128,20 @@ struct CycleProgressStore { return acceptedAction } - mutating func proposeCurrentSelection( - for targetWindowID: CGWindowID, - in cycleAction: WindowAction, - seededBy seedAction: WindowAction? - ) -> Selection? { - let key = Key( - targetWindowID: targetWindowID, - parentCycleActionID: cycleAction.id - ) - - guard cycleAction.direction == .cycle, - let children = cycleAction.cycle, - !children.isEmpty + /// The session's last selection, if it's still in the cycle and is `action` (when given) + private func sessionIndex(for key: Key, in children: [WindowAction], matching action: WindowAction?) -> Int? { + guard let cursor = cursors[key], + action == nil || cursor.childActionID == action?.id else { - cursors[key] = nil return nil } - if let seedAction, - let cursor = cursors[key], - cursor.childActionID == seedAction.id, - let index = validatedIndex(for: cursor, in: children) { - return Selection(action: children[index], index: index, key: key) - } - - if let seedAction, - let index = children.firstIndex(where: { $0.id == seedAction.id }) { - return Selection(action: children[index], index: index, key: key) - } + return validatedIndex(for: cursor, in: children) + } - return Selection(action: children[0], index: 0, key: key) + private func index(of action: WindowAction?, in children: [WindowAction]) -> Int? { + guard let action else { return nil } + return children.firstIndex { $0.id == action.id } } private func validatedIndex(for cursor: Cursor, in children: [WindowAction]) -> Int? { diff --git a/Loop/Window Management/Window Action/GestureBinding.swift b/Loop/Window Management/Window Action/GestureBinding.swift new file mode 100644 index 000000000..84addb8a6 --- /dev/null +++ b/Loop/Window Management/Window Action/GestureBinding.swift @@ -0,0 +1,218 @@ +// +// GestureBinding.swift +// Loop +// +// Created by Kai Azim on 2026-04-16. +// + +import Defaults +import SwiftUI + +struct GestureBinding: Identifiable, Codable, Hashable, Defaults.Serializable { + let id: UUID + var name: String? + var fingerCount: Int + var kind: Kind + var action: Action + var activationZone: ActivationZone + + init( + id: UUID = .init(), + name: String? = nil, + fingerCount: Int = 2, + kind: Kind = .radialMenu, + action: Action = .radialMenuActions, + activationZone: ActivationZone = .titlebar + ) { + self.id = id + self.name = name + self.fingerCount = fingerCount + self.kind = kind + self.action = action + self.activationZone = activationZone + } + + enum Kind: Codable, Hashable, CaseIterable { + /// Swipe gesture that maps angle to radial menu directional slots. + case radialMenu + /// Directional swipe gestures that trigger a single action. + case swipeUp, swipeDown, swipeLeft, swipeRight + /// Magnify Out gesture (fingers together, scale < 1). + case magnifyOut + /// Magnify In gesture (fingers apart, scale > 1). + case magnifyIn + + var displayName: String { + switch self { + case .radialMenu: String(localized: "Both", comment: "Gesture kind: swipe and magnify gestures; opens the radial menu") + case .swipeUp: String(localized: "Swipe Up", comment: "Gesture kind: directional swipe") + case .swipeDown: String(localized: "Swipe Down", comment: "Gesture kind: directional swipe") + case .swipeLeft: String(localized: "Swipe Left", comment: "Gesture kind: directional swipe") + case .swipeRight: String(localized: "Swipe Right", comment: "Gesture kind: directional swipe") + case .magnifyOut: String(localized: "Pinch", comment: "Gesture kind: pinch (fingers move together, zooming out)") + case .magnifyIn: String(localized: "Spread", comment: "Gesture kind: spread (fingers move apart, zooming in)") + } + } + + var image: Image { + switch self { + case .radialMenu: Image(.loop) + case .swipeUp: Image(systemName: "arrow.up") + case .swipeDown: Image(systemName: "arrow.down") + case .swipeLeft: Image(systemName: "arrow.left") + case .swipeRight: Image(systemName: "arrow.right") + case .magnifyOut: Image(systemName: "arrow.up.right.and.arrow.down.left") + case .magnifyIn: Image(systemName: "arrow.down.left.and.arrow.up.right") + } + } + + var radialMenuAngle: Angle? { + switch self { + case .swipeUp: .degrees(-90) + case .swipeRight: .degrees(0) + case .swipeDown: .degrees(90) + case .swipeLeft: .degrees(180) + case .radialMenu, .magnifyOut, .magnifyIn: nil + } + } + + var isDirectionalSwipe: Bool { + switch self { + case .swipeUp, .swipeDown, .swipeLeft, .swipeRight: + true + default: + false + } + } + } + + enum Action: Codable, Hashable { + /// Uses `RadialMenuAction.userConfiguredActions` for radial menu swipe mode. + case radialMenuActions + /// A single action, either custom or referencing a keybind. + case singleAction(RadialMenuAction.ActionType) + } + + enum ActivationZone: String, Codable, Hashable, CaseIterable { + case titlebar + case anywhere + + var displayName: String { + switch self { + case .titlebar: String(localized: "Title Bar Only", comment: "Gesture activation zone restricted to a window's title bar") + case .anywhere: String(localized: "Anywhere", comment: "Gesture activation zone covers the entire window") + } + } + + var systemImage: String { + switch self { + case .titlebar: "menubar.rectangle" + case .anywhere: "rectangle.dashed" + } + } + } +} + +// MARK: - Naming + +extension GestureBinding { + var effectiveActivationZone: ActivationZone { + fingerCount <= 2 ? .titlebar : activationZone + } + + var defaultName: String { + switch kind { + case .radialMenu: + String( + localized: "\(fingerCount)-finger Swipe or Magnify", + comment: "Default title describing how to activate a radial menu gesture. Argument is the finger count." + ) + default: + String( + localized: "\(fingerCount)-finger \(kind.displayName)", + comment: "Default title describing a gesture. First argument is the finger count, second is the gesture kind name (e.g. '2-finger Pinch' or '3-finger Swipe Right')." + ) + } + } + + var displayName: String { + if let name, !name.isEmpty { + return name + } + + return defaultName + } +} + +// MARK: - No Action + +extension GestureBinding { + var resolvesToNoAction: Bool { + switch action { + case .radialMenuActions: + false + case let .singleAction(actionType): + (actionType.resolvedAction?.direction ?? .noAction) == .noAction + } + } +} + +// MARK: - Conflict Detection + +extension GestureBinding { + /// Returns IDs for actionable gestures that conflict with at least one other actionable gesture. + static func conflictingActionableIDs(in gestures: [GestureBinding]) -> Set { + conflictingIDs(in: gestures.filter { !$0.resolvesToNoAction }) + } + + /// Returns gestures that don't conflict with another actionable gesture. + static func activeGestures(in gestures: [GestureBinding]) -> [GestureBinding] { + let conflictingIDs = conflictingActionableIDs(in: gestures) + return gestures.filter { !conflictingIDs.contains($0.id) } + } + + /// Two gestures conflict when they have the same finger count and their kinds overlap. + /// Radial menu consumes both swipe and magnify, so it conflicts with ANY other gesture at the same finger count. + func conflicts(with other: GestureBinding) -> Bool { + guard id != other.id, fingerCount == other.fingerCount else { + return false + } + + if kind == .radialMenu || other.kind == .radialMenu { + return true + } + + if kind == other.kind { + return true + } + + return false + } + + /// Returns the IDs of all gestures that conflict with at least one other gesture in the array. + static func conflictingIDs(in gestures: [GestureBinding]) -> Set { + var result = Set() + for i in gestures.indices { + for j in (i + 1) ..< gestures.count { + if gestures[i].conflicts(with: gestures[j]) { + result.insert(gestures[i].id) + result.insert(gestures[j].id) + } + } + } + return result + } +} + +// MARK: - Defaults + +extension GestureBinding { + static let defaults: [GestureBinding] = [ + GestureBinding( + fingerCount: 2, + kind: .radialMenu, + action: .radialMenuActions, + activationZone: .titlebar + ) + ] +} diff --git a/Loop/Window Management/Window Action/WindowAction+Defaults.swift b/Loop/Window Management/Window Action/WindowAction+Defaults.swift index 5cbdb0f69..c252cd5bd 100644 --- a/Loop/Window Management/Window Action/WindowAction+Defaults.swift +++ b/Loop/Window Management/Window Action/WindowAction+Defaults.swift @@ -40,7 +40,34 @@ extension WindowAction { WindowAction(.bottomLeftQuarter, keybind: [.kVK_DownArrow, .kVK_LeftArrow]), WindowAction( "Center Cycle", - cycle: [.init(.horizontalCenterThird), .init(.horizontalCenterHalf)], + cycle: [ + .init(.horizontalCenterThird), + .init(.horizontalCenterHalf), + .init( + .custom, + keybind: [], + name: "Center Two Thirds", + unit: .percentage, + width: 66.666, + height: 100, + xPoint: 16.667, + yPoint: 0, + positionMode: .coordinates, + sizeMode: .custom + ), + .init( + .custom, + keybind: [], + name: "Center Three Quarters", + unit: .percentage, + width: 75, + height: 100, + xPoint: 12.5, + yPoint: 0, + positionMode: .coordinates, + sizeMode: .custom + ) + ], keybind: [.kVK_LeftArrow, .kVK_RightArrow] ) ] diff --git a/Loop/Window Management/Window Action/WindowAction.swift b/Loop/Window Management/Window Action/WindowAction.swift index 3fcb71f68..4d518d940 100644 --- a/Loop/Window Management/Window Action/WindowAction.swift +++ b/Loop/Window Management/Window Action/WindowAction.swift @@ -183,8 +183,20 @@ struct WindowAction: Codable, Identifiable, Hashable, Equatable, Defaults.Serial return false } - var canRepeat: Bool { - willManipulateExistingWindowFrame || direction.willFocusWindow || direction == .undo + /// Whether held keys or continuous gestures may repeatedly trigger this action. + /// + /// Keyboard events can arrive repeatedly while a keybind is held down, and gesture + /// recognizers can commit repeatedly as movement crosses step thresholds. + var allowsRapidRepeat: Bool { + willManipulateExistingWindowFrame || direction.willFocusWindow + } + + /// Whether selecting this same action again should still run through Loop's action pipeline. + /// + /// Undo and stash are not rapid-repeat actions, but selecting them again should still + /// apply: undo walks back another recorded action, and stash toggles an existing stashed window. + var allowsRepeatedSelection: Bool { + allowsRapidRepeat || direction == .undo || direction == .stash } var forceProportionalFrameOnScreenChange: Bool { diff --git a/Loop/Window Management/Window Action/WindowActionCache.swift b/Loop/Window Management/Window Action/WindowActionCache.swift index c2fb8d1f4..e8a046ee7 100644 --- a/Loop/Window Management/Window Action/WindowActionCache.swift +++ b/Loop/Window Management/Window Action/WindowActionCache.swift @@ -43,9 +43,9 @@ final class WindowActionCache { /// Rebuilds the cache and includes extra entries for cycle actions with shift keys if the user has enabled `cycleBackwardsOnShiftPressed`. private func regenerateCache() { - let keybinds: [WindowAction] = Defaults[.keybinds].filter { !$0.keybind.isEmpty } + let keybinds: [WindowAction] = Defaults[.keybinds] - regenerateActionsByKeybind(from: keybinds) + regenerateActionsByKeybind(from: keybinds.filter { !$0.keybind.isEmpty }) regenerateActionsByIdentifier(from: keybinds) log.info("Regenerated cache; normal: \(actionsByKeybind.count), bypassed: \(bypassedActionsByKeybind.count)") diff --git a/Loop/Window Management/Window Action/WindowDirection+LocalizedString.swift b/Loop/Window Management/Window Action/WindowDirection+LocalizedString.swift index e447e4297..6ea21b1ed 100644 --- a/Loop/Window Management/Window Action/WindowDirection+LocalizedString.swift +++ b/Loop/Window Management/Window Action/WindowDirection+LocalizedString.swift @@ -11,8 +11,8 @@ import SwiftUI extension WindowDirection { var infoText: LocalizedStringKey? { switch self { - case .macOSCenter: "\(name) places windows slightly above the absolute center,\nwhich can be found more ergonomic." - case .stash: "A single \(name) action can only track one window. To stash\nmultiple windows, add additional \(name) actions." + case .macOSCenter: "\(name) places windows slightly above center,\nwhich many people find more comfortable." + case .stash: "Each \(name) action tracks one window. To stash\nmore windows, add more \(name) actions." default: nil } } @@ -32,7 +32,7 @@ extension WindowDirection { case .fillAvailableSpace: String(localized: "Fill Available Space", comment: "Window action") case .fullscreen: - String(localized: "Fullscreen", comment: "Window action") + String(localized: "Full Screen", comment: "Window action") case .undo: String(localized: "Undo", comment: "Window action") case .initialFrame: @@ -169,7 +169,7 @@ extension WindowDirection { case .focusLeft: String(localized: "Focus Left", comment: "Window action") case .focusNextInStack: - String(localized: "Focus Next In Stack", comment: "Window action") + String(localized: "Focus Next in Stack", comment: "Window action") case .stash: String(localized: "Stash", comment: "Window action") case .unstash: diff --git a/Loop/Window Management/Window Action/WindowDirection.swift b/Loop/Window Management/Window Action/WindowDirection.swift index 1e1aadaa5..062abe8dc 100644 --- a/Loop/Window Management/Window Action/WindowDirection.swift +++ b/Loop/Window Management/Window Action/WindowDirection.swift @@ -118,6 +118,38 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable { var willCenter: Bool { [.center, .macOSCenter, .verticalCenterHalf, .horizontalCenterHalf].contains(self) } var isCustomizable: Bool { [.custom, .stash].contains(self) } + /// The action that undoes a step of this one, such as smaller for larger + /// Imagine this as "cycling backwards but for non-cycle actions" :) + var opposite: WindowDirection? { + switch self { + case .larger: .smaller + case .smaller: .larger + case .scaleUp: .scaleDown + case .scaleDown: .scaleUp + case .shrinkTop: .growTop + case .shrinkBottom: .growBottom + case .shrinkRight: .growRight + case .shrinkLeft: .growLeft + case .shrinkHorizontal: .growHorizontal + case .shrinkVertical: .growVertical + case .growTop: .shrinkTop + case .growBottom: .shrinkBottom + case .growRight: .shrinkRight + case .growLeft: .shrinkLeft + case .growHorizontal: .shrinkHorizontal + case .growVertical: .shrinkVertical + case .moveUp: .moveDown + case .moveDown: .moveUp + case .moveRight: .moveLeft + case .moveLeft: .moveRight + case .focusUp: .focusDown + case .focusDown: .focusUp + case .focusRight: .focusLeft + case .focusLeft: .focusRight + default: nil + } + } + var hasRadialMenuAngle: Bool { let noAngleActions: [WindowDirection] = [.noAction, .noSelection, .minimize, .minimizeOthers, .hide, .initialFrame, .undo, .cycle] return !(noAngleActions.contains(self) || shouldFillRadialMenu || willChangeScreen || willChangeSpace || willAdjustSize || willShrink || willGrow || willMove || willFocusWindow) diff --git a/Loop/Window Management/Window Manipulation/WindowActionEngine.swift b/Loop/Window Management/Window Manipulation/WindowActionEngine.swift index 6c81a80c3..1da86e326 100644 --- a/Loop/Window Management/Window Manipulation/WindowActionEngine.swift +++ b/Loop/Window Management/Window Manipulation/WindowActionEngine.swift @@ -117,6 +117,12 @@ final class WindowActionEngine { return .noOp } + if direction == .stash, + let screen = context.screen, + await StashManager.shared.toggleStashedWindow(for: context.action, on: screen) { + return .noOp + } + // Quick actions that don't require resize logic if let result = handleQuickAction(context.action, window: context.window) { return result diff --git a/Loop/Window Management/Window Manipulation/WindowEngine.swift b/Loop/Window Management/Window Manipulation/WindowEngine.swift index 5d44ac505..af5139154 100644 --- a/Loop/Window Management/Window Manipulation/WindowEngine.swift +++ b/Loop/Window Management/Window Manipulation/WindowEngine.swift @@ -79,7 +79,6 @@ enum WindowEngine { let shouldAnimate = shouldAnimateResize( for: window, - willChangeScreens: willChangeScreens, resolvedProperties: context.resolvedWindowProperties ) @@ -97,7 +96,8 @@ enum WindowEngine { finalFrame = window.frame } - if Defaults[.moveCursorWithWindow] { + // Without the preview, windows resize live with the cursor, so moving it would fight the user + if Defaults[.moveCursorWithWindow], Defaults[.previewVisibility] { CGWarpMouseCursorPosition(targetFrame.center) } } @@ -165,11 +165,11 @@ enum WindowEngine { private static func shouldAnimateResize( for window: Window, - willChangeScreens: Bool, resolvedProperties: Window.ResolvedProperties? ) -> Bool { if resolvedProperties?.isEnhancedUserInterface ?? window.enhancedUserInterface { return false } - if !willChangeScreens, #available(macOS 15, *), Defaults[.useSystemWindowManagerWhenAvailable] { + // When integrated with the macOS window manager, follow its animation setting, including for screen changes + if #available(macOS 15, *), Defaults[.useSystemWindowManagerWhenAvailable] { return SystemWindowManager.MoveAndResize.enableAnimations } if !Defaults[.animateWindowResizes] { return false } diff --git a/Loop/Window Management/Window/Window.swift b/Loop/Window Management/Window/Window.swift index 47e743870..0ce158e6e 100644 --- a/Loop/Window Management/Window/Window.swift +++ b/Loop/Window Management/Window/Window.swift @@ -14,6 +14,7 @@ enum WindowError: LocalizedError { case blockedBundleID case cannotGetWindow case filteredOutFromWindowInfo + case invalidWindowTags case invalidWindowLevel(CGWindowLevel) var errorDescription: String? { @@ -26,6 +27,8 @@ enum WindowError: LocalizedError { "Could not get the element's window" case .filteredOutFromWindowInfo: "Filtered out from window info" + case .invalidWindowTags: + "Invalid window tags" case let .invalidWindowLevel(level): "Invalid window: level \(level) is outside the manageable range" } @@ -50,19 +53,33 @@ final class Window { /// Initialize a window from an AXUIElement /// - Parameter element: The AXUIElement to initialize the window with. If it is not a window, an error will be thrown - init( + convenience init( element: AXUIElement, pid: pid_t? = nil, nsRunningApplication: NSRunningApplication? = nil + ) throws { + try self.init( + element: element, + pid: pid, + nsRunningApplication: nsRunningApplication, + knownWindowLevel: nil + ) + } + + private init( + element: AXUIElement, + pid _pid: pid_t?, + nsRunningApplication _nsRunningApplication: NSRunningApplication?, + knownWindowLevel: CGWindowLevel? ) throws { self.axWindow = element self.cgWindowID = try element.getWindowID() - if let nsRunningApplication { - self.pid = nsRunningApplication.processIdentifier - self.nsRunningApplication = nsRunningApplication - } else if let pid { - self.pid = pid + if let _nsRunningApplication { + self.pid = _nsRunningApplication.processIdentifier + self.nsRunningApplication = _nsRunningApplication + } else if let _pid { + self.pid = _pid self.nsRunningApplication = NSRunningApplication(processIdentifier: pid) } else { let pid = try axWindow.getPID() @@ -74,11 +91,15 @@ final class Window { throw WindowError.sheetWindow } - if let level = SkyLightToolBelt.getWindowLevel(windowID: cgWindowID), - level < kCGNormalWindowLevel || level > kCGDraggingWindowLevel { + if let level = knownWindowLevel ?? SkyLightToolBelt.getWindowLevel(windowID: cgWindowID), + level < kCGNormalWindowLevel || level >= kCGPopUpMenuWindowLevel { throw WindowError.invalidWindowLevel(level) } + guard SkyLightToolBelt.areWindowTagsValid(windowID: cgWindowID) else { + throw WindowError.invalidWindowTags + } + if let bundleIdentifier = nsRunningApplication?.bundleIdentifier, Self.invalidBundleIDs.contains(bundleIdentifier) { throw WindowError.blockedBundleID @@ -122,9 +143,10 @@ final class Window { throw WindowError.filteredOutFromWindowInfo } - if let level = windowInfo[kCGWindowLayer as String] as? CGWindowLevel, - level < kCGNormalWindowLevel || level > kCGDraggingWindowLevel { - throw WindowError.invalidWindowLevel(level) + let knownWindowLevel = windowInfo[kCGWindowLayer as String] as? CGWindowLevel + if let knownWindowLevel, + knownWindowLevel < kCGNormalWindowLevel || knownWindowLevel >= kCGPopUpMenuWindowLevel { + throw WindowError.invalidWindowLevel(knownWindowLevel) } let element = AXUIElementCreateApplication(pid) @@ -136,7 +158,17 @@ final class Window { // If there’s only one window, use that as there's no need to grab its frame if windowElements.count == 1 { - return try Window(element: windowElements[0], pid: pid) + let window = try Window( + element: windowElements[0], + pid: pid, + nsRunningApplication: nil, + knownWindowLevel: knownWindowLevel + ) + if let windowID = windowInfo[kCGWindowNumber as String] as? CGWindowID, + window.cgWindowID != windowID { + throw WindowError.cannotGetWindow + } + return window } // If we can retrieve bounds, then filter candidates out by their respective frames. @@ -153,16 +185,30 @@ final class Window { windowElements } - let windows = candidates.compactMap { try? Window(element: $0, pid: pid) } + let windows = candidates.compactMap { + try? Window( + element: $0, + pid: pid, + nsRunningApplication: nil, + knownWindowLevel: knownWindowLevel + ) + } - if let windowID = windowInfo[kCGWindowNumber as String] as? CGWindowID, - let match = windows.first(where: { $0.cgWindowID == windowID }) { + if let windowID = windowInfo[kCGWindowNumber as String] as? CGWindowID { + guard let match = windows.first(where: { $0.cgWindowID == windowID }) else { + throw WindowError.cannotGetWindow + } return match } else if let first = windows.first { return first } - return try Window(element: windowElements[0], pid: pid) + return try Window( + element: windowElements[0], + pid: pid, + nsRunningApplication: nil, + knownWindowLevel: knownWindowLevel + ) } var role: NSAccessibility.Role? { @@ -434,7 +480,7 @@ final class Window { @MainActor private func ownNSWindow() -> NSWindow? { - NSApp.keyWindow ?? NSApp.mainWindow + NSApp.windows.first { $0.windowNumber == cgWindowID } ?? NSApp.keyWindow ?? NSApp.mainWindow } @discardableResult @@ -579,7 +625,7 @@ final class Window { extension Window: CustomStringConvertible { var description: String { - "Window(id: \(cgWindowID), app: '\(nsRunningApplication?.localizedName ?? "")', title: '\(title ?? ""))" + "Window(id: \(cgWindowID), app: '\(nsRunningApplication?.localizedName ?? "")', title: '\(title ?? "")')" } } diff --git a/Loop/Window Management/Window/WindowUtility.swift b/Loop/Window Management/Window/WindowUtility.swift index c5447d6a1..8a71da9bb 100644 --- a/Loop/Window Management/Window/WindowUtility.swift +++ b/Loop/Window Management/Window/WindowUtility.swift @@ -17,24 +17,27 @@ enum WindowUtility { static func userDefinedTargetWindow() -> Window? { var result: Window? - log.info("Getting window at cursor...") + if Defaults[.resizeWindowUnderCursor] { + log.info("Getting window at cursor...") - if Defaults[.resizeWindowUnderCursor], - let mouseLocation = CGEvent.mouseLocation, - let window = windowAtPosition(mouseLocation) { - result = window + if let mouseLocation = CGEvent.mouseLocation, + let window = windowAtPosition(mouseLocation) { + result = window + } } if result == nil { do { - log.info("Getting frontmost window...") - result = try frontmostWindow() } catch { log.warn("Failed to get frontmost window: \(error.localizedDescription)") } } + if let result { + log.debug("Determined target window: \(result)") + } + return result } @@ -44,6 +47,19 @@ enum WindowUtility { guard let app = NSWorkspace.shared.frontmostApplication else { return nil } + + // NSRunningApplication can occasionally report a pid of -1, so fall back to + // asking the AX API for the focused application instead. + if app.processIdentifier <= 0 { + log.warn("Frontmost app '\(app.localizedName ?? "")' reported invalid pid \(app.processIdentifier), falling back to focused application") + + guard let focusedApp: AXUIElement = try AXUIElement.systemWide.getValue(NSAccessibility.Attribute(rawValue: kAXFocusedApplicationAttribute)) else { + return nil + } + + return try Window(pid: focusedApp.getPID()) + } + return try Window(pid: app.processIdentifier) } @@ -51,10 +67,17 @@ enum WindowUtility { /// - Parameter position: The position to check for /// - Returns: The window at the given position, if any static func windowAtPosition(_ position: CGPoint) -> Window? { - // Try SkyLight first, as it is faster and doesn't deadlock on own process - if let windowID = SkyLightToolBelt.windowIDAtPosition(position), - let window = try? Window.fromWindowID(windowID) { - return window + do { + // Try SkyLight first, as it is faster and doesn't deadlock on own process + if let windowID = SkyLightToolBelt.windowIDAtPosition(position) { + return try Window.fromWindowID(windowID) + } + } catch { + if let windowError = error as? WindowError, + case .blockedBundleID = windowError { + // no sense in looking deeper if we find a valid-but-blocked window + return nil + } } do { @@ -64,6 +87,12 @@ enum WindowUtility { return try Window(element: windowElement) } } catch { + if let windowError = error as? WindowError, + case .blockedBundleID = windowError { + // no sense in looking deeper if we find a valid-but-blocked window + return nil + } + log.warn("Failed to determine element at position: \(error.localizedDescription)") } diff --git a/LoopTests/CycleActionCoordinatorTests.swift b/LoopTests/CycleActionCoordinatorTests.swift index 0d147a955..fb4151b50 100644 --- a/LoopTests/CycleActionCoordinatorTests.swift +++ b/LoopTests/CycleActionCoordinatorTests.swift @@ -76,7 +76,7 @@ struct CycleActionCoordinatorTests { )) } - @Test func selectingCurrentChildUpdatesStoredProgress() throws { + @Test func selectingCurrentFromOutsideResumesStoredProgress() throws { let first = WindowAction(.leftHalf) let second = WindowAction(.maximize) let cycle = WindowAction([first, second]) @@ -119,7 +119,7 @@ struct CycleActionCoordinatorTests { let nextProposal = coordinator.proposeAction( for: targetWindowID, in: cycle, - currentAction: first, + currentAction: radialSelection, currentParentAction: cycle, recordedAction: nil, restartAtBeginningWhenInterrupted: true, @@ -127,8 +127,8 @@ struct CycleActionCoordinatorTests { ) let next = try #require(nextProposal) - #expect(radialSelection.id == first.id) - #expect(next.action.id == second.id) + #expect(radialSelection.id == second.id) + #expect(next.action.id == first.id) } private func commitNext( diff --git a/LoopTests/CycleProgressStoreTests.swift b/LoopTests/CycleProgressStoreTests.swift index 381e54c2d..08786d38a 100644 --- a/LoopTests/CycleProgressStoreTests.swift +++ b/LoopTests/CycleProgressStoreTests.swift @@ -239,7 +239,8 @@ struct CycleProgressStoreTests { let currentSelection = store.proposeCurrentSelection( for: targetA, in: cycle, - seededBy: repeated + seededBy: repeated, + resumingProgress: false ) let selected = try #require(currentSelection) _ = store.commit(selected, for: targetA, in: cycle) diff --git a/LoopTests/MultitouchGestureActivationTests.swift b/LoopTests/MultitouchGestureActivationTests.swift new file mode 100644 index 000000000..fb8af1f00 --- /dev/null +++ b/LoopTests/MultitouchGestureActivationTests.swift @@ -0,0 +1,367 @@ +// +// MultitouchGestureActivationTests.swift +// LoopTests +// +// Created by Kai Azim on 2026-09-18. +// + +import CoreGraphics +@testable import Loop +import Testing + +@MainActor +struct MultitouchGestureActivationTests { + @Test func effectiveActivationZoneForcesTwoFingerGesturesToTitlebar() { + let twoFingerAnywhere = gesture( + fingerCount: 2, + kind: .swipeUp, + activationZone: .anywhere + ) + let threeFingerAnywhere = gesture( + fingerCount: 3, + kind: .swipeUp, + activationZone: .anywhere + ) + + #expect(twoFingerAnywhere.effectiveActivationZone == .titlebar) + #expect(threeFingerAnywhere.effectiveActivationZone == .anywhere) + } + + @Test func outsideTitlebarContextRejectsTitlebarSwitches() { + let session = MultitouchGestureSession() + let maximize = gesture(kind: .swipeUp, activationZone: .anywhere) + let leftHalf = gesture(kind: .swipeLeft, activationZone: .titlebar) + let magnify = gesture(kind: .magnifyOut, activationZone: .titlebar) + let context = MultitouchGestureActivationContext( + targetWindow: nil, + startedInTitlebar: false + ) + + #expect(session.begin( + activationContext: context, + gesture: maximize, + loopWasAlreadyOpen: true + )) + #expect(!session.switchSwipeGesture(to: leftHalf, distance: 1)) + #expect(!session.switchMagnifyGesture(to: magnify, distance: 1)) + #expect(session.resolvedGesture?.id == maximize.id) + } + + @Test func titlebarContextAllowsTitlebarSwitches() { + let session = MultitouchGestureSession() + let maximize = gesture(kind: .swipeUp, activationZone: .anywhere) + let leftHalf = gesture(kind: .swipeLeft, activationZone: .titlebar) + let context = MultitouchGestureActivationContext( + targetWindow: nil, + startedInTitlebar: true + ) + + #expect(session.begin( + activationContext: context, + gesture: maximize, + loopWasAlreadyOpen: true + )) + #expect(session.switchSwipeGesture(to: leftHalf, distance: 1)) + #expect(session.resolvedGesture?.id == leftHalf.id) + } + + @Test func openLoopDoesNotBypassInitialTitlebarRequirement() { + let session = MultitouchGestureSession() + let leftHalf = gesture(kind: .swipeLeft, activationZone: .titlebar) + let context = MultitouchGestureActivationContext( + targetWindow: nil, + startedInTitlebar: false + ) + + #expect(!session.begin( + activationContext: context, + gesture: leftHalf, + loopWasAlreadyOpen: true + )) + #expect(session.isGestureRejected) + #expect(!session.hasGestureBegun) + } + + @Test func rejectedDirectionalCandidateCanRetryWithAnywhereAction() { + let session = MultitouchGestureSession() + let titlebarOnly = gesture(kind: .swipeLeft, activationZone: .titlebar) + let anywhere = gesture(kind: .swipeRight, activationZone: .anywhere) + let context = MultitouchGestureActivationContext( + targetWindow: nil, + startedInTitlebar: false + ) + + #expect(!session.begin( + activationContext: context, + gesture: titlebarOnly, + loopWasAlreadyOpen: true + )) + #expect(session.isGestureRejected) + #expect(!session.shouldAttemptBegin(with: titlebarOnly)) + #expect(session.shouldAttemptBegin(with: anywhere)) + + #expect(session.begin( + activationContext: context, + gesture: anywhere, + loopWasAlreadyOpen: true + )) + #expect(!session.isGestureRejected) + #expect(session.resolvedGesture?.id == anywhere.id) + } + + @Test func rejectedStrokeStaysLockedUntilItEnds() { + let session = MultitouchGestureSession() + let right = gesture(kind: .swipeRight, activationZone: .anywhere) + let up = gesture(kind: .swipeUp, activationZone: .anywhere) + let context = MultitouchGestureActivationContext( + targetWindow: nil, + startedInTitlebar: false + ) + + // No target window and Loop isn't open, so the stroke is rejected + #expect(!session.begin( + activationContext: context, + gesture: right, + loopWasAlreadyOpen: false + )) + #expect(!session.shouldAttemptBegin(with: up)) + + session.reset(endsStroke: false) + #expect(!session.shouldAttemptBegin(with: up)) + + session.reset() + #expect(session.begin( + activationContext: context, + gesture: up, + loopWasAlreadyOpen: true + )) + + session.abandonStroke() + #expect(!session.shouldAttemptBegin(with: right)) + } + + @Test func returningToACommittedActionIsARevisit() { + let session = MultitouchGestureSession() + let right = gesture(kind: .swipeRight, activationZone: .anywhere) + let left = gesture(kind: .swipeLeft, activationZone: .anywhere) + var revisits: [Bool] = [] + + #expect(session.begin( + activationContext: .init(targetWindow: nil, startedInTitlebar: false), + gesture: right, + loopWasAlreadyOpen: true + )) + session.setSwipeActivationDistance(0.08) + + session.commitSwipe(distance: 0.1, newKey: .gesture(right.id), step: 0.15) { _ in + revisits.append(session.isRevisitingAction) + } + #expect(session.switchSwipeGesture(to: left, distance: 0.1)) + revisits.append(session.isRevisitingAction) + #expect(session.switchSwipeGesture(to: right, distance: 0.1)) + revisits.append(session.isRevisitingAction) + + // Back through the move-back zone, then out to the same action again + #expect(session.resetSwipeActionIfNeeded(distance: 0.05)) + #expect(!session.shouldSuppressSwipeAction(distance: 0.2)) + session.commitSwipe(distance: 0.2, newKey: .gesture(right.id), step: 0.15) { _ in + revisits.append(session.isRevisitingAction) + } + + // Crossing steps advances the cycle as usual + session.commitSwipe(distance: 0.4, newKey: .gesture(right.id), step: 0.15) { _ in + revisits.append(session.isRevisitingAction) + } + + #expect(revisits == [false, false, true, true, false, false]) + } + + @Test func activationContextIsOwnedAndResetPerSession() { + let insideSession = MultitouchGestureSession() + let outsideSession = MultitouchGestureSession() + let anywhere = gesture(kind: .swipeUp, activationZone: .anywhere) + let titlebar = gesture(kind: .swipeLeft, activationZone: .titlebar) + + #expect(insideSession.begin( + activationContext: .init(targetWindow: nil, startedInTitlebar: true), + gesture: anywhere, + loopWasAlreadyOpen: true + )) + #expect(outsideSession.begin( + activationContext: .init(targetWindow: nil, startedInTitlebar: false), + gesture: anywhere, + loopWasAlreadyOpen: true + )) + + #expect(insideSession.canActivate(titlebar)) + #expect(!outsideSession.canActivate(titlebar)) + + insideSession.reset() + #expect(!insideSession.canActivate(anywhere)) + #expect(outsideSession.canActivate(anywhere)) + } + + @Test func fixedFrameActionsAreNotRapidRepeat() { + #expect(!WindowAction(.leftHalf).allowsRapidRepeat) + #expect(!WindowAction(.maximize).allowsRapidRepeat) + #expect(WindowAction(.larger).allowsRapidRepeat) + } + + @Test func swipeMoveBackZoneResetsAndSuppressesActionUntilLeavingZone() { + let session = MultitouchGestureSession() + var fireCount = 0 + let action = MultitouchGestureSession.ActionKey.radialSlot(0) + session.setSwipeActivationDistance(0.08) + + session.commitSwipe(distance: 0.23, newKey: action, step: 0.15) { _ in + fireCount += 1 + } + #expect(fireCount == 1) + #expect(session.resetSwipeActionIfNeeded(distance: 0.08)) + #expect(session.hasSwipeActionReset) + + session.commitSwipe(distance: 0.07, newKey: action, step: 0.15) { _ in + fireCount += 1 + } + #expect(fireCount == 1) + #expect(session.shouldSuppressSwipeAction(distance: 0.07)) + #expect(!session.shouldSuppressSwipeAction(distance: 0.1)) + + session.commitSwipe(distance: 0.24, newKey: action, step: 0.15) { _ in + fireCount += 1 + } + #expect(fireCount == 2) + #expect(!session.hasSwipeActionReset) + } + + @Test func swipeCycleReversesWhenTheSameStepBoundaryIsUncrossed() { + let session = MultitouchGestureSession() + var directions: [Bool] = [] + let action = MultitouchGestureSession.ActionKey.radialSlot(0) + session.setSwipeActivationDistance(0.08) + + session.commitSwipe(distance: 0.08, newKey: action, step: 0.15) { + directions.append($0) + } + session.commitSwipe(distance: 0.231, newKey: action, step: 0.15) { + directions.append($0) + } + session.commitSwipe(distance: 0.229, newKey: action, step: 0.15) { + directions.append($0) + } + + #expect(directions == [false, false, true]) + } + + @Test func swipeCycleFiresOnceForEveryCrossedStepInEitherDirection() { + let session = MultitouchGestureSession() + var directions: [Bool] = [] + let action = MultitouchGestureSession.ActionKey.radialSlot(0) + session.setSwipeActivationDistance(0.08) + + session.commitSwipe(distance: 0.08, newKey: action, step: 0.15) { + directions.append($0) + } + session.commitSwipe(distance: 0.39, newKey: action, step: 0.15) { + directions.append($0) + } + session.commitSwipe(distance: 0.22, newKey: action, step: 0.15) { + directions.append($0) + } + + #expect(directions == [false, false, false, true, true]) + } + + @Test func magnifyCycleReversesOuterBoundaryAndResetsInsideActivationRing() { + let session = MultitouchGestureSession() + var directions: [Bool] = [] + let action = gesture(kind: .magnifyIn, activationZone: .anywhere) + + session.commitMagnify( + gesture: action, + distance: 0.7, + originDistance: 0.5, + step: 0.2, + allowsRapidRepeat: true + ) { + directions.append($0) + } + session.commitMagnify( + gesture: action, + distance: 0.901, + originDistance: 0.5, + step: 0.2, + allowsRapidRepeat: true + ) { + directions.append($0) + } + session.commitMagnify( + gesture: action, + distance: 0.899, + originDistance: 0.5, + step: 0.2, + allowsRapidRepeat: true + ) { + directions.append($0) + } + let didReset = session.resetMagnifyActionIfNeeded( + distance: 0.699, + originDistance: 0.5, + step: 0.2 + ) + + #expect(didReset) + #expect(!session.hasCommittedMagnifyAction) + #expect(directions == [false, false, true]) + #expect(session.resetMagnifyActionIfNeeded(distance: 0.6, originDistance: 0.5, step: 0.2)) + #expect(!session.resetMagnifyActionIfNeeded(distance: 0.701, originDistance: 0.5, step: 0.2)) + + session.commitMagnify( + gesture: action, + distance: 0.701, + originDistance: 0.5, + step: 0.2, + allowsRapidRepeat: true + ) { + directions.append($0) + } + #expect(directions == [false, false, true, false]) + } + + @Test func radialMagnifyFiresOnceForEveryCrossedStepInEitherDirection() { + let session = MultitouchGestureSession() + var directions: [Bool] = [] + + session.commitRadialMagnify(distance: 0.7, originDistance: 0.5, step: 0.2) { + directions.append($0) + } + session.commitRadialMagnify(distance: 1.101, originDistance: 0.5, step: 0.2) { + directions.append($0) + } + session.commitRadialMagnify(distance: 0.899, originDistance: 0.5, step: 0.2) { + directions.append($0) + } + let didReset = session.resetMagnifyActionIfNeeded( + distance: 0.699, + originDistance: 0.5, + step: 0.2 + ) + + #expect(didReset) + #expect(!session.hasCommittedMagnifyAction) + #expect(directions == [false, false, false, true, true]) + } + + private func gesture( + fingerCount: Int = 3, + kind: GestureBinding.Kind, + activationZone: GestureBinding.ActivationZone + ) -> GestureBinding { + GestureBinding( + fingerCount: fingerCount, + kind: kind, + action: .singleAction(.custom(.init(.maximize))), + activationZone: activationZone + ) + } +} diff --git a/LoopTests/ScreenOrderTests.swift b/LoopTests/ScreenOrderTests.swift new file mode 100644 index 000000000..c375931ca --- /dev/null +++ b/LoopTests/ScreenOrderTests.swift @@ -0,0 +1,268 @@ +// +// ScreenOrderTests.swift +// LoopTests +// +// Created by Anand Hegde on 2026-09-20. +// + +import CoreGraphics +@testable import Loop +import Testing + +struct ScreenOrderTests { + /// A stand-in for a screen: a name, so that an order can be read at a glance, and the frame + /// it occupies. Frames use Loop's screen coordinate space, where the y axis points up. + private struct Screen { + let name: String + let frame: CGRect + + init(_ name: String, x: CGFloat, y: CGFloat, width: CGFloat = 1920, height: CGFloat = 1080) { + self.name = name + self.frame = CGRect(x: x, y: y, width: width, height: height) + } + } + + private func order(_ order: ScreenOrder, _ screens: [Screen]) -> [String] { + order.sorted(screens, frame: \.frame).map(\.name) + } + + // MARK: A single row + + /// Three screens side by side, the arrangement almost everybody has. + private var row: [Screen] { + [ + Screen("left", x: -1920, y: 0), + Screen("middle", x: 0, y: 0), + Screen("right", x: 1920, y: 0) + ] + } + + @Test func aRowIsWalkedLeftToRightClockwise() { + #expect(order(.clockwise, row) == ["left", "middle", "right"]) + } + + @Test func aRowKeepsEveryScreenInTheCycle() { + // A row has no inside, so the middle screen has to stay in the ring rather than being + // treated as a screen the cycle visits later. + #expect(order(.clockwise, row).count == row.count) + } + + @Test func aRowOfDifferentlySizedScreensIsStillWalkedLeftToRight() { + // A laptop display next to two larger screens: the centers no longer line up. + let screens = [ + Screen("laptop", x: -1470, y: 0, width: 1470, height: 956), + Screen("main", x: 0, y: 0, width: 2560, height: 1440), + Screen("side", x: 2560, y: 200, width: 1920, height: 1080) + ] + + #expect(order(.clockwise, screens) == ["laptop", "main", "side"]) + } + + @Test func aRowAlignedAlongItsTopEdgesIsStillWalkedLeftToRight() { + // A taller screen in the middle, lined up with its neighbors along the top: its center + // sits below theirs, which must not turn the row into a triangle. + let screens = [ + Screen("left", x: -1920, y: 360), + Screen("middle", x: 0, y: 0, width: 2560, height: 1440), + Screen("right", x: 2560, y: 360) + ] + + #expect(order(.clockwise, screens) == ["left", "middle", "right"]) + } + + @Test func aRowOnePointOutOfLineIsStillWalkedLeftToRight() { + let screens = [ + Screen("left", x: -1920, y: 1), + Screen("middle", x: 0, y: 0), + Screen("right", x: 1920, y: 1) + ] + + #expect(order(.clockwise, screens) == ["left", "middle", "right"]) + } + + // MARK: A column + + @Test func aColumnIsWalkedTopToBottomClockwise() { + // Clockwise is the right hand side of the circle, which runs downwards. + let screens = [ + Screen("top", x: 0, y: 2160), + Screen("middle", x: 0, y: 1080), + Screen("bottom", x: 0, y: 0) + ] + + #expect(order(.clockwise, screens) == ["top", "middle", "bottom"]) + } + + // MARK: A square + + /// Four screens in a block, the arrangement the clockwise request was filed about. + private var square: [Screen] { + [ + Screen("topLeft", x: 0, y: 1080), + Screen("topRight", x: 1920, y: 1080), + Screen("bottomLeft", x: 0, y: 0), + Screen("bottomRight", x: 1920, y: 0) + ] + } + + @Test func aSquareIsWalkedClockwiseFromTheTopLeft() { + #expect(order(.clockwise, square) == ["topLeft", "topRight", "bottomRight", "bottomLeft"]) + } + + @Test func theOrderDoesNotDependOnHowMacOSHandsOverTheScreens() { + let shuffled = [square[2], square[0], square[3], square[1]] + + #expect(order(.clockwise, shuffled) == order(.clockwise, square)) + } + + @Test func aSquareIsWalkedRowByRowWhenZShaped() { + #expect(order(.zShaped, square) == ["topLeft", "topRight", "bottomLeft", "bottomRight"]) + } + + // MARK: Screens with an inside + + @Test func theScreenInTheMiddleComesAfterTheOnesAroundIt() { + // The nine screen arrangement from the feature request: the eight on the outside are + // visited first, then the one they surround. + var screens: [Screen] = [] + + for row in 0 ..< 3 { + for column in 0 ..< 3 { + screens.append( + Screen("\(row)\(column)", x: CGFloat(column) * 1920, y: CGFloat(2 - row) * 1080) + ) + } + } + + #expect( + order(.clockwise, screens) == [ + "00", "01", "02", "12", "22", "21", "20", "10", // around the outside + "11" // and then the middle + ] + ) + } + + @Test func aLargerCornerScreenDoesNotPullItsNeighborInside() { + // The same nine screens, with the bottom left one made larger so that it sticks out to + // the left and below. The bottom middle screen is still on the outside. + var screens: [Screen] = [] + + for row in 0 ..< 3 { + for column in 0 ..< 3 where (row, column) != (2, 0) { + screens.append( + Screen("\(row)\(column)", x: CGFloat(column) * 1920, y: CGFloat(2 - row) * 1080) + ) + } + } + + screens.append(Screen("20", x: -560, y: -760, width: 2480, height: 1840)) + + #expect( + order(.clockwise, screens) == [ + "00", "01", "02", "12", "22", "21", "20", "10", // around the outside + "11" // and then the middle + ] + ) + } + + @Test func aGapIsSteppedOverRatherThanWalkedInto() { + // The same nine screens, with the top two on the right moved away to leave a gap, and + // the bottom right one holding them on. The outline crosses the top of the gap rather + // than going down into it, so the middle is still visited last. + var screens: [Screen] = [] + + for row in 0 ..< 3 { + for column in 0 ..< 2 { + screens.append( + Screen("\(row)\(column)", x: CGFloat(column) * 1920, y: CGFloat(2 - row) * 1080) + ) + } + } + + screens += [ + Screen("02", x: 4600, y: 2160), + Screen("12", x: 4600, y: 1080), + Screen("22", x: 3840, y: 0) + ] + + #expect( + order(.clockwise, screens) == [ + "00", "01", "02", "12", "22", "21", "20", "10", // around the outside + "11" // and then the middle + ] + ) + } + + @Test func aStaircaseIsWalkedFromItsBottomLeft() { + // Each screen sits half a screen higher than the one before it. zShapedOrder can't put + // these in a consistent order, so it mustn't be what decides where the cycle starts. + let screens = [ + Screen("a", x: 0, y: 0), + Screen("b", x: 1920, y: 540), + Screen("c", x: 3840, y: 1080), + Screen("d", x: 5760, y: 1620) + ] + + #expect(order(.clockwise, screens) == ["a", "b", "c", "d"]) + #expect(order(.clockwise, screens.reversed()) == ["a", "b", "c", "d"]) + } + + // MARK: Degenerate arrangements + + @Test func oneScreenIsItsOwnCycle() { + let screens = [Screen("only", x: 0, y: 0)] + + for order in ScreenOrder.allCases { + #expect(self.order(order, screens) == ["only"]) + } + } + + @Test func twoScreensCycleTheSameWayAround() { + let screens = [ + Screen("right", x: 1920, y: 0), + Screen("left", x: 0, y: 0) + ] + + for order in ScreenOrder.allCases { + #expect(self.order(order, screens) == ["left", "right"]) + } + } + + @Test func noScreensAreLostOrDuplicated() { + let screens = [ + Screen("a", x: 0, y: 2160), + Screen("b", x: 1920, y: 2160), + Screen("c", x: 3840, y: 1080), + Screen("d", x: 1920, y: 1080), + Screen("e", x: 0, y: 0), + Screen("f", x: 1920, y: 0), + Screen("g", x: 3840, y: 0) + ] + + for order in ScreenOrder.allCases { + #expect(Set(self.order(order, screens)) == Set(screens.map(\.name))) + #expect(self.order(order, screens).count == screens.count) + } + } + + @Test func everyScreenIsReachableByWalkingTheCycle() { + // What next/previous screen actually relies on: starting anywhere and stepping forward + // has to reach every screen before coming back around. + let screens = [ + Screen("a", x: 0, y: 1080), + Screen("b", x: 1920, y: 1080), + Screen("c", x: 3840, y: 1080), + Screen("d", x: 1920, y: 0), + Screen("e", x: 0, y: 0) + ] + + for order in ScreenOrder.allCases { + let cycle = self.order(order, screens) + + for start in cycle.indices { + let walked = (0 ..< cycle.count).map { cycle[(start + $0) % cycle.count] } + #expect(Set(walked).count == screens.count) + } + } + } +} diff --git a/LoopTests/SystemGestureFilterTests.swift b/LoopTests/SystemGestureFilterTests.swift new file mode 100644 index 000000000..fc6afddcc --- /dev/null +++ b/LoopTests/SystemGestureFilterTests.swift @@ -0,0 +1,43 @@ +// +// SystemGestureFilterTests.swift +// LoopTests +// +// Created by Kai Azim on 2026-09-24. +// + +@testable import Loop +import Testing + +struct SystemGestureFilterTests { + @Test func claimsFollowEachBindingsFingerCountAndActivationZone() { + let claims = SystemGestureFilter.claims(for: [ + gesture(fingerCount: 3, kind: .swipeRight, activationZone: .anywhere), + gesture(fingerCount: 3, kind: .swipeLeft, activationZone: .titlebar), + gesture(fingerCount: 4, kind: .radialMenu, activationZone: .anywhere), + // Two-finger gestures are always titlebar-only + gesture(fingerCount: 2, kind: .magnifyOut, activationZone: .anywhere), + // Conflicting bindings are inactive, so they claim nothing + gesture(fingerCount: 3, kind: .magnifyIn, activationZone: .anywhere), + gesture(fingerCount: 3, kind: .magnifyIn, activationZone: .anywhere) + ]) + + #expect(claims[3]?.anywhere == [.swipeRight]) + #expect(claims[3]?.titlebarOnly == [.swipeLeft]) + #expect(claims[4]?.anywhere == Set(SystemGestureFilter.DockGesture.allCases)) + #expect(claims[2]?.anywhere == []) + #expect(claims[2]?.titlebarOnly == [.pinch]) + } + + private func gesture( + fingerCount: Int, + kind: GestureBinding.Kind, + activationZone: GestureBinding.ActivationZone + ) -> GestureBinding { + GestureBinding( + fingerCount: fingerCount, + kind: kind, + action: .singleAction(.custom(.init(.maximize))), + activationZone: activationZone + ) + } +} diff --git a/tools/apply-loop-config.sh b/tools/apply-loop-config.sh index cb794583a..2f44784c1 100755 --- a/tools/apply-loop-config.sh +++ b/tools/apply-loop-config.sh @@ -5,6 +5,7 @@ # Applies one Loop configuration to this Mac: # - 13 radial menu segments (a 3 x 2 grid of thirds and halves) # - 12 keybinds, including trigger + left + right = full-height center cycle +# (centered 1/3 -> 1/2 -> 2/3 -> 3/4 of the screen width) # - the "Allow radial menu customization" flag # # All other Loop settings on this Mac stay as they are. @@ -52,7 +53,7 @@ cat > "$WORK/keybinds.txt" << "KEYBINDS_EOF" {"direction":"TopRightQuarter","id":"6B22C764-4DCF-423D-BD00-0A46420F8350","keybind":[126,124]} {"direction":"BottomRightQuarter","id":"72B01EEE-97BB-4C55-B7FB-106944F4C452","keybind":[124,125]} {"direction":"BottomLeftQuarter","id":"A2E89344-27CB-4B51-BB80-4116CF968D9A","keybind":[125,123]} -{"direction":"Cycle","id":"C5FB769E-0411-47A0-9E96-E178B9E4274F","keybind":[123,124],"name":"Center Cycle","cycle":[{"direction":"HorizontalCenterThird","id":"8FF05B3C-7639-4C8D-8417-478D658A4397","keybind":[]},{"direction":"HorizontalCenterHalf","id":"8D16EF32-B700-448B-AF3E-D88BD64D1FAF","keybind":[]}]} +{"direction":"Cycle","id":"C5FB769E-0411-47A0-9E96-E178B9E4274F","keybind":[123,124],"name":"Center Cycle","cycle":[{"direction":"HorizontalCenterThird","id":"8FF05B3C-7639-4C8D-8417-478D658A4397","keybind":[]},{"direction":"HorizontalCenterHalf","id":"8D16EF32-B700-448B-AF3E-D88BD64D1FAF","keybind":[]},{"direction":"Custom","id":"57D7449E-A95B-4206-A9A9-EB0A72F9E405","keybind":[],"name":"Center Two Thirds","unit":1,"positionMode":1,"sizeMode":0,"xPoint":16.667,"yPoint":0,"width":66.666,"height":100},{"direction":"Custom","id":"42582C7D-0C65-40EF-85AB-FBF0CBB77DFA","keybind":[],"name":"Center Three Quarters","unit":1,"positionMode":1,"sizeMode":0,"xPoint":12.5,"yPoint":0,"width":75,"height":100}]} KEYBINDS_EOF # --- 1. Save the current preferences -------------------------------------------