From 6790d466a57bf99e2b032c36f99a17fe0d16fcf0 Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 28 Sep 2026 19:25:17 -0700 Subject: [PATCH 01/13] =?UTF-8?q?=E2=9C=A8=20Trackpad=20gestures=20(#1064)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-build.yml | 4 +- Loop.xcodeproj/project.pbxproj | 80 +-- .../xcschemes/Loop (GH ACTIONS).xcscheme | 1 + .../xcshareddata/xcschemes/Loop.xcscheme | 6 + Loop/App/AppDelegate.swift | 10 +- Loop/App/DataPatcher.swift | 12 + Loop/Core/LoopManager.swift | 191 +++++-- .../Debug/GestureDebugOverlayController.swift | 123 +++++ .../Debug/GestureDebugOverlayModel.swift | 211 ++++++++ .../Debug/GestureDebugOverlayView.swift | 214 ++++++++ .../Multitouch/MultitouchGestureBlocker.swift | 60 +++ .../Multitouch/MultitouchGestureSession.swift | 452 ++++++++++++++++ .../MultitouchRecognizerRegistry.swift | 160 ++++++ .../Multitouch/MultitouchTargetResolver.swift | 94 ++++ .../MultitouchTrigger+Magnify.swift | 263 +++++++++ .../Multitouch/MultitouchTrigger+Swipe.swift | 329 ++++++++++++ Loop/Core/Multitouch/MultitouchTrigger.swift | 499 ++++++++++++++++++ .../Multitouch/RadialGestureGeometry.swift | 126 +++++ .../Core/Multitouch/SystemGestureFilter.swift | 387 ++++++++++++++ .../Observers/Helpers/KeybindResolver.swift | 2 +- .../Observers/MouseInteractionObserver.swift | 46 +- Loop/Extensions/CGEventField+Extensions.swift | 38 ++ Loop/Extensions/CGEventType+Extensions.swift | 13 + Loop/Extensions/Defaults+Extensions.swift | 246 ++++++--- Loop/Extensions/ProcessInfo+Extensions.swift | 16 + Loop/Localizable.xcstrings | 121 ++++- Loop/Private APIs/SkyLightSymbolLoader.swift | 7 +- Loop/Private APIs/SkyLightToolBelt.swift | 29 +- .../Loop/AdvancedConfiguration.swift | 3 - .../Loop/ExcludedAppsConfiguration.swift | 14 +- .../Gestures/GestureConfigurationView.swift | 310 +++++++++++ .../Settings/Gestures/GestureItemView.swift | 280 ++++++++++ .../Gestures/GesturesConfigurationView.swift | 105 ++++ .../Keybinds/DirectionPickerView.swift | 9 +- .../Keybinds/Keybind Recorder/Keycorder.swift | 2 +- .../Settings/Keybinds/KeybindItemView.swift | 127 +++-- .../Keybinds/KeybindsConfigurationView.swift | 20 +- .../CustomActionConfigurationView.swift | 4 +- .../CycleActionConfigurationView.swift | 18 +- .../StashActionConfigurationView.swift | 4 +- Loop/Settings Window/SettingsTab.swift | 8 +- .../RadialMenuActionItemView.swift | 130 ++--- .../RadialMenuConfigurationView.swift | 18 +- Loop/Stashing/StashManager.swift | 40 +- Loop/Stashing/StashedWindowStore.swift | 2 + Loop/Updater/Updater.swift | 3 +- .../Event Monitoring/ActiveEventMonitor.swift | 22 +- .../BaseEventTapMonitor.swift | 43 +- .../PassiveEventMonitor.swift | 23 +- Loop/Utilities/MissionControl.swift | 28 + .../Radial Menu/RadialMenuController.swift | 6 +- .../Radial Menu/RadialMenuViewModel.swift | 27 +- .../WindowActionIndicatorService.swift | 11 +- .../SystemWindowManager.swift | 0 .../Window Action/CycleProgressStore.swift | 6 + .../Window Action/GestureBinding.swift | 218 ++++++++ .../Window Action/WindowAction.swift | 16 +- .../Window Action/WindowActionCache.swift | 4 +- .../Window Action/WindowDirection.swift | 32 ++ .../WindowActionEngine.swift | 6 + Loop/Window Management/Window/Window.swift | 82 ++- .../Window/WindowUtility.swift | 51 +- LoopTests/CycleActionCoordinatorTests.swift | 8 +- .../MultitouchGestureActivationTests.swift | 367 +++++++++++++ LoopTests/SystemGestureFilterTests.swift | 43 ++ 65 files changed, 5384 insertions(+), 446 deletions(-) create mode 100644 Loop/Core/Multitouch/Debug/GestureDebugOverlayController.swift create mode 100644 Loop/Core/Multitouch/Debug/GestureDebugOverlayModel.swift create mode 100644 Loop/Core/Multitouch/Debug/GestureDebugOverlayView.swift create mode 100644 Loop/Core/Multitouch/MultitouchGestureBlocker.swift create mode 100644 Loop/Core/Multitouch/MultitouchGestureSession.swift create mode 100644 Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift create mode 100644 Loop/Core/Multitouch/MultitouchTargetResolver.swift create mode 100644 Loop/Core/Multitouch/MultitouchTrigger+Magnify.swift create mode 100644 Loop/Core/Multitouch/MultitouchTrigger+Swipe.swift create mode 100644 Loop/Core/Multitouch/MultitouchTrigger.swift create mode 100644 Loop/Core/Multitouch/RadialGestureGeometry.swift create mode 100644 Loop/Core/Multitouch/SystemGestureFilter.swift create mode 100644 Loop/Extensions/CGEventField+Extensions.swift create mode 100644 Loop/Extensions/CGEventType+Extensions.swift create mode 100644 Loop/Extensions/ProcessInfo+Extensions.swift create mode 100644 Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift create mode 100644 Loop/Settings Window/Settings/Gestures/GestureItemView.swift create mode 100644 Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift create mode 100644 Loop/Utilities/MissionControl.swift rename Loop/{Core => Window Management}/SystemWindowManager.swift (100%) create mode 100644 Loop/Window Management/Window Action/GestureBinding.swift create mode 100644 LoopTests/MultitouchGestureActivationTests.swift create mode 100644 LoopTests/SystemGestureFilterTests.swift 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"> + + ()) { @@ -62,6 +70,9 @@ 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) } } @@ -77,5 +88,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/Core/LoopManager.swift b/Loop/Core/LoopManager.swift index 2879b26c8..10b8852cc 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,31 @@ 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, reverse: reverse) + } + }, + checkIfLoopOpen: { [weak self] in + self?.isLoopActive ?? false + } + ) + private(set) lazy var mouseInteractionObserver = MouseInteractionObserver( windowActionCache: windowActionCache, changeAction: { [weak self] newAction in @@ -96,10 +129,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 +168,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 +197,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 +216,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 +275,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 +325,7 @@ extension LoopManager { await resizeContext.refreshResolvedState() guard !shouldCancelOpening else { - return + return .cancelled } if !Defaults[.disableCursorInteraction] { @@ -228,11 +333,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 +393,20 @@ 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. + /// - 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, + 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 +419,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 +436,11 @@ extension LoopManager { if newAction.direction == .cycle { newParentAction = newAction - cycleProposal = proposeCycleAction(newAction, canAdvance: canAdvanceCycle) + cycleProposal = proposeCycleAction( + newAction, + canAdvance: canAdvanceCycle, + reverse: reverse + ) if let cycleProposal { newAction = cycleProposal.action } else if !canAdvanceCycle { @@ -357,7 +471,7 @@ extension LoopManager { newAction == resizeContext.action, !canAdvanceCycle || ( !newAction.direction.willChangeScreen && - !newAction.canRepeat + !newAction.allowsRepeatedSelection ), let newParentAction { if resizeContext.parentAction != newParentAction { @@ -370,6 +484,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 +575,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) @@ -471,7 +597,7 @@ extension LoopManager { return } - if newAction != resizeContext.action || newAction.canRepeat { + if newAction != resizeContext.action || newAction.allowsRepeatedSelection { if !disableHapticFeedback { performHapticFeedback() } @@ -481,7 +607,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 +641,8 @@ extension LoopManager { private func proposeCycleAction( _ action: WindowAction, - canAdvance: Bool + canAdvance: Bool, + reverse: Bool ) -> CycleActionCoordinator.Proposal? { // Allow cycling backwards only if: // - Shift is not part of the action's keybind (eligibleForReverseCycle) @@ -526,7 +653,7 @@ 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 { @@ -572,7 +699,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..b28995dce --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchGestureBlocker.swift @@ -0,0 +1,60 @@ +// +// MultitouchGestureBlocker.swift +// Loop +// +// Created by Kai Azim on 2026-04-05. +// + +import AppKit +import Scribe + +/// Reference-counted because the blocker is shared across in-flight +/// gestures: one gesture ending mustn't disable blocking for others still +/// active. `start()` is also idempotent so duplicate calls don't leak the +/// previous `ActiveEventMonitor` (it self-retains via `Unmanaged.passRetained`). +@Loggable +final class MultitouchGestureBlocker { + private var monitor: ActiveEventMonitor? + private var activeCount: Int = 0 + + func start() { + if monitor != nil { + activeCount += 1 + return + } + + log.info("Starting gesture blocker") + + let eventTypes: [CGEventType] = [ + .scrollWheel, + CGEventType(rawValue: UInt32(NSEvent.EventType.gesture.rawValue)), + CGEventType(rawValue: UInt32(NSEvent.EventType.rotate.rawValue)), + CGEventType(rawValue: UInt32(NSEvent.EventType.swipe.rawValue)), + CGEventType(rawValue: UInt32(NSEvent.EventType.smartMagnify.rawValue)) + ].compactMap(\.self) + + let newMonitor = ActiveEventMonitor("gesture_blocker", events: eventTypes) { _ in .ignore } + newMonitor.start() + + guard newMonitor.isEnabled else { + log.warn("Failed to start gesture blocker") + newMonitor.stop() + return + } + + monitor = newMonitor + activeCount = 1 + } + + func stop() { + guard let monitor else { return } + + activeCount -= 1 + guard activeCount == 0 else { return } + + monitor.stop() + self.monitor = nil + + log.info("Stopped gesture blocker") + } +} 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..55fe51cec --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift @@ -0,0 +1,160 @@ +// +// MultitouchRecognizerRegistry.swift +// Loop +// +// Created by Kai Azim on 2026-07-06. +// + +import Subsurface + +@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] = [:] + + 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] { + 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 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..7f93eb39a --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchTargetResolver.swift @@ -0,0 +1,94 @@ +// +// 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: (touchID: Int, window: Window?, isInTitlebar: Bool)? + + func reset() { + lastRepeatableWindow = nil + touchTarget = nil + } + + func activationContext( + for gesture: GestureBinding, + touchID: Int, + allowsRapidRepeat: Bool + ) -> MultitouchGestureActivationContext { + let (windowAtCursor, startedInTitlebar) = windowUnderCursor(touchID: touchID) + + let targetWindow: Window? = if let windowAtCursor { + windowAtCursor + } else if allowsRapidRepeat, gesture.effectiveActivationZone == .anywhere { + lastRepeatableWindow + } else { + nil + } + + return MultitouchGestureActivationContext( + targetWindow: targetWindow, + startedInTitlebar: startedInTitlebar + ) + } + + func isCursorInTitlebar(touchID: Int) -> Bool { + windowUnderCursor(touchID: touchID).isInTitlebar + } + + func rememberRepeatableWindow(_ window: Window?, allowsRapidRepeat: Bool) { + guard let window, allowsRapidRepeat else { return } + lastRepeatableWindow = window + } + + private func windowUnderCursor(touchID: Int) -> (window: Window?, isInTitlebar: Bool) { + if let touchTarget, touchTarget.touchID == touchID { + return (touchTarget.window, touchTarget.isInTitlebar) + } + + let cursorPosition = NSEvent.mouseLocation.flipY(screen: NSScreen.screens[0]) + let window = WindowUtility.windowAtPosition(cursorPosition) + let inTitlebar = window.map { isInTitlebar(cursorPosition, of: $0) } ?? false + touchTarget = (touchID, window, inTitlebar) + return (window, inTitlebar) + } + + 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..870e35637 --- /dev/null +++ b/Loop/Core/Multitouch/MultitouchTrigger.swift @@ -0,0 +1,499 @@ +// +// 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()) + 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() + } else { + gestureMonitor.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.stop() + } + } + } + + 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 { + session.abandonStroke() + return false + } + + guard session.begin( + activationContext: activationContext, + gesture: gesture, + loopWasAlreadyOpen: loopWasAlreadyOpen + ) else { + 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 { + session.reject() + return false + } + + session.setSwipeActivationDistance( + recognizerRegistry.entry(for: fingerCount)?.recognizer.minimumSwipeTranslation + ) + + targetResolver.rememberRepeatableWindow( + activationContext.targetWindow, + allowsRapidRepeat: allowsRapidRepeat + ) + + gestureBlocker.start() + session.acquireGestureBlocker() + return true + } + + 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 { + 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.stop() + } + } +} + +// 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..264b8ff93 --- /dev/null +++ b/Loop/Core/Multitouch/SystemGestureFilter.swift @@ -0,0 +1,387 @@ +// +// SystemGestureFilter.swift +// Loop +// +// Created by Kai Azim on 2026-09-24. +// + +import CoreGraphics +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 = [] + } + + private enum Owner { + case undecided, loop, dock + } + + private enum TitlebarLookup { + case pending, inside, outside + } + + private enum Sequence { + case passing + case dropping + /// Started the unbound way on a partly bound axis. The Dock is sent a cancel if Loop claims it + case provisional + /// Started the bound way on a partly or unconfirmed bound axis. Replayed to the Dock if Loop doesn't claim it + case holding(began: CGEvent) + } + + private enum Decision { + case forward, drop + case replay(began: CGEvent, current: CGEvent) + case cancel(CGEvent) + } + + private struct State { + var isRunning = false + var claims: [Int: Claims] = [:] + /// Active finger count per multitouch device + var fingerCounts: [UInt64: Int] = [:] + /// Incremented whenever the fingers touch down or lift, so stale lookups are discarded + var touchID = 0 + var hasLookedUpTouch = false + var titlebarLookup = TitlebarLookup.pending + var isMissionControlShowing = false + var owners: [Int: Owner] = [:] + + var fingerCount: Int { + fingerCounts.values.max() ?? 0 + } + + /// Titlebar-only gestures stay claimed until known: losing a stroke beats both reacting + func claimedGestures(fingerCount: Int) -> Set { + guard let claims = claims[fingerCount] else { return [] } + return titlebarLookup == .outside ? claims.anywhere : claims.anywhere.union(claims.titlebarOnly) + } + + /// Titlebar-only gestures count once known to apply, so the Dock can still get a stroke Loop rejects + func confirmedClaims(fingerCount: Int) -> Set { + guard let claims = claims[fingerCount] else { return [] } + return titlebarLookup == .inside ? claims.anywhere.union(claims.titlebarOnly) : claims.anywhere + } + + /// The Dock keeps its gestures while Mission Control is showing, so they can dismiss it + func owner(fingerCount: Int) -> Owner { + isMissionControlShowing ? .dock : owners[fingerCount] ?? .undecided + } + } + + 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>? + + /// Marks events Loop re-posts to the Dock, so the filter lets them through + private static let repostMarker: Int64 = 0x4C4F_4F50 + /// Kept small, as the Dock jumps to the current progress when a held `began` is replayed + private static let holdReleaseProgress: Double = 0.05 + + /// Only touched on the event tap thread + private var sequence = Sequence.passing + private var sequenceFingerCount = 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") + + let newMonitor = ActiveEventMonitor( + "system_gesture_filter", + events: [.dockControl] + ) { [weak self] event in + self?.handle(event) ?? .forward + } + newMonitor.start() + + guard newMonitor.isEnabled else { + log.warn("Failed to start system gesture filter") + newMonitor.stop() + return + } + + eventMonitor = newMonitor + } + + func stop() { + contactsTask?.cancel() + contactsTask = nil + state.withLock { $0 = State() } + + guard let eventMonitor else { return } + eventMonitor.stop() + self.eventMonitor = nil + + log.info("Stopped system gesture filter") + } + + /// Identifies the touch in progress, changing whenever the fingers touch down or lift + var currentTouchID: Int { + state.withLock(\.touchID) + } + + func canClaimCurrentTouch(fingerCount: Int) -> Bool { + state.withLock { !$0.isRunning || $0.owner(fingerCount: 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 } + guard state.owner(fingerCount: 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 + } + } + + private func updateFingerCount(_ count: Int, deviceID: UInt64) { + let lookupTouchID: Int? = state.withLock { state in + let wasTouching = state.fingerCount > 0 + state.fingerCounts[deviceID] = count + + if wasTouching != (state.fingerCount > 0) { + state.touchID += 1 + state.hasLookedUpTouch = false + state.titlebarLookup = .pending + state.isMissionControlShowing = false + state.owners.removeAll() + } + + // Look up once enough fingers are down for the smallest claim + let lookupFingerCount = max(state.claims.keys.min() ?? 2, 2) + guard !state.hasLookedUpTouch, 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 + } + } + } + + private func handle(_ event: CGEvent) -> ActiveEventMonitor.EventHandling { + guard event.getIntegerValueField(.gestureHIDType) == CGEventField.GestureHIDType.dockSwipe.rawValue, + event.getIntegerValueField(.eventSourceUserData) != Self.repostMarker + else { + return .forward + } + + switch decide(for: event) { + case .forward: + return .forward + case .drop: + return .ignore + case let .replay(began, current): + repost(began) + repost(current) + return .ignore + case let .cancel(current): + current.setIntegerValueField(.gesturePhase, value: CGEventField.GesturePhase.cancelled.rawValue) + current.setDoubleValueField(.dockSwipeVelocity, value: 0) + repost(current) + return .ignore + } + } + + private func decide(for event: CGEvent) -> Decision { + let phase = CGEventField.GesturePhase(rawValue: event.getIntegerValueField(.gesturePhase)) + let motion = CGEventField.DockSwipeMotion(rawValue: event.getIntegerValueField(.dockSwipeMotion)) + let progress = event.getDoubleValueField(.dockSwipeProgress) + + if phase == .began { + sequence = beginSequence(event, motion: motion, progress: progress) + switch sequence { + case .passing, .provisional: return .forward + case .dropping, .holding: return .drop + } + } + + let isEnd = phase == .ended || phase == .cancelled + defer { + if isEnd { sequence = .passing } + } + + switch sequence { + case .passing: + return .forward + case .dropping: + return .drop + case .provisional: + let fingerCount = sequenceFingerCount + guard state.withLock({ $0.owner(fingerCount: fingerCount) }) == .loop else { return .forward } + sequence = .dropping + return .cancel(event.copy() ?? event) + case let .holding(began): + let fingerCount = sequenceFingerCount + let owner: Owner = state.withLock { state in + let owner = state.owner(fingerCount: fingerCount) + guard owner == .undecided, + abs(progress) >= Self.holdReleaseProgress, + Self.gestures(motion: motion, progress: progress) + .isDisjoint(with: state.claimedGestures(fingerCount: fingerCount)) + else { + return owner + } + state.owners[fingerCount] = .dock + return .dock + } + + switch owner { + case .undecided: + return .drop + case .loop: + sequence = .dropping + return .drop + case .dock: + sequence = .passing + // A sequence ending while held was too small for the Dock to act on + return isEnd ? .drop : .replay(began: began, current: event.copy() ?? event) + } + } + } + + private func beginSequence(_ event: CGEvent, motion: CGEventField.DockSwipeMotion?, progress: Double) -> Sequence { + let (fingerCount, owner, claimed, confirmed) = state.withLock { state in + let fingerCount = state.fingerCount + return ( + fingerCount, + state.owner(fingerCount: fingerCount), + state.claimedGestures(fingerCount: fingerCount), + state.confirmedClaims(fingerCount: fingerCount) + ) + } + sequenceFingerCount = fingerCount + + switch owner { + case .loop: + return .dropping + case .dock: + return .passing + case .undecided: + let axis = Self.gestures(motion: motion, progress: 0) + let claimedOnAxis = axis.intersection(claimed) + + if claimedOnAxis.isEmpty { + setOwner(.dock, fingerCount: fingerCount) + return .passing + } + if axis.isSubset(of: confirmed) { + setOwner(.loop, fingerCount: fingerCount) + return .dropping + } + + let startsClaimedWay = !Self.gestures(motion: motion, progress: progress).isDisjoint(with: claimedOnAxis) + return startsClaimedWay ? .holding(began: event.copy() ?? event) : .provisional + } + } + + private func setOwner(_ owner: Owner, fingerCount: Int) { + state.withLock { $0.owners[fingerCount] = owner } + } + + private func repost(_ event: CGEvent) { + event.setIntegerValueField(.eventSourceUserData, value: Self.repostMarker) + event.post(tap: .cgSessionEventTap) + } + + /// Both directions of the axis when `progress` is zero + private static func gestures(motion: CGEventField.DockSwipeMotion?, progress: Double) -> Set { + let (negative, positive): (DockGesture, DockGesture) + switch motion { + case .horizontal: (negative, positive) = (.swipeRight, .swipeLeft) + case .vertical: (negative, positive) = (.swipeUp, .swipeDown) + case .pinch: (negative, positive) = (.pinch, .spread) + case nil: return [] + } + + 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/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 64a703946..90cc973ca 100644 --- a/Loop/Extensions/Defaults+Extensions.swift +++ b/Loop/Extensions/Defaults+Extensions.swift @@ -7,120 +7,130 @@ // 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 previewBackgroundEnableBlur = Key("previewBackgroundEnableBlur", default: true) + 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 launchAtLogin = Key("launchAtLogin", default: false) + static let startHidden = Key("startHidden", default: false) static let hideMenuBarIcon = Key("hideMenuBarIcon", default: false, iCloud: false) - static let animationConfiguration = Key("animationConfiguration", default: .snappy, iCloud: true) - static let windowSnapping = Key("windowSnapping", default: false, 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: false, 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 animationConfiguration = Key("animationConfiguration", default: .snappy) + static let windowSnapping = Key("windowSnapping", default: false) + 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 moveCursorWithWindow = Key("moveCursorWithWindow", default: false) + 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: false, 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: false) + static let sizeIncrement = Key("sizeIncrement", default: 20) /// 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) /// 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 +139,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 +181,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(.previewBackgroundEnableBlur) + Defaults.iCloud.add(.previewBackgroundAccentOpacity) + + Defaults.iCloud.add(.startHidden) + 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(.moveCursorWithWindow) + 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(.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..fbc5086db 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -621,6 +621,20 @@ } } }, + "%lld-finger %@" : { + "comment" : "Default title describing a gesture. First argument is the finger count, second is the gesture kind name (e.g. 'Magnify In', 'Swipe Up').", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "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." + }, "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.", "localizations" : { @@ -1153,7 +1167,7 @@ } }, "Add" : { - "comment" : "Used to add items to a list", + "comment" : "Button to add a new gesture", "localizations" : { "ar" : { "stringUnit" : { @@ -1860,6 +1874,9 @@ } } }, + "Anywhere" : { + "comment" : "Gesture activation zone covers the entire window" + }, "App icon is locked" : { "localizations" : { "ar" : { @@ -2390,6 +2407,9 @@ } } }, + "Both" : { + "comment" : "Gesture category label: swipe and magnify gestures\nGesture kind: swipe and magnify gestures; opens the radial menu" + }, "Bottom" : { "comment" : "Label for a slider in Loop’s padding settings", "localizations" : { @@ -4165,6 +4185,9 @@ } } }, + "Continue the swipe or magnify gesture to step through cycle actions." : { + "comment" : "Section footer shown in settings" + }, "Contributors on GitHub" : { "localizations" : { "ar" : { @@ -4787,7 +4810,7 @@ } }, "Customize this action's custom frame." : { - "comment" : "A help text describing the customization option for a custom-direction action.", + "comment" : "Help text on the slider icon next to a gesture action with a custom frame", "localizations" : { "ar" : { "stringUnit" : { @@ -4875,6 +4898,12 @@ } } }, + "Customize this gesture." : { + "comment" : "Help text shown when hovering a gesture configuration button" + }, + "Customize this gesture's action." : { + "comment" : "Help text shown when hovering a gesture's action button" + }, "Customize this keybind's action." : { "localizations" : { "ar" : { @@ -4963,8 +4992,12 @@ } } }, + "Customize this radial menu action." : { + "comment" : "A tooltip for the radial menu action customization button.", + "isCommentAutoGenerated" : true + }, "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" : { @@ -5585,6 +5618,9 @@ } } }, + "Direction" : { + "comment" : "Label for the swipe direction picker in the gesture configuration modal" + }, "Disable cursor interaction" : { "localizations" : { "ar" : { @@ -5937,6 +5973,9 @@ } } }, + "Down" : { + "comment" : "Swipe direction picker option: down" + }, "Enable blur" : { "comment" : "Text for enabling the blur effect on the preview.", "localizations" : { @@ -6026,6 +6065,9 @@ } } }, + "Enable trackpad gestures" : { + "comment" : "Toggle in gestures settings" + }, "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.", "localizations" : { @@ -6734,6 +6776,9 @@ } } }, + "Fingers" : { + "comment" : "Label for the finger-count stepper in the gesture configuration popover" + }, "First Fourth" : { "comment" : "Window action", "localizations" : { @@ -7801,6 +7846,12 @@ } } }, + "Gesture" : { + "comment" : "Label for the magnify gesture picker in the gesture configuration modal" + }, + "Gestures" : { + "comment" : "Section header shown in gestures settings" + }, "Go Back" : { "comment" : "Section header in the action picker of the Keybinds tab", "localizations" : { @@ -9044,7 +9095,7 @@ } }, "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" : { @@ -12845,7 +12896,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" : { @@ -16653,6 +16704,9 @@ } } }, + "Magnify" : { + "comment" : "Gesture category label: magnify" + }, "Maximize" : { "comment" : "Window action", "localizations" : { @@ -18518,6 +18572,9 @@ } } }, + "No gestures" : { + "comment" : "Empty state title in gestures settings" + }, "No keybinds" : { "localizations" : { "ar" : { @@ -23627,6 +23684,9 @@ } } }, + "Pinch" : { + "comment" : "Gesture kind: magnify outward\nMagnify gesture picker option: pinch" + }, "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.", "localizations" : { @@ -23980,6 +24040,9 @@ } } }, + "Press \"Add\" to add a gesture" : { + "comment" : "Empty state subtitle in gestures settings" + }, "Press \"Add\" to add a keybind" : { "localizations" : { "ar" : { @@ -24867,7 +24930,7 @@ } }, "Radial Menu" : { - "comment" : "Section header shown in settings", + "comment" : "Label shown for a gesture configured to open the radial menu\nSection header shown in settings", "localizations" : { "ar" : { "stringUnit" : { @@ -25222,7 +25285,7 @@ } }, "Remove" : { - "comment" : "Used to remove items from a list", + "comment" : "Button to remove selected gestures", "localizations" : { "ar" : { "stringUnit" : { @@ -26018,7 +26081,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" : { @@ -27876,6 +27939,19 @@ } } }, + "Settings tab: Gestures" : { + "comment" : "Title of the gestures settings tab.", + "extractionState" : "extracted_with_value", + "isCommentAutoGenerated" : true, + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Gestures" + } + } + } + }, "Settings tab: Icon" : { "localizations" : { "ar" : { @@ -30089,6 +30165,9 @@ } } }, + "Spread" : { + "comment" : "Gesture kind: magnify inward\nMagnify gesture picker option: spread" + }, "Stage Manager" : { "comment" : "Section header shown in settings", "localizations" : { @@ -30621,6 +30700,21 @@ } } }, + "Swipe" : { + "comment" : "Gesture category label: swipe" + }, + "Swipe Down" : { + "comment" : "Gesture kind: directional swipe" + }, + "Swipe Left" : { + "comment" : "Gesture kind: directional swipe" + }, + "Swipe Right" : { + "comment" : "Gesture kind: directional swipe" + }, + "Swipe Up" : { + "comment" : "Gesture kind: directional swipe" + }, "Sync Wallpaper" : { "localizations" : { "ar" : { @@ -31150,6 +31244,9 @@ } } }, + "There are other gestures that conflict with this gesture." : { + "comment" : "Tooltip shown on a conflicting gesture in settings" + }, "There are other keybinds that conflict with this key combination." : { "localizations" : { "ar" : { @@ -31771,6 +31868,9 @@ } } }, + "Titlebar Only" : { + "comment" : "Gesture activation zone restricted to a window's titlebar" + }, "To save power, window animations are\nunavailable in Low Power Mode." : { "localizations" : { "ar" : { @@ -33280,6 +33380,9 @@ } } }, + "Up" : { + "comment" : "Swipe direction picker option: up" + }, "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.", "localizations" : { @@ -35674,5 +35777,5 @@ } } }, - "version" : "1.0" + "version" : "1.1" } \ No newline at end of file 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/AdvancedConfiguration.swift b/Loop/Settings Window/Loop/AdvancedConfiguration.swift index fbf83d3b7..be7b4d113 100644 --- a/Loop/Settings Window/Loop/AdvancedConfiguration.swift +++ b/Loop/Settings Window/Loop/AdvancedConfiguration.swift @@ -127,7 +127,6 @@ 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 @@ -201,8 +200,6 @@ 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") diff --git a/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift b/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift index 218348871..8d2149ce8 100644 --- a/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift +++ b/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift @@ -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 applications") + .font(.title3) + Text("Press \"Add\" to add an application") + .font(.caption) } .foregroundStyle(.secondary) .padding() diff --git a/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift b/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift new file mode 100644 index 000000000..acf199afa --- /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("Close", 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..94e82871b --- /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: "There are other gestures that conflict with this gesture.", 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("Failed to resolve linked keybind") + .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..7d92d2def --- /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: "Enable trackpad gestures", comment: "Toggle in gestures settings"), isOn: $enableGestures) + } + } + + private var gesturesSection: some View { + LuminareSection { + LuminareButtonRow { + Button(String(localized: "Add", comment: "Button to add a new gesture")) { + gestures.insert( + GestureBinding(), + at: 0 + ) + } + + Button(String(localized: "Remove", comment: "Button to remove selected gestures"), 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: "Press \"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..653fd38c4 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 { diff --git a/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift b/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift index d29fd319c..95f4ac94f 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 diff --git a/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift b/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift index 573ad0563..24374467d 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 { @@ -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 { @@ -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..de9fb64c8 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. @@ -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) @@ -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("Press \"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..a324f4e64 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 diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift index ff2f3b681..9ecb5d390 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 @@ -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("Press \"Add\" to add a cycle item") + .font(.caption) } .foregroundStyle(.secondary) .padding() diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift index 6f9a5d62d..ee1a9333f 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 diff --git a/Loop/Settings Window/SettingsTab.swift b/Loop/Settings Window/SettingsTab.swift index b143ec480..909c24532 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 @@ -43,6 +44,8 @@ enum SettingsTab: @MainActor LuminareTabItem, CaseIterable { Color(#colorLiteral(red: 0.4373228079, green: 0.6609574352, blue: 0.2663080928, alpha: 1)) case .keybinds: Color(#colorLiteral(red: 0.3882352941, green: 0.2823529412, blue: 0.1960784314, alpha: 1)) + case .gestures: + Color(#colorLiteral(red: 0.2352941176, green: 0.5568627451, blue: 0.5882352941, alpha: 1)) case .advanced: Color(#colorLiteral(red: 0.4823529412, green: 0.4745098039, blue: 0.6588235294, alpha: 1)) case .excludedApps: @@ -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] } diff --git a/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift b/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift index 2799521de..0242614b2 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") + .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,7 +182,7 @@ struct RadialMenuActionItemView: View { .frame(width: 400) } } - .luminareCornerRadius(24) + .luminareModalCornerRadius(24) .help("Customize this action's custom frame.") } @@ -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/RadialMenuConfigurationView.swift b/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift index 03affaab9..a74e70204 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 = [] @@ -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("Press \"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/Updater.swift b/Loop/Updater/Updater.swift index ee1b9d567..5b817b929 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] diff --git a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift index 77c8ba06a..770202293 100644 --- a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift +++ b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift @@ -58,15 +58,12 @@ final class ActiveEventMonitor: 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, but if we fail, just return the unprocessed event. - 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 + if eventType == .tapDisabledByTimeout { if observer.isEnabled { let tapRunLoop = EventTapThread.shared.runLoop CFRunLoopPerformBlock(tapRunLoop, CFRunLoopMode.commonModes as CFTypeRef) { @@ -74,18 +71,18 @@ final class ActiveEventMonitor: BaseEventTapMonitor { } CFRunLoopWakeUp(tapRunLoop) } - return Unmanaged.passUnretained(event) + return nil } - if event.type == .tapDisabledByUserInput { - // Explicitly disabled by the user/system, don't auto-restart - return Unmanaged.passUnretained(event) + if eventType == .tapDisabledByUserInput { + return nil } + guard unsafeBitCast(event, to: UnsafeRawPointer?.self) != nil else { return nil } return observer.handleEvent(event: event) } - let userInfo = Unmanaged.passUnretained(self).toOpaque() + let userInfo = Unmanaged.passRetained(self).toOpaque() if let eventTap = CGEvent.tapCreate( tap: tapLocation, @@ -98,6 +95,7 @@ final class ActiveEventMonitor: BaseEventTapMonitor { setupRunLoopSource(eventTap: eventTap, readableIdentifier: name) } else { log.info("Failed to create event tap") + Unmanaged.passUnretained(self).release() } } diff --git a/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift b/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift index 646cc85a0..a5388a8a5 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() { @@ -110,18 +120,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..001bbc2c4 100644 --- a/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift +++ b/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift @@ -31,15 +31,12 @@ 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 + if eventType == .tapDisabledByTimeout { if observer.isEnabled { let tapRunLoop = EventTapThread.shared.runLoop CFRunLoopPerformBlock(tapRunLoop, CFRunLoopMode.commonModes as CFTypeRef) { @@ -47,20 +44,19 @@ final class PassiveEventMonitor: BaseEventTapMonitor { } CFRunLoopWakeUp(tapRunLoop) } - return Unmanaged.passUnretained(event) + return nil } - if event.type == .tapDisabledByUserInput { - // Explicitly disabled by the user/system, don't auto-restart - return Unmanaged.passUnretained(event) + if eventType == .tapDisabledByUserInput { + 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 +69,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/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 fd1974ec4..d76a27771 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 } @@ -62,8 +74,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 } @@ -132,6 +145,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) } @@ -140,7 +157,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/CycleProgressStore.swift b/Loop/Window Management/Window Action/CycleProgressStore.swift index 7c251581e..ccad28dc6 100644 --- a/Loop/Window Management/Window Action/CycleProgressStore.swift +++ b/Loop/Window Management/Window Action/CycleProgressStore.swift @@ -160,6 +160,12 @@ struct CycleProgressStore { return Selection(action: children[index], index: index, key: key) } + // Coming from outside the cycle resumes where it was left, rather than restarting it + if let cursor = cursors[key], + let index = validatedIndex(for: cursor, in: children) { + return Selection(action: children[index], index: index, key: key) + } + return Selection(action: children[0], index: 0, key: key) } diff --git a/Loop/Window Management/Window Action/GestureBinding.swift b/Loop/Window Management/Window Action/GestureBinding.swift new file mode 100644 index 000000000..6b45d5b0e --- /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: magnify outward") + case .magnifyIn: String(localized: "Spread", comment: "Gesture kind: magnify inward") + } + } + + 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: "Titlebar Only", comment: "Gesture activation zone restricted to a window's titlebar") + 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. 'Magnify In', 'Swipe Up')." + ) + } + } + + 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.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.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/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/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/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 + ) + } +} From 0874439925f7b625b8831f3774e449eda9ec9999 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 22:01:06 -0600 Subject: [PATCH 02/13] =?UTF-8?q?=F0=9F=8C=90=20Update=20translations=20fr?= =?UTF-8?q?om=20Crowdin=20(#1161)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Crowdin Bot --- Loop/Localizable.xcstrings | 3135 +++++++++++++++-- .../Window Action/GestureBinding.swift | 6 +- 2 files changed, 2765 insertions(+), 376 deletions(-) diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index fbc5086db..b4b98fc23 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -297,7 +297,7 @@ "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,7 +309,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@ は %2$@(%3$@)でアップデートをインストールできませんでした。代わりにアプリケーションフォルダにインストールしますか?" + "value" : "%1$@は%2$@にアップデートをインストールできませんでした(%3$@)。代わりにアプリケーションフォルダにインストールしますか?" } }, "ko" : { @@ -386,7 +386,7 @@ "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 +398,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ はアプリケーションフォルダにありません。代わりにアプリケーションフォルダにアップデートをインストールしますか?" + "value" : "%@はアプリケーションフォルダにありません。代わりにアプリケーションフォルダにアップデートをインストールしますか?" } }, "ko" : { @@ -474,7 +474,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 +486,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ はウィンドウを中央より少し上に配置し、\n使いやすく感じることがあります。" + "value" : "%@はウインドウを中央よりやや上に配置するため、\nより使いやすく感じられる場合があります。" } }, "ko" : { @@ -622,18 +622,182 @@ } }, "%lld-finger %@" : { - "comment" : "Default title describing a gesture. First argument is the finger count, second is the gesture kind name (e.g. 'Magnify In', 'Swipe Up').", + "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" : "%1$lld-finger %2$@" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, "en" : { "stringUnit" : { - "state" : "new", + "state" : "translated", + "value" : "%1$lld-finger %2$@" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "%2$@ avec %1$lld doigts" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "%1$lld本指で%2$@" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "%1$lld-finger %2$@" + } + }, + "zh-Hans" : { + "stringUnit" : { + "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." + "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" : "%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" + } + } + } }, "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.", @@ -677,7 +841,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@は 1 つのウィンドウのみ追跡できます。複数をスタッシュ\nするには、別の%2$@アクションを追加してください。" + "value" : "1つの%1$@アクションで追跡できるウインドウは1つだけです。\n複数のウインドウをスタッシュするには、別の%2$@アクションを追加してください。" } }, "ko" : { @@ -754,7 +918,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Opacité de l’accent" + "value" : "Opacité de la couleur d’accentuation" } }, "it" : { @@ -766,7 +930,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "テーマカラー不透明度" + "value" : "アクセントカラーの不透明度" } }, "ko" : { @@ -842,7 +1006,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Accès à l'accessibilité" + "value" : "Accès d’accessibilité" } }, "it" : { @@ -854,7 +1018,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アクセシビリティアクセス" + "value" : "アクセシビリティのアクセス権" } }, "ko" : { @@ -930,7 +1094,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Veuillez accorder l'accès pour pouvoir redimensionner les fenêtres." + "value" : "Veuillez accorder l’accès pour pouvoir redimensionner les fenêtres." } }, "it" : { @@ -942,7 +1106,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウのサイズを変更できるようにするには、アクセスを許可してください。" + "value" : "ウインドウのサイズを変更できるようにするには、アクセスを許可してください。" } }, "ko" : { @@ -1018,7 +1182,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "%@ nécessite des autorisations d'accessibilité" + "value" : "%@ nécessite des autorisations d’accessibilité" } }, "it" : { @@ -1030,7 +1194,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ にはアクセシビリティの許可が必要です" + "value" : "%@にはアクセシビリティのアクセス権が必要です" } }, "ko" : { @@ -1167,7 +1331,7 @@ } }, "Add" : { - "comment" : "Button to add a new gesture", + "comment" : "Used to add items to a list", "localizations" : { "ar" : { "stringUnit" : { @@ -1285,7 +1449,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Autorisation de l'administrateur requise" + "value" : "Autorisation de l’administrateur requise" } }, "it" : { @@ -1563,7 +1727,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "常にサイクルを最初の項目から開始する" + "value" : "常にサイクルを最初の項目から開始" } }, "ko" : { @@ -1575,7 +1739,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Start Cycli altijd vanaf de eerste actie" + "value" : "Start posities altijd vanaf de eerste positie" } }, "pl" : { @@ -1651,7 +1815,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウサイズ変更のアニメーション" + "value" : "ウインドウサイズ変更のアニメーション" } }, "ko" : { @@ -1815,7 +1979,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vitesse d'animation" + "value" : "Vitesse d’animation" } }, "it" : { @@ -1827,7 +1991,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アニメーションの早さ" + "value" : "アニメーションの速さ" } }, "ko" : { @@ -1875,7 +2039,93 @@ } }, "Anywhere" : { - "comment" : "Gesture activation zone covers the entire window" + "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" + } + } + } }, "App icon is locked" : { "localizations" : { @@ -1906,7 +2156,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Verrouillé" + "value" : "Verrouillée" } }, "it" : { @@ -1994,7 +2244,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ajouter des marges" + "value" : "Appliquer des marges" } }, "it" : { @@ -2082,7 +2332,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" : { @@ -2094,7 +2344,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "中クリックトリガー遅延" + "value" : "中クリックにもトリガー遅延を適用" } }, "ko" : { @@ -2142,7 +2392,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" : { @@ -2183,7 +2433,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "自動的にアップデートをインストールする" + "value" : "自動的にアップデートをインストール" } }, "ko" : { @@ -2408,7 +2658,93 @@ } }, "Both" : { - "comment" : "Gesture category label: swipe and magnify gestures\nGesture kind: swipe and magnify gestures; opens the radial menu" + "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", @@ -2540,7 +2876,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "下部繰り返し" + "value" : "下側サイクル" } }, "ko" : { @@ -2617,7 +2953,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Moitié basse" + "value" : "Moitié inférieure" } }, "it" : { @@ -2896,7 +3232,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "下の画面" + "value" : "下のディスプレイ" } }, "ko" : { @@ -2973,7 +3309,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tiers bas" + "value" : "Tiers inférieur" } }, "it" : { @@ -3239,7 +3575,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" : { @@ -3251,7 +3587,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "デフォルトでは、Loop は各ウィンドウで最後にアクションを終了した位置から繰り返しを再開します。" + "value" : "デフォルトでは、Loopは各ウインドウで前回の続きからサイクルを再開します。" } }, "ko" : { @@ -3518,7 +3854,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "中央" + "value" : "中央に配置" } }, "ko" : { @@ -3694,7 +4030,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アップデートの確認..." + "value" : "アップデートを確認…" } }, "ko" : { @@ -3783,7 +4119,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アップデートの確認…" + "value" : "アップデートを確認…" } }, "ko" : { @@ -3871,7 +4207,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をクリア" + "value" : "キー設定を消去" } }, "ko" : { @@ -4126,7 +4462,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Options…" + "value" : "Configurer…" } }, "it" : { @@ -4138,7 +4474,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "設定…" + "value" : "構成…" } }, "ko" : { @@ -4186,7 +4522,93 @@ } }, "Continue the swipe or magnify gesture to step through cycle actions." : { - "comment" : "Section footer shown in settings" + "comment" : "Section footer shown in settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Poursuivez le balayage ou le zoom pour parcourir la séquence d’actions." + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "スワイプ/ピンチを続けると、サイクル内のアクションを順番に切り替えます。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Continue the swipe or magnify gesture to step through cycle actions." + } + } + } }, "Contributors on GitHub" : { "localizations" : { @@ -4229,7 +4651,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "GitHub の貢献者" + "value" : "GitHubの貢献者" } }, "ko" : { @@ -4750,7 +5172,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Personnalisé" + "value" : "Personnalisée" } }, "it" : { @@ -4839,7 +5261,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Personnalisez le cadre personnalisé de cette action." + "value" : "Personnalisez le cadre de cette action." } }, "it" : { @@ -4899,10 +5321,182 @@ } }, "Customize this gesture." : { - "comment" : "Help text shown when hovering a gesture configuration button" + "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" : "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" + "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." + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Customize this gesture's action." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture's action." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Personnalisez l’action de ce geste." + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Customize this gesture's action." + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "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" : { @@ -4933,7 +5527,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Personnalisez l'action de ce raccourci." + "value" : "Personnalisez l’action de ce raccourci." } }, "it" : { @@ -4945,7 +5539,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このキー設定の動作をカスタマイズします。" + "value" : "このキー設定のアクションをカスタマイズします。" } }, "ko" : { @@ -4994,7 +5588,92 @@ }, "Customize this radial menu action." : { "comment" : "A tooltip for the radial menu action customization button.", - "isCommentAutoGenerated" : true + "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" : "Help text on the cycle icon next to a gesture action that cycles", @@ -5038,7 +5717,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このアクションで繰り返す内容をカスタマイズします。" + "value" : "このアクションのサイクル内容をカスタマイズします。" } }, "ko" : { @@ -5127,7 +5806,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "繰り返し" + "value" : "サイクル" } }, "ko" : { @@ -5139,7 +5818,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cyclus" + "value" : "Positie" } }, "pl" : { @@ -5203,7 +5882,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Reculer dans le cycle avec Maj" + "value" : "Reculer dans la séquence avec Maj" } }, "it" : { @@ -5215,7 +5894,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Shift を押しながら逆方向に繰り返す" + "value" : "Shiftを押しながら逆方向にサイクル" } }, "ko" : { @@ -5227,7 +5906,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cyclus teruggaan met Shift" + "value" : "Positie teruggaan met shift" } }, "pl" : { @@ -5292,7 +5971,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Séquence" + "value" : "Séquences" } }, "it" : { @@ -5304,7 +5983,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "繰り返し" + "value" : "サイクル" } }, "ko" : { @@ -5619,7 +6298,93 @@ } }, "Direction" : { - "comment" : "Label for the swipe direction picker in the gesture configuration modal" + "comment" : "Label for the swipe direction picker in the gesture configuration modal", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Direction" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "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" + } + } + } }, "Disable cursor interaction" : { "localizations" : { @@ -5650,7 +6415,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Désactiver l'interaction du curseur" + "value" : "Désactiver l’interaction du curseur" } }, "it" : { @@ -5738,7 +6503,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Voulez-vous fusionner ou effacer les raccourcis existants ?" + "value" : "Voulez-vous fusionner ou effacer les raccourcis existants ?" } }, "it" : { @@ -5914,7 +6679,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Double-cliquez pour déclencher" + "value" : "Activer par double-clic" } }, "it" : { @@ -5974,7 +6739,93 @@ } }, "Down" : { - "comment" : "Swipe direction picker option: down" + "comment" : "Swipe direction picker option: down", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Down" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Bas" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "下" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Down" + } + } + } }, "Enable blur" : { "comment" : "Text for enabling the blur effect on the preview.", @@ -6006,7 +6857,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Flou activé" + "value" : "Activer le flou" } }, "it" : { @@ -6018,7 +6869,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ぼかし" + "value" : "ぼかしを有効化" } }, "ko" : { @@ -6066,7 +6917,93 @@ } }, "Enable trackpad gestures" : { - "comment" : "Toggle in gestures settings" + "comment" : "Toggle in gestures settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Enable trackpad gestures" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Activer les gestes du trackpad" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "トラックパッドジェスチャを有効化" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Enable trackpad gestures" + } + } + } }, "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.", @@ -6110,7 +7047,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウスナップを有効化" + "value" : "ウインドウスナップを有効化" } }, "ko" : { @@ -6374,7 +7311,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "エクスポート" + "value" : "書き出す" } }, "ko" : { @@ -6462,7 +7399,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をエクスポート" + "value" : "キー設定を書き出す" } }, "ko" : { @@ -6539,7 +7476,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Bar externe" + "value" : "Barre externe" } }, "it" : { @@ -6640,7 +7577,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "紐付けキー設定を解決できません" + "value" : "リンクされたキー設定が見つかりません" } }, "ko" : { @@ -6777,7 +7714,93 @@ } }, "Fingers" : { - "comment" : "Label for the finger-count stepper in the gesture configuration popover" + "comment" : "Label for the finger-count stepper in the gesture configuration popover", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fingers" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Doigts" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "指の本数" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Fingers" + } + } + } }, "First Fourth" : { "comment" : "Window action", @@ -6809,7 +7832,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Premier quatrième" + "value" : "Premier quart" } }, "it" : { @@ -7254,7 +8277,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Focaliser sur la pile suivante" + "value" : "Focaliser la fenêtre suivante de la pile" } }, "it" : { @@ -7343,7 +8366,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Focaliser vers la droit" + "value" : "Focaliser vers la droite" } }, "it" : { @@ -7532,7 +8555,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "リサイズ時にウインドウをフォーカス" + "value" : "サイズ変更時にウインドウをフォーカス" } }, "ko" : { @@ -7609,7 +8632,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quatrième quatrième" + "value" : "Quatrième quart" } }, "it" : { @@ -7710,7 +8733,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "全画面" + "value" : "フルスクリーン" } }, "ko" : { @@ -7847,10 +8870,182 @@ } }, "Gesture" : { - "comment" : "Label for the magnify gesture picker in the gesture configuration modal" + "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" + "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", @@ -7882,7 +9077,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser" + "value" : "Revenir" } }, "it" : { @@ -8528,7 +9723,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Top Groeien" + "value" : "Boven groeien" } }, "pl" : { @@ -8770,7 +9965,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Retour haptique" + "value" : "Retour tactile" } }, "it" : { @@ -8782,7 +9977,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ハプティックフィードバック" + "value" : "触覚フィードバック" } }, "ko" : { @@ -8947,7 +10142,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Cacher" + "value" : "Masquer" } }, "it" : { @@ -9035,7 +10230,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Masquer l’icône de la barre de menu" + "value" : "Masquer l’icône de la barre des menus" } }, "it" : { @@ -9124,7 +10319,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" : { @@ -9391,7 +10586,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quatrièmes horizontaux" + "value" : "Quarts horizontaux" } }, "it" : { @@ -9480,7 +10675,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tiers horizontal" + "value" : "Tiers horizontaux" } }, "it" : { @@ -9920,7 +11115,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Developpeur" + "value" : "Développeur" } }, "it" : { @@ -10196,7 +11391,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop マスター" + "value" : "Loopマスター" } }, "ko" : { @@ -10800,7 +11995,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous serez désormais averti lorsque vous débloquez une nouvelle icône." + "value" : "Vous serez désormais averti lorsque vous débloquerez une nouvelle icône." } }, "it" : { @@ -10889,7 +12084,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez débloqué une nouvelle icône : %@ !" + "value" : "Vous avez débloqué une nouvelle icône : %@ !" } }, "it" : { @@ -10978,7 +12173,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" : { @@ -10990,7 +12185,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "すでに25回も Loop しました!ご褒美として、新しいアイコン「%@」をプレゼント!さらに Loop して、新しいアイコンをアンロックしましょう!" + "value" : "すでに25回もLoopしました!ご褒美として、新しいアイコン「%@」をプレゼント!さらにLoopして、新しいアイコンをアンロックしましょう!" } }, "ko" : { @@ -11067,7 +12262,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" : { @@ -11079,7 +12274,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "5000回の Loop を達成!宇宙が Loop マスターの誕生を見守りました!偉業にふさわしいご褒美、新しいアイコンをどうぞ!" + "value" : "5000回のLoopを達成!宇宙がLoopマスターの誕生を見守りました!偉業にふさわしいご褒美、新しいアイコンをどうぞ!" } }, "ko" : { @@ -11255,7 +12450,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "インポート" + "value" : "読み込む" } }, "ko" : { @@ -11331,7 +12526,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Importer des raccourcis" + "value" : "Importer les raccourcis" } }, "it" : { @@ -11343,7 +12538,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をインポート" + "value" : "キー設定を読み込む" } }, "ko" : { @@ -11607,7 +12802,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "結合する" + "value" : "結合" } }, "ko" : { @@ -11772,7 +12967,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Dimensions initiales" + "value" : "Cadre initial" } }, "it" : { @@ -11960,7 +13155,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "設置" + "value" : "インストール" } }, "ko" : { @@ -12481,7 +13676,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Garder dans l'emplacement actuel" + "value" : "Laisser à l’emplacement actuel" } }, "it" : { @@ -12659,7 +13854,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Agrandir" + "value" : "Plus grand" } }, "it" : { @@ -12671,7 +13866,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "広げる" + "value" : "大きくする" } }, "ko" : { @@ -12748,7 +13943,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Agrandir proportionnellement" + "value" : "Plus grand (proportionnel)" } }, "it" : { @@ -12760,7 +13955,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "拡大する" + "value" : "比率を保って大きくする" } }, "ko" : { @@ -12836,7 +14031,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Lancer au démarrage" + "value" : "Ouvrir avec la session" } }, "it" : { @@ -13025,7 +14220,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左部繰り返し" + "value" : "左側サイクル" } }, "ko" : { @@ -13203,7 +14398,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左の画面" + "value" : "左のディスプレイ" } }, "ko" : { @@ -13458,7 +14653,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deux tiers gauches" + "value" : "Deux tiers à gauche" } }, "it" : { @@ -13559,7 +14754,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "左クリックで繰り返しを順番に切り替えます。" + "value" : "左クリックでサイクル内のアクションを順番に切り替えます。" } }, "ko" : { @@ -13812,7 +15007,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous ne l'avez pas encore !" + "value" : "Vous ne l’avez pas encore !" } }, "it" : { @@ -13900,7 +15095,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" : { @@ -13988,7 +15183,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" : { @@ -14012,7 +15207,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Zwanst na nie!" + "value" : "Geduld is een deugd, en jouw sleutel tot dit icoon." } }, "pl" : { @@ -14076,7 +15271,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" : { @@ -14176,7 +15371,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を続ければ、このアイコンもすぐに手に入るよ。" + "value" : "Loopを続ければ、このアイコンもすぐに手に入るよ。" } }, "ko" : { @@ -14252,7 +15447,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" : { @@ -14340,7 +15535,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" : { @@ -14428,7 +15623,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" : { @@ -14516,7 +15711,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" : { @@ -14528,7 +15723,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このアイコンをアンロックするには、時間と Loop が必要なだけ。" + "value" : "このアイコンをアンロックするには、時間とLoopが必要なだけ。" } }, "ko" : { @@ -14780,7 +15975,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" : { @@ -14956,7 +16151,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" : { @@ -15132,7 +16327,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" : { @@ -15220,7 +16415,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" : { @@ -15232,7 +16427,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "千の Loop の旅も、最初の一歩から始まる。" + "value" : "千のLoopの旅も、最初の一歩から始まる。" } }, "ko" : { @@ -15320,7 +16515,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop の一つ一つが、待つ宝物に近づけてくれる。" + "value" : "Loopのひとつひとつが、待っている宝物へと君を近づける。" } }, "ko" : { @@ -15408,7 +16603,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を重ねるたびに、このアイコンのロックは緩んでいく。" + "value" : "Loopを重ねるたびに、このアイコンのロックは緩んでいく。" } }, "ko" : { @@ -15496,7 +16691,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を重ねるごとに、君の努力が成功への鍵を刻む。" + "value" : "Loopを重ねるごとに、君の努力が成功への鍵を刻む。" } }, "ko" : { @@ -15572,7 +16767,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" : { @@ -15584,7 +16779,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アイコンはただアンロックされるだけじゃない、Loop ごとに勝ち取るものだ。" + "value" : "アイコンはただアンロックされるだけじゃない、Loopごとに勝ち取るものだ。" } }, "ko" : { @@ -15672,7 +16867,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop が積み重なると同時に、君のアイコンコレクションも増えていく。" + "value" : "Loopが積み重なると同時に、君のアイコンコレクションも増えていく。" } }, "ko" : { @@ -15836,7 +17031,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" : { @@ -15848,7 +17043,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を続ける君の粘りが、すべてのアイコンのマスターキーだ。" + "value" : "Loopを続ける君の粘りが、すべてのアイコンのマスターキーだ。" } }, "ko" : { @@ -15924,7 +17119,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" : { @@ -15936,7 +17131,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "障害を Loop しろ、君の報酬はその先にある。" + "value" : "障害はLoopでかわせ。報酬はその先にある。" } }, "ko" : { @@ -16024,7 +17219,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を重ねるたびに、アイコンが育つ種をまいているんだよ。" + "value" : "Loopを重ねるたびに、アイコンが育つ種をまいているんだよ。" } }, "ko" : { @@ -16112,7 +17307,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "月の満ち欠けのように、君のアイコンは Loop の周期ごとに姿を現す。" + "value" : "月の満ち欠けのように、君のアイコンはLoopの周期ごとに姿を現す。" } }, "ko" : { @@ -16200,7 +17395,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アイコンは待っている、まだ踏まれていない Loop のヴェールの向こうに。" + "value" : "アイコンは待っている、まだ見ぬLoopのヴェールの向こうに。" } }, "ko" : { @@ -16387,7 +17582,7 @@ "other" : { "stringUnit" : { "state" : "translated", - "value" : "残り %lld 回の Loop" + "value" : "残り%lld回の Loop" } } } @@ -16569,7 +17764,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS 中央" + "value" : "macOSの中央に配置" } }, "ko" : { @@ -16645,7 +17840,7 @@ "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" : { @@ -16657,7 +17852,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS の “ウインドウを画面端にドラッグしてタイル配置” 機能が\n現在有効になっており、Loop のウインドウスナップ機能と競合します。" + "value" : "macOSの「ウインドウを画面の端にドラッグしてタイル表示」機能が\n現在有効になっており、Loopのウインドウスナップ機能と競合します。" } }, "ko" : { @@ -16705,7 +17900,93 @@ } }, "Magnify" : { - "comment" : "Gesture category label: 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" + } + } + } }, "Maximize" : { "comment" : "Window action", @@ -16826,7 +18107,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Hauteur max" + "value" : "Maximiser la hauteur" } }, "it" : { @@ -16915,7 +18196,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Largeur max" + "value" : "Maximiser la largeur" } }, "it" : { @@ -17003,7 +18284,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Clic central pour activer" + "value" : "Activer par clic central" } }, "it" : { @@ -17104,7 +18385,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "最小化" + "value" : "しまう" } }, "ko" : { @@ -17193,7 +18474,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "他を最小化" + "value" : "ほかをしまう" } }, "ko" : { @@ -17205,7 +18486,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Andere minimaliseren" + "value" : "Anderen minimaliseren" } }, "pl" : { @@ -17625,7 +18906,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déplacer à droite" + "value" : "Déplacer à gauche" } }, "it" : { @@ -17803,7 +19084,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Déplacer vers le dossier Applications ?" + "value" : "Déplacer vers le dossier Applications ?" } }, "it" : { @@ -17892,13 +19173,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" : { @@ -17915,8 +19196,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Desktop %lld" + "state" : "translated", + "value" : "Verplaatsen naar Bureaublad %lld" } }, "pl" : { @@ -17981,19 +19262,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" : { @@ -18004,8 +19285,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Next Space" + "state" : "translated", + "value" : "Verplaatsen naar volgende Space" } }, "pl" : { @@ -18070,19 +19351,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" : { @@ -18093,8 +19374,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Move to Previous Space" + "state" : "translated", + "value" : "Verplaatsen naar vorige Space" } }, "pl" : { @@ -18259,7 +19540,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソルの画面にウインドウを移動" + "value" : "カーソルのあるディスプレイにウインドウを移動" } }, "ko" : { @@ -18348,7 +19629,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "次の画面" + "value" : "次のディスプレイ" } }, "ko" : { @@ -18425,7 +19706,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas d'action" + "value" : "Aucune action" } }, "it" : { @@ -18437,7 +19718,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "動作なし" + "value" : "アクションなし" } }, "ko" : { @@ -18513,7 +19794,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas d'applications ignorées" + "value" : "Aucune application ignorée" } }, "it" : { @@ -18573,7 +19854,93 @@ } }, "No gestures" : { - "comment" : "Empty state title in gestures settings" + "comment" : "Empty state title in gestures settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No gestures" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aucun geste" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ジェスチャはありません" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "No gestures" + } + } + } }, "No keybinds" : { "localizations" : { @@ -18604,7 +19971,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de raccourcis" + "value" : "Aucun raccourci" } }, "it" : { @@ -18693,7 +20060,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Aucun raccourci clavier n'a été défini" + "value" : "Aucun raccourci n’a été défini" } }, "it" : { @@ -18782,7 +20149,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas d’actions du menu radial" + "value" : "Aucune action du menu radial" } }, "it" : { @@ -18870,7 +20237,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" : { @@ -18958,7 +20325,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" : { @@ -18982,7 +20349,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Deze app is actueler dan mijn dagboekaantekeningen!" } }, "pl" : { @@ -19046,7 +20413,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ciel dégagé : aucune mise à jour à l’horizon !" + "value" : "Ciel dégagé : aucune mise à jour à l’horizon !" } }, "it" : { @@ -19070,7 +20437,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Je kunt gerust zijn, geen updates te zien in de pijplijn!" } }, "pl" : { @@ -19134,7 +20501,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" : { @@ -19234,7 +20601,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop をなめると痛い目に遭うぞ。" + "value" : "Loopをなめると痛い目に遭うぞ。" } }, "ko" : { @@ -19310,7 +20677,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" : { @@ -19334,7 +20701,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Nieuwe versie? Sorry, we zijn te gehecht aan deze." } }, "pl" : { @@ -19410,7 +20777,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop 更新?笑止千万。" + "value" : "Loop更新?笑止千万。" } }, "ko" : { @@ -19574,7 +20941,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" : { @@ -19598,7 +20965,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "In een sterrenstelsel hier ver ver vandaan.. nog steeds geen updates!" } }, "pl" : { @@ -19662,7 +21029,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" : { @@ -19674,7 +21041,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を舐めるな。" + "value" : "Loopを舐めるな。" } }, "ko" : { @@ -19686,7 +21053,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" : { @@ -19750,7 +21117,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "À vitesse lumière… aucune mise à jour en vue !" + "value" : "À vitesse lumière… aucune mise à jour en vue !" } }, "it" : { @@ -19838,7 +21205,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" : { @@ -19926,7 +21293,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "On a égaré le bouton “Mettre à jour”. Oups !" + "value" : "On a égaré le bouton « Mettre à jour ». Oups !" } }, "it" : { @@ -19938,7 +21305,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アップデート”ボタンを紛失しました。おっと!" + "value" : "「アップデート」ボタンを紛失しました。おっと!" } }, "ko" : { @@ -20014,7 +21381,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" : { @@ -20114,7 +21481,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "1日1個のリンゴが…アップデートを遠ざける。" + "value" : "1日1個のリンゴが…アップデートを遠ざける。" } }, "ko" : { @@ -20190,7 +21557,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" : { @@ -20278,7 +21645,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "La Force est puissante avec cette version !" + "value" : "La Force est puissante avec cette version !" } }, "it" : { @@ -20554,7 +21921,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 甘い夢は作られる…アップデートなしで。" + "value" : "甘い夢は作られる…アップデートなしで。" } }, "ko" : { @@ -20642,7 +22009,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を更新する?甘く見ないで。" + "value" : "Loopを更新する?甘く見ないで。" } }, "ko" : { @@ -20718,7 +22085,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Restez vigilant, d’autres infos arrivent bientôt !" + "value" : "Restez vigilant, d’autres infos arrivent bientôt !" } }, "it" : { @@ -20730,7 +22097,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 鋭くあれ、さらなる情報はすぐ来る!" + "value" : "油断するな、新情報はまもなく届く!" } }, "ko" : { @@ -20742,7 +22109,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Blijf scherp, er komt binnenkort meer informatie!" } }, "pl" : { @@ -20806,7 +22173,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" : { @@ -20818,7 +22185,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 君は最新テックをクルーズ中!" + "value" : "最新テクノロジーで快適にクルーズ中!" } }, "ko" : { @@ -20830,7 +22197,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "Je draait op de nieuwste technologie!" } }, "pl" : { @@ -20906,7 +22273,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 我々は戻って来る。アップデートと共に…後で。" + "value" : "我々は戻って来る。アップデートと共に…後で。" } }, "ko" : { @@ -20918,7 +22285,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "-" + "value" : "We komen terug.. met updates.. later" } }, "pl" : { @@ -20982,7 +22349,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Un sou pour ton… absence de mises à jour." + "value" : "Un sou pour votre… absence de mises à jour." } }, "it" : { @@ -20994,7 +22361,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop 更新の道は、果てしなく険しい。" + "value" : "Loop更新の道は、果てしなく険しい。" } }, "ko" : { @@ -21070,7 +22437,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" : { @@ -21082,7 +22449,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "君はもう最高の Loop を手にしてる!" + "value" : "君はもう最高のLoopを手にしてる!" } }, "ko" : { @@ -21170,7 +22537,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop を更新するのは、富士山に登るより難しい。" + "value" : "Loopを更新するのは、富士山に登るより難しい。" } }, "ko" : { @@ -21334,7 +22701,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" : { @@ -21346,7 +22713,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "石の上にも三年… Loop 更新にはまだ早い。" + "value" : "石の上にも三年…Loop更新にはまだ早い。" } }, "ko" : { @@ -21434,7 +22801,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "99の問題があったとしても、アップデートはその1つじゃない。" + "value" : "99の問題があったとしても、アップデートはその1つじゃない。" } }, "ko" : { @@ -21598,7 +22965,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez atteint le niveau max !" + "value" : "Vous avez atteint le niveau max !" } }, "it" : { @@ -21874,7 +23241,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : " 新たな情報なし、司令官。" + "value" : "新たな情報なし、司令官。" } }, "ko" : { @@ -21950,7 +23317,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de mises à jour ? Nom de Zeus !" + "value" : "Pas de mise à jour ? Nom de Zeus !" } }, "it" : { @@ -22038,7 +23405,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de mise à jour, Mr Anderson" + "value" : "Pas de mise à jour, monsieur Anderson" } }, "it" : { @@ -22126,7 +23493,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Pas de mises à jour à Ba Sing Se" + "value" : "Pas de mise à jour à Ba Sing Se" } }, "it" : { @@ -22214,7 +23581,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Des mises à jour ? Avec la conjoncture actuelle ?" + "value" : "Des mises à jour ? Avec la conjoncture actuelle ?" } }, "it" : { @@ -22302,7 +23669,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Revenez plus tard !" + "value" : "Revenez plus tard !" } }, "it" : { @@ -22390,7 +23757,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Loop fonctionne à plein régime !" + "value" : "Loop fonctionne à plein régime !" } }, "it" : { @@ -22402,7 +23769,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop は全盛期だ!" + "value" : "Loopは全盛期だ!" } }, "ko" : { @@ -22478,7 +23845,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tous les systèmes sont opérationnels !" + "value" : "Tous les systèmes sont opérationnels !" } }, "it" : { @@ -22566,7 +23933,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous êtes à jour :)" + "value" : "Vous êtes à jour :)" } }, "it" : { @@ -22654,7 +24021,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Aucune mise à jour pour le moment !" + "value" : "Aucune mise à jour pour le moment !" } }, "it" : { @@ -22830,7 +24197,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "La séquence est vide" + "value" : "Aucun élément dans la séquence" } }, "it" : { @@ -22842,7 +24209,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "繰り返す項目はありません" + "value" : "サイクルする項目はありません" } }, "ko" : { @@ -22930,7 +24297,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ の通知権限は現在無効になっています。" + "value" : "%@の通知は現在許可されていません。" } }, "ko" : { @@ -23006,7 +24373,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ouvrir les réglages" + "value" : "Ouvrir Réglages Système" } }, "it" : { @@ -23094,7 +24461,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Activez-les dans les réglages système." + "value" : "Activez-les dans Réglages Système." } }, "it" : { @@ -23194,7 +24561,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "新しいアイコンを解除したときに通知" + "value" : "新しいアイコンをアンロックしたときに通知" } }, "ko" : { @@ -23447,7 +24814,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Marge" + "value" : "Marges" } }, "it" : { @@ -23536,7 +24903,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Taille d’aperçu" + "value" : "Taille de la partie visible" } }, "it" : { @@ -23548,7 +24915,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "覗きサイズ" + "value" : "表示部分のサイズ" } }, "ko" : { @@ -23625,7 +24992,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Permissions" + "value" : "Autorisations" } }, "it" : { @@ -23637,7 +25004,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "権限" + "value" : "アクセス権" } }, "ko" : { @@ -23685,7 +25052,93 @@ } }, "Pinch" : { - "comment" : "Gesture kind: magnify outward\nMagnify gesture picker option: pinch" + "comment" : "Gesture kind: pinch (fingers move together, zooming out)\nMagnify gesture picker option: pinch", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pinch" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pincer" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "ピンチイン" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Pinch" + } + } + } }, "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.", @@ -23893,7 +25346,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Conserver les dimensions" + "value" : "Conserver la taille" } }, "it" : { @@ -23981,7 +25434,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter un élément à la séquence." + "value" : "Appuyez sur « Ajouter » pour ajouter un élément à la séquence" } }, "it" : { @@ -23993,7 +25446,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "「追加」を押すと、新しい繰り返し項目を追加できます。" + "value" : "「追加」を押すと、新しいサイクル項目を追加できます。" } }, "ko" : { @@ -24041,7 +25494,93 @@ } }, "Press \"Add\" to add a gesture" : { - "comment" : "Empty state subtitle in gestures settings" + "comment" : "Empty state subtitle in gestures settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Press \"Add\" to add a gesture" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Appuyez sur « Ajouter » pour ajouter un geste" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "「追加」を押すと、新しいジェスチャを追加できます。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Press \"Add\" to add a gesture" + } + } + } }, "Press \"Add\" to add a keybind" : { "localizations" : { @@ -24072,7 +25611,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter un raccourci" + "value" : "Appuyez sur « Ajouter » pour ajouter un raccourci" } }, "it" : { @@ -24161,7 +25700,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter une action" + "value" : "Appuyez sur « Ajouter » pour ajouter une action" } }, "it" : { @@ -24249,7 +25788,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appuyez sur \"Ajouter\" pour ajouter une application" + "value" : "Appuyez sur « Ajouter » pour ajouter une application" } }, "it" : { @@ -24438,7 +25977,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "前の画面" + "value" : "前のディスプレイ" } }, "ko" : { @@ -24527,7 +26066,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "選択中のウィンドウのコーナーの丸みを優先する" + "value" : "選択中のウインドウのコーナーの丸みを優先" } }, "ko" : { @@ -24693,7 +26232,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quart" + "value" : "Quarts" } }, "it" : { @@ -24794,7 +26333,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ を終了" + "value" : "%@を終了" } }, "ko" : { @@ -24959,7 +26498,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Menu Radial" + "value" : "Menu radial" } }, "it" : { @@ -25060,7 +26599,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "再起動して反映" + "value" : "再度開いて完了" } }, "ko" : { @@ -25237,7 +26776,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "後で通知する" + "value" : "あとで通知" } }, "ko" : { @@ -25285,7 +26824,7 @@ } }, "Remove" : { - "comment" : "Button to remove selected gestures", + "comment" : "Used to remove items from a list", "localizations" : { "ar" : { "stringUnit" : { @@ -25403,7 +26942,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Autoriser" + "value" : "Demander l’accès…" } }, "it" : { @@ -25415,7 +26954,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "許可を求める…" + "value" : "アクセス権を要求…" } }, "ko" : { @@ -25580,7 +27119,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser les raccourcis ?" + "value" : "Réinitialiser les raccourcis ?" } }, "it" : { @@ -25592,7 +27131,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定をリセット" + "value" : "キー設定をリセットしますか?" } }, "ko" : { @@ -25757,7 +27296,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réinitialiser les actions du menu radial ?" + "value" : "Réinitialiser les actions du menu radial ?" } }, "it" : { @@ -25769,7 +27308,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "円形メニューのアクションをリセット" + "value" : "円形メニューのアクションをリセットしますか?" } }, "ko" : { @@ -25857,7 +27396,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソル下のウインドウをリサイズ" + "value" : "カーソル下のウインドウのサイズを変更" } }, "ko" : { @@ -25933,7 +27472,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Gérer la compatibilité avec Stage Manage" + "value" : "Respecter Stage Manager" } }, "it" : { @@ -25945,7 +27484,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Stage Manager を尊重" + "value" : "ステージマネージャを考慮" } }, "ko" : { @@ -26033,7 +27572,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ドラッグ時にウインドウ枠を復元" + "value" : "ドラッグ時にウインドウのサイズを復元" } }, "ko" : { @@ -26110,7 +27649,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Droit" + "value" : "Droite" } }, "it" : { @@ -26210,7 +27749,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "右部繰り返し" + "value" : "右側サイクル" } }, "ko" : { @@ -26376,7 +27915,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Écran droit" + "value" : "Écran de droite" } }, "it" : { @@ -26388,7 +27927,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "右の画面" + "value" : "右のディスプレイ" } }, "ko" : { @@ -26643,7 +28182,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deux tiers droits" + "value" : "Deux tiers à droite" } }, "it" : { @@ -26821,7 +28360,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Changement d'écran" + "value" : "Changement d’écran" } }, "it" : { @@ -26833,7 +28372,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "画面移動" + "value" : "ディスプレイ移動" } }, "ko" : { @@ -26998,7 +28537,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Deuxième quatrième" + "value" : "Deuxième quart" } }, "it" : { @@ -27022,7 +28561,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Tweede kwartier" + "value" : "Tweede kwart" } }, "pl" : { @@ -27174,7 +28713,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Envoyer un feedback" + "value" : "Envoyer des commentaires" } }, "it" : { @@ -27186,7 +28725,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ご意見を送る" + "value" : "フィードバックを送信" } }, "ko" : { @@ -27262,7 +28801,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Attribuer une touche d’activation" + "value" : "Attribuer une touche d’activation…" } }, "it" : { @@ -27528,7 +29067,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "À Propos" + "value" : "À propos" } }, "it" : { @@ -27540,7 +29079,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "概要" + "value" : "情報" } }, "ko" : { @@ -27616,7 +29155,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Couleur d'accentuation" + "value" : "Couleur d’accentuation" } }, "it" : { @@ -27628,7 +29167,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "テーマカラー" + "value" : "アクセントカラー" } }, "ko" : { @@ -27716,7 +29255,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "詳細設定" + "value" : "詳細" } }, "ko" : { @@ -27941,12 +29480,88 @@ }, "Settings tab: Gestures" : { "comment" : "Title of the gestures settings tab.", - "extractionState" : "extracted_with_value", - "isCommentAutoGenerated" : true, "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Gestures" + } + }, "en" : { "stringUnit" : { - "state" : "new", + "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" } } @@ -28245,7 +29860,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Menu Radial" + "value" : "Menu radial" } }, "it" : { @@ -28421,7 +30036,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" : { @@ -28433,7 +30048,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "GitHub ページでフィードバックを共有してください。バグの報告や機能の提案、その他の貴重なご意見をお寄せいただけます。また、Loop があなたの作業効率を向上させたと感じた場合は、寄付も受け付けています (•‿•)" + "value" : "GitHubページでフィードバックを共有してください。バグの報告や機能の提案、その他の貴重なご意見をお寄せいただけます。また、Loopがあなたの作業効率を向上させたと感じた場合は、寄付も受け付けています (•‿•)" } }, "ko" : { @@ -28509,7 +30124,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Changer le focus lors de l’aperçu" + "value" : "Changer le focus lors de la mise de côté" } }, "it" : { @@ -28597,7 +30212,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Afficher dans le dock" + "value" : "Afficher dans le Dock" } }, "it" : { @@ -28609,7 +30224,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Dock に表示" + "value" : "Dockに表示" } }, "ko" : { @@ -28685,7 +30300,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Afficher un aperçu pendant l'utilisation" + "value" : "Afficher un aperçu pendant l’utilisation" } }, "it" : { @@ -28697,7 +30312,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop 中にプレビューを表示" + "value" : "Loop中にプレビューを表示" } }, "ko" : { @@ -29750,7 +31365,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réduire" + "value" : "Plus petit" } }, "it" : { @@ -29762,7 +31377,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "狭める" + "value" : "小さくする" } }, "ko" : { @@ -29839,7 +31454,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Réduire proportionnellement" + "value" : "Plus petit (proportionnel)" } }, "it" : { @@ -29851,7 +31466,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "縮小する" + "value" : "比率を保って小さくする" } }, "ko" : { @@ -30106,19 +31721,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" : { @@ -30129,8 +31744,8 @@ }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Space Switching" + "state" : "translated", + "value" : "Space wisseling" } }, "pl" : { @@ -30166,7 +31781,93 @@ } }, "Spread" : { - "comment" : "Gesture kind: magnify inward\nMagnify gesture picker option: 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", @@ -30286,7 +31987,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Taille de la bande du Stage Manager" + "value" : "Taille de la bande de Stage Manager" } }, "it" : { @@ -30552,7 +32253,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Supporte les effets Liquid Glass de macOS Tahoe" + "value" : "Prend en charge les effets Liquid Glass de macOS Tahoe" } }, "it" : { @@ -30564,7 +32265,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS Tahoe の Liquid Glass 効果に対応" + "value" : "macOS TahoeのLiquid Glass効果に対応" } }, "ko" : { @@ -30641,7 +32342,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Supprimer la Mission Control" + "value" : "Bloquer Mission Control" } }, "it" : { @@ -30653,7 +32354,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Mission Control を抑制" + "value" : "Mission Controlを抑制" } }, "ko" : { @@ -30701,19 +32402,449 @@ } }, "Swipe" : { - "comment" : "Gesture category label: swipe" + "comment" : "Gesture category label: swipe", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Swipe" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Balayer" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "スワイプ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe" + } + } + } }, "Swipe Down" : { - "comment" : "Gesture kind: directional swipe" + "comment" : "Gesture kind: directional swipe", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Swipe Down" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Balayer vers le bas" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "下にスワイプ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Down" + } + } + } }, "Swipe Left" : { - "comment" : "Gesture kind: directional swipe" + "comment" : "Gesture kind: directional swipe", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Swipe Left" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Balayer vers la gauche" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "左にスワイプ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Left" + } + } + } }, "Swipe Right" : { - "comment" : "Gesture kind: directional swipe" + "comment" : "Gesture kind: directional swipe", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Swipe Right" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Balayer vers la droite" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "右にスワイプ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Swipe Right" + } + } + } }, "Swipe Up" : { - "comment" : "Gesture kind: directional swipe" + "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" : "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" + } + } + } }, "Sync Wallpaper" : { "localizations" : { @@ -30744,7 +32875,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Synchroniser avec le fond d'écran" + "value" : "Synchroniser avec le fond d’écran" } }, "it" : { @@ -30921,7 +33052,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Ce raccourci est déjà utilisé par %@" + "value" : "Ce raccourci est déjà utilisé par %@." } }, "it" : { @@ -30933,7 +33064,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "そのキー設定はすでに %@ が使用しています。" + "value" : "そのキー設定は、%@ですでに使われています。" } }, "ko" : { @@ -31245,7 +33376,93 @@ } }, "There are other gestures that conflict with this gesture." : { - "comment" : "Tooltip shown on a conflicting gesture in settings" + "comment" : "Tooltip shown on a conflicting gesture in settings", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ce geste entre en conflit avec d’autres gestes." + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "このジェスチャと競合する他のジェスチャがあります。" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "There are other gestures that conflict with this gesture." + } + } + } }, "There are other keybinds that conflict with this key combination." : { "localizations" : { @@ -31453,7 +33670,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Troisième quatrième" + "value" : "Troisième quart" } }, "it" : { @@ -31477,7 +33694,7 @@ "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Derde kwartier" + "value" : "Derde kwart" } }, "pl" : { @@ -31554,7 +33771,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このアクションはキー設定に紐付けられています。このアクションを変更すると、両方に影響します。" + "value" : "このアクションはキー設定にリンクされています。このアクションを変更すると、両方に影響します。" } }, "ko" : { @@ -31602,7 +33819,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" : { @@ -31643,7 +33860,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "この macOS バージョンへのサポートは終了しました。" + "value" : "このmacOSバージョンへのサポートは終了しました。" } }, "ko" : { @@ -31720,7 +33937,7 @@ "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" : { @@ -31809,7 +34026,7 @@ "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" : { @@ -31869,7 +34086,93 @@ } }, "Titlebar Only" : { - "comment" : "Gesture activation zone restricted to a window's titlebar" + "comment" : "Gesture activation zone restricted to a window's titlebar", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Titlebar Only" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Barre de titre uniquement" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "タイトルバーのみ" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Titlebar Only" + } + } + } }, "To save power, window animations are\nunavailable in Low Power Mode." : { "localizations" : { @@ -31900,7 +34203,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" : { @@ -31912,7 +34215,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "省エネルギーモードでは、ウインドウの\nアニメーションは無効になります。" + "value" : "低電力モードでは、ウインドウの\nアニメーションは無効になります。" } }, "ko" : { @@ -32089,7 +34392,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "上部繰り返し" + "value" : "上側サイクル" } }, "ko" : { @@ -32166,7 +34469,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Moitié haute" + "value" : "Moitié supérieure" } }, "it" : { @@ -32445,7 +34748,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "上の画面" + "value" : "上のディスプレイ" } }, "ko" : { @@ -32522,7 +34825,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Tiers haut" + "value" : "Tiers supérieur" } }, "it" : { @@ -32788,7 +35091,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Délai d'activation" + "value" : "Délai d’activation" } }, "it" : { @@ -32877,7 +35180,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Touche d'activation" + "value" : "Touche d’activation" } }, "it" : { @@ -32978,7 +35281,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "後で試す" + "value" : "あとで再試行" } }, "ko" : { @@ -33067,7 +35370,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "元に戻す" + "value" : "取り消す" } }, "ko" : { @@ -33156,7 +35459,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "トリガーキーのリンク解除" + "value" : "トリガーキーのリンクを解除" } }, "ko" : { @@ -33321,7 +35624,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Taille récupérée" + "value" : "Taille une fois récupérée" } }, "it" : { @@ -33333,7 +35636,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "スタッシュ非表示時のサイズ" + "value" : "スタッシュ解除時のサイズ" } }, "ko" : { @@ -33381,7 +35684,93 @@ } }, "Up" : { - "comment" : "Swipe direction picker option: up" + "comment" : "Swipe direction picker option: up", + "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "de" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Up" + } + }, + "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Haut" + } + }, + "it" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "上" + } + }, + "ko" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "pl" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "ru" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Up" + } + } + } }, "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.", @@ -33413,7 +35802,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Version actuelle : %@" + "value" : "Version actuelle : %@" } }, "it" : { @@ -33502,7 +35891,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Mise à jour…" + "value" : "Mettre à jour…" } }, "it" : { @@ -33691,7 +36080,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%@ がバックグラウンドで動作しているときのみ、アップデートがインストールされます。" + "value" : "%@がバックグラウンドで動作しているときのみ、アップデートがインストールされます。" } }, "ko" : { @@ -33868,7 +36257,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "macOS の中央を使用" + "value" : "macOSの中央配置を使用" } }, "ko" : { @@ -33956,7 +36345,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "利用可能な場合は macOS のウインドウマネージャを使用" + "value" : "利用可能な場合はmacOSのウインドウマネージャを使用" } }, "ko" : { @@ -34032,7 +36421,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Valeurs fixes en pixels" + "value" : "Utiliser des pixels" } }, "it" : { @@ -34120,7 +36509,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" : { @@ -34221,7 +36610,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "バージョン:%@" + "value" : "バージョン%@" } }, "ko" : { @@ -34565,7 +36954,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Fond d'écran" + "value" : "Fond d’écran" } }, "it" : { @@ -34654,7 +37043,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Autoriser la Mission Control à s'ouvrir lorsque les fenêtres\nsont déplacées en haut de l'écran." + "value" : "Autoriser ou non Mission Control à s’ouvrir lorsque les fenêtres\nsont déplacées en haut de l’écran." } }, "it" : { @@ -34666,7 +37055,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウインドウ上端ドラッグ時に\nMission Control を開くかどうか。" + "value" : "ウインドウを画面上端にドラッグしたときに\nMission Controlを開くかどうか。" } }, "ko" : { @@ -34843,7 +37232,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウ" + "value" : "ウインドウ" } }, "ko" : { @@ -35021,7 +37410,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウィンドウスナップ" + "value" : "ウインドウスナップ" } }, "ko" : { @@ -35097,7 +37486,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Le magnétisme des fenêtres utilisera toujours l'aperçu." + "value" : "Le magnétisme des fenêtres utilisera toujours l’aperçu." } }, "it" : { @@ -35452,7 +37841,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" : { @@ -35464,7 +37853,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "トリガーキーは %lld キーまでしか使えません。" + "value" : "トリガーキーには最大で%lld個のキーしか使用できません。" } }, "ko" : { @@ -35541,7 +37930,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" : { @@ -35553,7 +37942,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "存在しないキー設定はエクスポートできません!" + "value" : "存在しないキー設定は書き出せません!" } }, "ko" : { @@ -35629,7 +38018,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vous avez utilisé Loop %lld fois !" + "value" : "Vous avez utilisé Loop %lld fois !" } }, "it" : { @@ -35641,7 +38030,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "%lld 回 Loop しました!" + "value" : "%lld回Loopしました!" } }, "ko" : { @@ -35717,7 +38106,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" : { @@ -35729,7 +38118,7 @@ "ja" : { "stringUnit" : { "state" : "translated", - "value" : "Loop した…えっと…もう数えられない…" + "value" : "Loopした…えっと…もう数えられない…" } }, "ko" : { @@ -35777,5 +38166,5 @@ } } }, - "version" : "1.1" + "version" : "1.0" } \ No newline at end of file diff --git a/Loop/Window Management/Window Action/GestureBinding.swift b/Loop/Window Management/Window Action/GestureBinding.swift index 6b45d5b0e..61c774b19 100644 --- a/Loop/Window Management/Window Action/GestureBinding.swift +++ b/Loop/Window Management/Window Action/GestureBinding.swift @@ -49,8 +49,8 @@ struct GestureBinding: Identifiable, Codable, Hashable, Defaults.Serializable { 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: magnify outward") - case .magnifyIn: String(localized: "Spread", comment: "Gesture kind: magnify inward") + 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)") } } @@ -130,7 +130,7 @@ extension GestureBinding { 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. 'Magnify In', 'Swipe Up')." + 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')." ) } } From e45ef52b21d0886c607a79f51959d333baa8a18f Mon Sep 17 00:00:00 2001 From: Kai Azim Date: Mon, 28 Sep 2026 22:18:46 -0600 Subject: [PATCH 03/13] =?UTF-8?q?=F0=9F=8C=90=20Unify=20comments=20across?= =?UTF-8?q?=20localization=20keys=20for=20Add/Remove?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift | 4 ++-- .../Settings/Gestures/GesturesConfigurationView.swift | 4 ++-- .../Settings/Keybinds/KeybindsConfigurationView.swift | 4 ++-- .../Keybinds/Modal Views/CycleActionConfigurationView.swift | 4 ++-- .../Theming/Radial Menu/RadialMenuConfigurationView.swift | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift b/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift index 8d2149ce8..7f6590cfa 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) diff --git a/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift b/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift index 7d92d2def..13e88ea18 100644 --- a/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift +++ b/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift @@ -45,14 +45,14 @@ struct GesturesConfigurationView: View { private var gesturesSection: some View { LuminareSection { LuminareButtonRow { - Button(String(localized: "Add", comment: "Button to add a new gesture")) { + Button(String(localized: "Add", comment: "Used to add items to a list")) { gestures.insert( GestureBinding(), at: 0 ) } - Button(String(localized: "Remove", comment: "Button to remove selected gestures"), role: .destructive) { + 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) } } diff --git a/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift index de9fb64c8..9c260224d 100644 --- a/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift @@ -116,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) diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift index 9ecb5d390..cfe6c1856 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift @@ -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) diff --git a/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift b/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift index a74e70204..67daeeee3 100644 --- a/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift +++ b/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift @@ -65,11 +65,11 @@ struct RadialMenuConfigurationView: View { String(localized: "Left-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) From 0ac6d834fb2cb542e62748021a88ee0f6a728fd7 Mon Sep 17 00:00:00 2001 From: Noah <179856882+Noah-Johann@users.noreply.github.com> Date: Tue, 29 Sep 2026 18:05:27 +0200 Subject: [PATCH 04/13] =?UTF-8?q?=F0=9F=90=9E=20Fix=20wallpaper=20capture?= =?UTF-8?q?=20on=20macOS=2027=20(#1160)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Accent Color/WallpaperImageFetcher.swift | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/Loop/Accent Color/WallpaperImageFetcher.swift b/Loop/Accent Color/WallpaperImageFetcher.swift index f844a5180..0195f9763 100644 --- a/Loop/Accent Color/WallpaperImageFetcher.swift +++ b/Loop/Accent Color/WallpaperImageFetcher.swift @@ -8,12 +8,19 @@ import SwiftUI final class WallpaperImageFetcher { + /// Bundle identifier for the wallpaper window process + /// On macOS 27 and later, the wallpaper window is not owned by the dock but rather the window manager. + private static let wallpaperOwnerBundleIDs: Set = [ + "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 { From f1124c5150407a6702d65d5a0be2bc99ed5b2f22 Mon Sep 17 00:00:00 2001 From: Kai Date: Tue, 29 Sep 2026 20:33:56 -0700 Subject: [PATCH 05/13] =?UTF-8?q?=F0=9F=90=9E=20Stop=20Loop=20from=20leavi?= =?UTF-8?q?ng=20Dock=20swipes=20unfinished=20(#1162)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core/Multitouch/SystemGestureFilter.swift | 326 +++++++++++------- .../Event Monitoring/ActiveEventMonitor.swift | 39 ++- 2 files changed, 227 insertions(+), 138 deletions(-) diff --git a/Loop/Core/Multitouch/SystemGestureFilter.swift b/Loop/Core/Multitouch/SystemGestureFilter.swift index 264b8ff93..2abd55622 100644 --- a/Loop/Core/Multitouch/SystemGestureFilter.swift +++ b/Loop/Core/Multitouch/SystemGestureFilter.swift @@ -23,28 +23,13 @@ final class SystemGestureFilter { } private enum Owner { - case undecided, loop, dock + case loop, dock } private enum TitlebarLookup { case pending, inside, outside } - private enum Sequence { - case passing - case dropping - /// Started the unbound way on a partly bound axis. The Dock is sent a cancel if Loop claims it - case provisional - /// Started the bound way on a partly or unconfirmed bound axis. Replayed to the Dock if Loop doesn't claim it - case holding(began: CGEvent) - } - - private enum Decision { - case forward, drop - case replay(began: CGEvent, current: CGEvent) - case cancel(CGEvent) - } - private struct State { var isRunning = false var claims: [Int: Claims] = [:] @@ -55,28 +40,41 @@ final class SystemGestureFilter { 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 } - /// Titlebar-only gestures stay claimed until known: losing a stroke beats both reacting - func claimedGestures(fingerCount: Int) -> Set { - guard let claims = claims[fingerCount] else { return [] } - return titlebarLookup == .outside ? claims.anywhere : claims.anywhere.union(claims.titlebarOnly) + /// The Dock keeps its gestures while Mission Control is showing, so they can dismiss it + func owner(fingerCount: Int) -> Owner? { + isMissionControlShowing ? .dock : owners[fingerCount] } + } - /// Titlebar-only gestures count once known to apply, so the Dock can still get a stroke Loop rejects - func confirmedClaims(fingerCount: Int) -> Set { - guard let claims = claims[fingerCount] else { return [] } - return titlebarLookup == .inside ? claims.anywhere.union(claims.titlebarOnly) : claims.anywhere - } + 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? + } - /// The Dock keeps its gestures while Mission Control is showing, so they can dismiss it - func owner(fingerCount: Int) -> Owner { - isMissionControlShowing ? .dock : owners[fingerCount] ?? .undecided - } + 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 @@ -85,14 +83,13 @@ final class SystemGestureFilter { private var eventMonitor: ActiveEventMonitor? private var contactsTask: Task<(), Never>? - /// Marks events Loop re-posts to the Dock, so the filter lets them through - private static let repostMarker: Int64 = 0x4C4F_4F50 - /// Kept small, as the Dock jumps to the current progress when a held `began` is replayed - private static let holdReleaseProgress: Double = 0.05 + /// 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 sequenceFingerCount = 0 + private var sequenceGeneration = 0 init( gestureMonitor: SubsurfaceMonitor, @@ -126,12 +123,14 @@ final class SystemGestureFilter { guard eventMonitor == nil else { return } log.info("Starting system gesture filter") + state.withLock { $0.sequenceGeneration += 1 } let newMonitor = ActiveEventMonitor( "system_gesture_filter", events: [.dockControl] - ) { [weak self] event in - self?.handle(event) ?? .forward + ) { [weak self] proxy, event in + guard let self else { return Unmanaged.passUnretained(event) } + return handle(event, proxy: proxy) } newMonitor.start() @@ -147,7 +146,7 @@ final class SystemGestureFilter { func stop() { contactsTask?.cancel() contactsTask = nil - state.withLock { $0 = State() } + state.withLock { $0 = State(sequenceGeneration: $0.sequenceGeneration + 1) } guard let eventMonitor else { return } eventMonitor.stop() @@ -215,139 +214,204 @@ final class SystemGestureFilter { } } - private func handle(_ event: CGEvent) -> ActiveEventMonitor.EventHandling { - guard event.getIntegerValueField(.gestureHIDType) == CGEventField.GestureHIDType.dockSwipe.rawValue, - event.getIntegerValueField(.eventSourceUserData) != Self.repostMarker - else { - return .forward + /// Called on the event tap thread. Each Dock swipe sequence reaches the Dock whole and in order, or not at all, + /// as the Dock can't recover from a sequence it didn't see from `began`. + private func handle(_ event: CGEvent, proxy: CGEventTapProxy) -> Unmanaged? { + let forward = Unmanaged.passUnretained(event) + + guard event.getIntegerValueField(.gestureHIDType) == CGEventField.GestureHIDType.dockSwipe.rawValue else { + return forward } - switch decide(for: event) { - case .forward: - return .forward - case .drop: - return .ignore - case let .replay(began, current): - repost(began) - repost(current) - return .ignore - case let .cancel(current): - current.setIntegerValueField(.gesturePhase, value: CGEventField.GesturePhase.cancelled.rawValue) - current.setDoubleValueField(.dockSwipeVelocity, value: 0) - repost(current) - return .ignore + // 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 } - } - private func decide(for event: CGEvent) -> Decision { let phase = CGEventField.GesturePhase(rawValue: event.getIntegerValueField(.gesturePhase)) - let motion = CGEventField.DockSwipeMotion(rawValue: event.getIntegerValueField(.dockSwipeMotion)) - let progress = event.getDoubleValueField(.dockSwipeProgress) if phase == .began { - sequence = beginSequence(event, motion: motion, progress: progress) - switch sequence { - case .passing, .provisional: return .forward - case .dropping, .holding: return .drop + 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 - defer { - if isEnd { sequence = .passing } - } switch sequence { case .passing: - return .forward + return forward case .dropping: - return .drop - case .provisional: - let fingerCount = sequenceFingerCount - guard state.withLock({ $0.owner(fingerCount: fingerCount) }) == .loop else { return .forward } - sequence = .dropping - return .cancel(event.copy() ?? event) - case let .holding(began): - let fingerCount = sequenceFingerCount - let owner: Owner = state.withLock { state in - let owner = state.owner(fingerCount: fingerCount) - guard owner == .undecided, - abs(progress) >= Self.holdReleaseProgress, - Self.gestures(motion: motion, progress: progress) - .isDisjoint(with: state.claimedGestures(fingerCount: fingerCount)) - else { - return owner - } - state.owners[fingerCount] = .dock - return .dock + 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 (\(ContinuousClock.now - hold.start))") + return nil } - switch owner { - case .undecided: - return .drop - case .loop: + let progress = event.getDoubleValueField(.dockSwipeProgress) + if hold.direction == nil, progress != 0 { + hold.direction = Self.gestures(motion: hold.motion, progress: progress).first + } + + 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 - return .drop - case .dock: + log.debug("Dock swipe (\(hold.fingerCount) fingers, \(hold.motion)): Loop after holding \(hold.events.count) events for \(ContinuousClock.now - hold.start), \(reason)") + return nil + case let .dock(reason): sequence = .passing - // A sequence ending while held was too small for the Dock to act on - return isEnd ? .drop : .replay(began: began, current: event.copy() ?? event) + // 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 \(ContinuousClock.now - hold.start), \(reason)") + return forward } } } - private func beginSequence(_ event: CGEvent, motion: CGEventField.DockSwipeMotion?, progress: Double) -> Sequence { - let (fingerCount, owner, claimed, confirmed) = state.withLock { state in - let fingerCount = state.fingerCount - return ( - fingerCount, - state.owner(fingerCount: fingerCount), - state.claimedGestures(fingerCount: fingerCount), - state.confirmedClaims(fingerCount: fingerCount) - ) + /// 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.touchID, state.claims[state.fingerCount]) } - sequenceFingerCount = fingerCount - switch owner { - case .loop: - return .dropping - case .dock: - return .passing - case .undecided: - let axis = Self.gestures(motion: motion, progress: 0) - let claimedOnAxis = axis.intersection(claimed) - - if claimedOnAxis.isEmpty { - setOwner(.dock, fingerCount: fingerCount) - return .passing - } - if axis.isSubset(of: confirmed) { - setOwner(.loop, fingerCount: fingerCount) - return .dropping - } + guard isRunning, + let motion = CGEventField.DockSwipeMotion(rawValue: event.getIntegerValueField(.dockSwipeMotion)) + else { + sequence = .passing + return true + } - let startsClaimedWay = !Self.gestures(motion: motion, progress: progress).isDisjoint(with: claimedOnAxis) - return startsClaimedWay ? .holding(began: event.copy() ?? event) : .provisional + 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.gestures(motion: motion, progress: progress).first + ) + + 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 } } - private func setOwner(_ owner: Owner, fingerCount: Int) { - state.withLock { $0.owners[fingerCount] = owner } + /// An owner already recorded for the touch wins; otherwise the resolved owner is recorded. + private func settle(_ hold: Hold, isPastDeadline: Bool) -> Resolution { + state.withLock { state in + let isSameTouch = state.touchID == hold.touchID + + switch isSameTouch ? state.owner(fingerCount: hold.fingerCount) : nil { + case .loop: + return .loop(reason: "Loop owns the touch") + case .dock: + return .dock(reason: state.isMissionControlShowing ? "Mission Control is showing" : "the Dock owns the touch") + case nil: + let titlebar = isSameTouch ? state.titlebarLookup : .pending + let resolution = Self.resolve(hold, titlebar: titlebar, isPastDeadline: isPastDeadline) + guard isSameTouch else { return resolution } + switch resolution { + case .loop: state.owners[hold.fingerCount] = .loop + case .dock: state.owners[hold.fingerCount] = .dock + case .awaitingTitlebar, .awaitingDirection: break + } + return resolution + } + } } - private func repost(_ event: CGEvent) { - event.setIntegerValueField(.eventSourceUserData, value: Self.repostMarker) - event.post(tap: .cgSessionEventTap) + 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") + } } /// Both directions of the axis when `progress` is zero - private static func gestures(motion: CGEventField.DockSwipeMotion?, progress: Double) -> Set { + private static func gestures(motion: CGEventField.DockSwipeMotion, progress: Double) -> [DockGesture] { let (negative, positive): (DockGesture, DockGesture) switch motion { case .horizontal: (negative, positive) = (.swipeRight, .swipeLeft) case .vertical: (negative, positive) = (.swipeUp, .swipeDown) case .pinch: (negative, positive) = (.pinch, .spread) - case nil: return [] } if progress < 0 { return [negative] } diff --git a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift index 770202293..4690156e3 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,18 +47,43 @@ 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 = { _, eventType, event, refcon in + let callback: CGEventTapCallBack = { proxy, eventType, event, refcon in guard let refcon else { return nil } let observer = Unmanaged.fromOpaque(refcon).takeUnretainedValue() @@ -79,7 +104,7 @@ final class ActiveEventMonitor: BaseEventTapMonitor { } guard unsafeBitCast(event, to: UnsafeRawPointer?.self) != nil else { return nil } - return observer.handleEvent(event: event) + return observer.handleEvent(proxy: proxy, event: event) } let userInfo = Unmanaged.passRetained(self).toOpaque() @@ -99,7 +124,7 @@ final class ActiveEventMonitor: BaseEventTapMonitor { } } - private func handleEvent(event: CGEvent) -> Unmanaged? { - eventCallback(event) + private func handleEvent(proxy: CGEventTapProxy, event: CGEvent) -> Unmanaged? { + eventCallback(proxy, event) } } From 54b26d34db23a80911ac74a4ecca784a34771092 Mon Sep 17 00:00:00 2001 From: Kai Date: Tue, 29 Sep 2026 20:34:49 -0700 Subject: [PATCH 06/13] =?UTF-8?q?=F0=9F=92=84=20Remove=20Tahoe=20shine=20f?= =?UTF-8?q?rom=20sidebar=20icons=20(#1163)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Settings Window/SettingsTab.swift | 45 +++++++------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/Loop/Settings Window/SettingsTab.swift b/Loop/Settings Window/SettingsTab.swift index 909c24532..5c3aa4fbe 100644 --- a/Loop/Settings Window/SettingsTab.swift +++ b/Loop/Settings Window/SettingsTab.swift @@ -33,25 +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.2352941176, green: 0.5568627451, blue: 0.5882352941, alpha: 1)) + 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)) } } @@ -122,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) - } } From 61e9b0916712ffced9b7804456ff1fa5dc2a31e7 Mon Sep 17 00:00:00 2001 From: Kai Date: Wed, 30 Sep 2026 13:23:37 -0700 Subject: [PATCH 07/13] =?UTF-8?q?=F0=9F=90=9E=20Gesture=20reliability=20fi?= =?UTF-8?q?xes=20(#1165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Core/LoopManager.swift | 13 +- .../Multitouch/MultitouchGestureBlocker.swift | 156 ++++++++++++++--- .../MultitouchRecognizerRegistry.swift | 23 +++ .../Multitouch/MultitouchTargetResolver.swift | 60 +++++-- Loop/Core/Multitouch/MultitouchTrigger.swift | 21 ++- .../Core/Multitouch/SystemGestureFilter.swift | 165 ++++++++++++------ .../Event Monitoring/ActiveEventMonitor.swift | 13 +- .../BaseEventTapMonitor.swift | 23 ++- .../PassiveEventMonitor.swift | 13 +- .../CycleActionCoordinator.swift | 73 +++++--- .../Window Action/CycleProgressStore.swift | 85 ++++----- LoopTests/CycleProgressStoreTests.swift | 3 +- 12 files changed, 443 insertions(+), 205 deletions(-) diff --git a/Loop/Core/LoopManager.swift b/Loop/Core/LoopManager.swift index 10b8852cc..52408cea5 100644 --- a/Loop/Core/LoopManager.swift +++ b/Loop/Core/LoopManager.swift @@ -112,7 +112,12 @@ final class LoopManager { }, changeAction: { [weak self] action, reverse, canAdvanceCycle in Task { - await self?.changeAction(action, canAdvanceCycle: canAdvanceCycle, reverse: reverse) + await self?.changeAction( + action, + canAdvanceCycle: canAdvanceCycle, + resumeCycleProgress: true, + reverse: reverse + ) } }, checkIfLoopOpen: { [weak self] in @@ -393,12 +398,14 @@ 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, + resumeCycleProgress: Bool = false, reverse: Bool = false ) async { var newAction = newAction @@ -439,6 +446,7 @@ extension LoopManager { cycleProposal = proposeCycleAction( newAction, canAdvance: canAdvanceCycle, + resumeProgress: resumeCycleProgress, reverse: reverse ) if let cycleProposal { @@ -642,6 +650,7 @@ extension LoopManager { private func proposeCycleAction( _ action: WindowAction, canAdvance: Bool, + resumeProgress: Bool, reverse: Bool ) -> CycleActionCoordinator.Proposal? { // Allow cycling backwards only if: @@ -656,6 +665,8 @@ extension LoopManager { reverse || (allowReverseCycle && keybindTrigger.effectiveEventFlags.contains(.maskShift)) ? .advance(.backward) : .advance(.forward) + } else if resumeProgress { + .resumeCurrent } else { .selectCurrent } diff --git a/Loop/Core/Multitouch/MultitouchGestureBlocker.swift b/Loop/Core/Multitouch/MultitouchGestureBlocker.swift index b28995dce..74c5707ee 100644 --- a/Loop/Core/Multitouch/MultitouchGestureBlocker.swift +++ b/Loop/Core/Multitouch/MultitouchGestureBlocker.swift @@ -6,55 +6,159 @@ // import AppKit +import os import Scribe -/// Reference-counted because the blocker is shared across in-flight -/// gestures: one gesture ending mustn't disable blocking for others still -/// active. `start()` is also idempotent so duplicate calls don't leak the -/// previous `ActiveEventMonitor` (it self-retains via `Unmanaged.passRetained`). +/// 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 var activeCount: Int = 0 + + 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() { - if monitor != nil { - activeCount += 1 - return - } + 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") + } + } - let eventTypes: [CGEventType] = [ - .scrollWheel, - CGEventType(rawValue: UInt32(NSEvent.EventType.gesture.rawValue)), - CGEventType(rawValue: UInt32(NSEvent.EventType.rotate.rawValue)), - CGEventType(rawValue: UInt32(NSEvent.EventType.swipe.rawValue)), - CGEventType(rawValue: UInt32(NSEvent.EventType.smartMagnify.rawValue)) - ].compactMap(\.self) + 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) + ) - let newMonitor = ActiveEventMonitor("gesture_blocker", events: eventTypes) { _ in .ignore } newMonitor.start() + // Left unset on failure, so the next `start()` tries again guard newMonitor.isEnabled else { - log.warn("Failed to start gesture blocker") + log.warn("Failed to start gesture blocker event tap") newMonitor.stop() return } monitor = newMonitor - activeCount = 1 } - func stop() { - guard let monitor else { return } + private static func makeEventHandler( + activeCount: OSAllocatedUnfairLock + ) -> (CGEvent) -> Unmanaged? { + { event in + guard activeCount.withLock({ $0 > 0 }) else { + return Unmanaged.passUnretained(event) + } - activeCount -= 1 - guard activeCount == 0 else { return } + if event.type == .scrollWheel { + return handleScroll(event) + } - monitor.stop() - self.monitor = nil + if gestureEventTypes.contains(event.type.rawValue) { + return handleGesture(event) + } - log.info("Stopped gesture blocker") + 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/MultitouchRecognizerRegistry.swift b/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift index 55fe51cec..ea3fb9861 100644 --- a/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift +++ b/Loop/Core/Multitouch/MultitouchRecognizerRegistry.swift @@ -5,8 +5,11 @@ // 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 -> () @@ -40,6 +43,8 @@ final class MultitouchRecognizerRegistry { 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, @@ -58,6 +63,8 @@ final class MultitouchRecognizerRegistry { } func rebuild(with gestures: [GestureBinding]) -> [StopResult] { + logConflictingGestures(in: gestures) + let gesturesByFingerCount = Dictionary(grouping: GestureBinding.activeGestures(in: gestures), by: \.fingerCount) let neededFingerCounts = Set(gesturesByFingerCount.keys) @@ -103,6 +110,22 @@ final class MultitouchRecognizerRegistry { !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?, diff --git a/Loop/Core/Multitouch/MultitouchTargetResolver.swift b/Loop/Core/Multitouch/MultitouchTargetResolver.swift index 7f93eb39a..af070c170 100644 --- a/Loop/Core/Multitouch/MultitouchTargetResolver.swift +++ b/Loop/Core/Multitouch/MultitouchTargetResolver.swift @@ -25,7 +25,14 @@ final class MultitouchTargetResolver { /// 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: (touchID: Int, window: Window?, isInTitlebar: Bool)? + 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 @@ -37,24 +44,23 @@ final class MultitouchTargetResolver { touchID: Int, allowsRapidRepeat: Bool ) -> MultitouchGestureActivationContext { - let (windowAtCursor, startedInTitlebar) = windowUnderCursor(touchID: touchID) + let target = touchTarget(touchID: touchID) - let targetWindow: Window? = if let windowAtCursor { - windowAtCursor - } else if allowsRapidRepeat, gesture.effectiveActivationZone == .anywhere { - lastRepeatableWindow - } else { - nil + 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: startedInTitlebar + startedInTitlebar: target.startedInTitlebar ) } func isCursorInTitlebar(touchID: Int) -> Bool { - windowUnderCursor(touchID: touchID).isInTitlebar + touchTarget(touchID: touchID).startedInTitlebar } func rememberRepeatableWindow(_ window: Window?, allowsRapidRepeat: Bool) { @@ -62,16 +68,38 @@ final class MultitouchTargetResolver { lastRepeatableWindow = window } - private func windowUnderCursor(touchID: Int) -> (window: Window?, isInTitlebar: Bool) { + /// 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.window, touchTarget.isInTitlebar) + return touchTarget } let cursorPosition = NSEvent.mouseLocation.flipY(screen: NSScreen.screens[0]) - let window = WindowUtility.windowAtPosition(cursorPosition) - let inTitlebar = window.map { isInTitlebar(cursorPosition, of: $0) } ?? false - touchTarget = (touchID, window, inTitlebar) - return (window, inTitlebar) + + 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 { diff --git a/Loop/Core/Multitouch/MultitouchTrigger.swift b/Loop/Core/Multitouch/MultitouchTrigger.swift index 870e35637..bc10f1408 100644 --- a/Loop/Core/Multitouch/MultitouchTrigger.swift +++ b/Loop/Core/Multitouch/MultitouchTrigger.swift @@ -103,6 +103,7 @@ final class MultitouchTrigger { closeDebugOverlay(force: true) #endif handleStopResults(recognizerRegistry.stopAll()) + gestureBlocker.stop() targetResolver.reset() } @@ -126,8 +127,10 @@ final class MultitouchTrigger { handleStopResults(recognizerRegistry.rebuild(with: Defaults[.gestures])) if recognizerRegistry.hasRecognizers { gestureMonitor.start() + gestureBlocker.start() } else { gestureMonitor.stop() + gestureBlocker.stop() } updateSystemGestureFilter() } @@ -143,7 +146,7 @@ final class MultitouchTrigger { closeCallback(false) } if stopResult.didAcquireGestureBlocker { - gestureBlocker.stop() + gestureBlocker.release() } } } @@ -188,6 +191,7 @@ final class MultitouchTrigger { releaseGestureBlocker(for: session) guard systemGestureFilter.canClaimCurrentTouch(fingerCount: fingerCount) else { + log.info("Rejected \(fingerCount)-finger \(gesture.kind) gesture: \(dockOwnershipRejectionReason)") session.abandonStroke() return false } @@ -197,6 +201,11 @@ final class MultitouchTrigger { 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 @@ -204,6 +213,7 @@ final class MultitouchTrigger { // 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 } @@ -217,11 +227,15 @@ final class MultitouchTrigger { allowsRapidRepeat: allowsRapidRepeat ) - gestureBlocker.start() + 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 @@ -361,6 +375,7 @@ final class MultitouchTrigger { 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) @@ -428,7 +443,7 @@ final class MultitouchTrigger { private func releaseGestureBlocker(for session: MultitouchGestureSession) { if session.releaseGestureBlocker() { - gestureBlocker.stop() + gestureBlocker.release() } } } diff --git a/Loop/Core/Multitouch/SystemGestureFilter.swift b/Loop/Core/Multitouch/SystemGestureFilter.swift index 2abd55622..42203e34a 100644 --- a/Loop/Core/Multitouch/SystemGestureFilter.swift +++ b/Loop/Core/Multitouch/SystemGestureFilter.swift @@ -6,6 +6,7 @@ // import CoreGraphics +import Foundation import os import Scribe import Subsurface @@ -20,6 +21,10 @@ final class SystemGestureFilter { struct Claims { var anywhere: Set = [] var titlebarOnly: Set = [] + + var isEmpty: Bool { + anywhere.isEmpty && titlebarOnly.isEmpty + } } private enum Owner { @@ -33,10 +38,10 @@ final class SystemGestureFilter { private struct State { var isRunning = false var claims: [Int: Claims] = [:] - /// Active finger count per multitouch device + /// Active finger count per device var fingerCounts: [UInt64: Int] = [:] - /// Incremented whenever the fingers touch down or lift, so stale lookups are discarded var touchID = 0 + var isTouching = false var hasLookedUpTouch = false var titlebarLookup = TitlebarLookup.pending var isMissionControlShowing = false @@ -48,16 +53,16 @@ final class SystemGestureFilter { fingerCounts.values.max() ?? 0 } - /// The Dock keeps its gestures while Mission Control is showing, so they can dismiss it - func owner(fingerCount: Int) -> Owner? { - isMissionControlShowing ? .dock : owners[fingerCount] + /// 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 touchID: Int? let motion: CGEventField.DockSwipeMotion let claims: Claims let start: ContinuousClock.Instant @@ -123,30 +128,18 @@ final class SystemGestureFilter { guard eventMonitor == nil else { return } log.info("Starting system gesture filter") - state.withLock { $0.sequenceGeneration += 1 } - 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 { + if !startEventMonitor() { log.warn("Failed to start system gesture filter") - newMonitor.stop() - return } - - eventMonitor = newMonitor } func stop() { contactsTask?.cancel() contactsTask = nil - state.withLock { $0 = State(sequenceGeneration: $0.sequenceGeneration + 1) } + state.withLock { state in + state = State(touchID: state.touchID, sequenceGeneration: state.sequenceGeneration + 1) + } guard let eventMonitor else { return } eventMonitor.stop() @@ -155,20 +148,22 @@ final class SystemGestureFilter { log.info("Stopped system gesture filter") } - /// Identifies the touch in progress, changing whenever the fingers touch down or lift var currentTouchID: Int { state.withLock(\.touchID) } func canClaimCurrentTouch(fingerCount: Int) -> Bool { - state.withLock { !$0.isRunning || $0.owner(fingerCount: fingerCount) != .dock } + 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 } - guard state.owner(fingerCount: fingerCount) != .dock else { return false } + // 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 } @@ -181,22 +176,78 @@ final class SystemGestureFilter { } } + // 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 - let wasTouching = state.fingerCount > 0 - state.fingerCounts[deviceID] = count + guard state.isRunning else { return nil } - if wasTouching != (state.fingerCount > 0) { - state.touchID += 1 + // 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 } - // Look up once enough fingers are down for the smallest claim - let lookupFingerCount = max(state.claims.keys.min() ?? 2, 2) - guard !state.hasLookedUpTouch, state.fingerCount >= lookupFingerCount else { return nil } state.hasLookedUpTouch = true return state.touchID } @@ -214,8 +265,8 @@ final class SystemGestureFilter { } } - /// Called on the event tap thread. Each Dock swipe sequence reaches the Dock whole and in order, or not at all, - /// as the Dock can't recover from a sequence it didn't see from `began`. + // MARK: Events + private func handle(_ event: CGEvent, proxy: CGEventTapProxy) -> Unmanaged? { let forward = Unmanaged.passUnretained(event) @@ -255,13 +306,13 @@ final class SystemGestureFilter { case var .holding(hold): if isEnd { sequence = .passing - log.debug("Dock swipe (\(hold.fingerCount) fingers, \(hold.motion)): dropped, ended while held (\(ContinuousClock.now - hold.start))") + 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.gestures(motion: hold.motion, progress: progress).first + hold.direction = Self.gesture(motion: hold.motion, progress: progress) } let isPastDeadline = ContinuousClock.now - hold.start >= Self.titlebarDeadline @@ -272,7 +323,7 @@ final class SystemGestureFilter { 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 \(ContinuousClock.now - hold.start), \(reason)") + 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 @@ -280,7 +331,7 @@ final class SystemGestureFilter { 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 \(ContinuousClock.now - hold.start), \(reason)") + 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 } } @@ -289,7 +340,7 @@ final class SystemGestureFilter { /// 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.touchID, state.claims[state.fingerCount]) + (state.isRunning, state.fingerCount, state.isTouching ? state.touchID : nil, state.claims[state.fingerCount]) } guard isRunning, @@ -299,6 +350,12 @@ final class SystemGestureFilter { 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], @@ -307,7 +364,7 @@ final class SystemGestureFilter { motion: motion, claims: claims ?? Claims(), start: .now, - direction: progress == 0 ? nil : Self.gestures(motion: motion, progress: progress).first + direction: progress == 0 ? nil : Self.gesture(motion: motion, progress: progress) ) switch settle(hold, isPastDeadline: false) { @@ -330,20 +387,17 @@ final class SystemGestureFilter { } } - /// An owner already recorded for the touch wins; otherwise the resolved owner is recorded. + /// An owner already recorded for the touch wins private func settle(_ hold: Hold, isPastDeadline: Bool) -> Resolution { state.withLock { state in - let isSameTouch = state.touchID == hold.touchID - - switch isSameTouch ? state.owner(fingerCount: hold.fingerCount) : nil { + switch state.owners[hold.fingerCount] { case .loop: return .loop(reason: "Loop owns the touch") case .dock: - return .dock(reason: state.isMissionControlShowing ? "Mission Control is showing" : "the Dock owns the touch") + return .dock(reason: "the Dock owns the touch") case nil: - let titlebar = isSameTouch ? state.titlebarLookup : .pending + let titlebar = state.touchID == hold.touchID ? state.titlebarLookup : .pending let resolution = Self.resolve(hold, titlebar: titlebar, isPastDeadline: isPastDeadline) - guard isSameTouch else { return resolution } switch resolution { case .loop: state.owners[hold.fingerCount] = .loop case .dock: state.owners[hold.fingerCount] = .dock @@ -405,13 +459,20 @@ final class SystemGestureFilter { } } + 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: (negative, positive) = (.swipeRight, .swipeLeft) - case .vertical: (negative, positive) = (.swipeUp, .swipeDown) - case .pinch: (negative, positive) = (.pinch, .spread) + let (negative, positive): (DockGesture, DockGesture) = switch motion { + case .horizontal: (.swipeRight, .swipeLeft) + case .vertical: (.swipeUp, .swipeDown) + case .pinch: (.pinch, .spread) } if progress < 0 { return [negative] } diff --git a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift index 4690156e3..bc7de4ec0 100644 --- a/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift +++ b/Loop/Utilities/Event Monitoring/ActiveEventMonitor.swift @@ -88,21 +88,14 @@ final class ActiveEventMonitor: BaseEventTapMonitor { let observer = Unmanaged.fromOpaque(refcon).takeUnretainedValue() // Tap management notifications carry a null event, so read eventType, not event.type - if eventType == .tapDisabledByTimeout { + // 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 nil } - if eventType == .tapDisabledByUserInput { - return nil - } - guard unsafeBitCast(event, to: UnsafeRawPointer?.self) != nil else { return nil } return observer.handleEvent(proxy: proxy, event: event) } diff --git a/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift b/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift index a5388a8a5..1dcdb4bf3 100644 --- a/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift +++ b/Loop/Utilities/Event Monitoring/BaseEventTapMonitor.swift @@ -90,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() { diff --git a/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift b/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift index 001bbc2c4..d8eb31508 100644 --- a/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift +++ b/Loop/Utilities/Event Monitoring/PassiveEventMonitor.swift @@ -36,21 +36,14 @@ final class PassiveEventMonitor: BaseEventTapMonitor { let observer = Unmanaged.fromOpaque(refcon).takeUnretainedValue() // Tap management notifications carry a null event, so read eventType, not event.type - if eventType == .tapDisabledByTimeout { + // 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 nil } - if eventType == .tapDisabledByUserInput { - return nil - } - guard unsafeBitCast(event, to: UnsafeRawPointer?.self) != nil else { return nil } observer.eventCallback(event) return Unmanaged.passUnretained(event) 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 ccad28dc6..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) + 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 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 - } - - 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,43 +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) - } - - // Coming from outside the cycle resumes where it was left, rather than restarting it - if let cursor = cursors[key], - let index = validatedIndex(for: cursor, in: children) { - 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/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) From 7ce662a55fc1fb7ee30ab2946a15cfc3fdc61835 Mon Sep 17 00:00:00 2001 From: Kai Date: Sat, 3 Oct 2026 16:47:32 -0700 Subject: [PATCH 08/13] =?UTF-8?q?=F0=9F=90=9E=20Fix=20updater=20crash=20wh?= =?UTF-8?q?en=20updating=20download=20progress=20off=20the=20main=20thread?= =?UTF-8?q?=20(#1166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Updater/UpdateDownloader.swift | 10 +++++----- Loop/Updater/UpdateInstaller.swift | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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..718168043 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)") From 282ad0ad8c0eb4d57fce10064a7302d573205866 Mon Sep 17 00:00:00 2001 From: Kai Azim Date: Sat, 3 Oct 2026 17:59:44 -0600 Subject: [PATCH 09/13] =?UTF-8?q?=F0=9F=90=9E=20Handle=20errors=20in=20uns?= =?UTF-8?q?tructured=20throwing=20tasks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Core/LoopManager.swift | 2 +- Loop/Core/URLCommandHandler.swift | 6 +++--- Loop/Settings Window/Loop/AboutConfiguration.swift | 2 +- Loop/Updater/Updater.swift | 8 ++++++-- Loop/Updater/Views/UpdateView.swift | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Loop/Core/LoopManager.swift b/Loop/Core/LoopManager.swift index 52408cea5..6feadc7d1 100644 --- a/Loop/Core/LoopManager.swift +++ b/Loop/Core/LoopManager.swift @@ -595,7 +595,7 @@ extension LoopManager { } Task { - _ = try await WindowActionEngine.shared.apply(context: resizeContext) + _ = try? await WindowActionEngine.shared.apply(context: resizeContext) } } } 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/Settings Window/Loop/AboutConfiguration.swift b/Loop/Settings Window/Loop/AboutConfiguration.swift index ffb687823..ec9d5e0fa 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 } } diff --git a/Loop/Updater/Updater.swift b/Loop/Updater/Updater.swift index 5b817b929..3eb147992 100755 --- a/Loop/Updater/Updater.swift +++ b/Loop/Updater/Updater.swift @@ -87,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.") diff --git a/Loop/Updater/Views/UpdateView.swift b/Loop/Updater/Views/UpdateView.swift index b066886e7..0ec42662a 100644 --- a/Loop/Updater/Views/UpdateView.swift +++ b/Loop/Updater/Views/UpdateView.swift @@ -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 { From 6b46d39d2ea02c0f4eef040fab15984a707c11b6 Mon Sep 17 00:00:00 2001 From: Kai Date: Sun, 4 Oct 2026 22:08:06 -0700 Subject: [PATCH 10/13] =?UTF-8?q?=F0=9F=92=84=20Simplify=20settings=20and?= =?UTF-8?q?=20wording=20(#1167)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/App/AppDelegate+UNNotifications.swift | 2 +- Loop/App/DataPatcher.swift | 17 + Loop/Extensions/Defaults+Extensions.swift | 24 +- Loop/Localizable.xcstrings | 5714 +++++++---------- Loop/Migration/Migrator.swift | 8 +- .../Loop/AboutConfiguration.swift | 2 +- .../Loop/AdvancedConfiguration.swift | 84 +- .../Loop/ExcludedAppsConfiguration.swift | 4 +- .../Behavior/BehaviorConfiguration.swift | 99 +- .../PaddingConfigurationView.swift | 4 +- .../Gestures/GestureConfigurationView.swift | 2 +- .../Settings/Gestures/GestureItemView.swift | 8 +- .../Gestures/GesturesConfigurationView.swift | 4 +- .../Keybinds/DirectionPickerView.swift | 2 +- .../Keybinds/Keybind Recorder/Keycorder.swift | 2 +- .../Settings/Keybinds/KeybindItemView.swift | 6 +- .../Keybinds/KeybindsConfigurationView.swift | 8 +- .../CustomActionConfigurationView.swift | 2 +- .../CycleActionConfigurationView.swift | 4 +- .../StashActionConfigurationView.swift | 2 +- .../Settings Window/SettingsContentView.swift | 18 +- .../Theming/AccentColorConfiguration.swift | 2 +- .../Theming/IconConfiguration.swift | 29 +- .../Theming/PreviewConfiguration.swift | 185 +- .../RadialMenuActionItemView.swift | 4 +- .../RadialMenuActionPickerView.swift | 2 +- .../RadialMenuConfigurationView.swift | 4 +- Loop/Updater/UpdateInstaller.swift | 8 +- Loop/Updater/UpdaterModels.swift | 6 +- Loop/Updater/Views/UpdateView.swift | 4 +- Loop/Utilities/AccessibilityManager.swift | 22 +- .../PreviewBackgroundStyle.swift | 25 + .../Preview Window/PreviewView.swift | 27 +- .../Window Action/GestureBinding.swift | 2 +- .../WindowDirection+LocalizedString.swift | 8 +- .../Window Manipulation/WindowEngine.swift | 8 +- 36 files changed, 2611 insertions(+), 3741 deletions(-) create mode 100644 Loop/Window Action Indicators/Preview Window/PreviewBackgroundStyle.swift 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/DataPatcher.swift b/Loop/App/DataPatcher.swift index 1d63cde94..e4ba90a46 100644 --- a/Loop/App/DataPatcher.swift +++ b/Loop/App/DataPatcher.swift @@ -48,6 +48,20 @@ enum DataPatcher { 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: () -> ()) { @@ -73,6 +87,9 @@ enum DataPatcher { /// 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) } } diff --git a/Loop/Extensions/Defaults+Extensions.swift b/Loop/Extensions/Defaults+Extensions.swift index 90cc973ca..e67de8472 100644 --- a/Loop/Extensions/Defaults+Extensions.swift +++ b/Loop/Extensions/Defaults+Extensions.swift @@ -37,13 +37,12 @@ extension Defaults.Keys { static let previewCornerRadius = Key("previewCornerRadius", default: 10) static let previewBorderThickness = Key("previewBorderThickness", default: 4) static let previewUseWindowCornerRadius = Key("previewUseWindowCornerRadius", default: true) - static let previewBackgroundEnableBlur = Key("previewBackgroundEnableBlur", 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) - static let startHidden = Key("startHidden", default: false) - static let hideMenuBarIcon = Key("hideMenuBarIcon", default: false, iCloud: false) static let animationConfiguration = Key("animationConfiguration", default: .snappy) static let windowSnapping = Key("windowSnapping", default: false) static let suppressMissionControlOnTopDrag = Key("suppressMissionControlOnTopDrag", default: true) @@ -51,7 +50,6 @@ extension Defaults.Keys { static let enablePadding = Key("enablePadding", default: false) static let padding = Key("padding", default: .zero) static let useScreenWithCursor = Key("useScreenWithCursor", default: true) - static let moveCursorWithWindow = Key("moveCursorWithWindow", default: false) static let resizeWindowUnderCursor = Key("resizeWindowUnderCursor", default: false) static let focusWindowOnResize = Key("focusWindowOnResize", default: true) static let respectStageManager = Key("respectStageManager", default: true) @@ -111,6 +109,21 @@ extension Defaults.Keys { /// Reset with `defaults delete com.MrKai77.Loop lockRadialMenuToCenter` 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: false) + /// 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` @@ -231,10 +244,10 @@ enum DefaultsiCloudSyncRegistrar { 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(.startHidden) Defaults.iCloud.add(.animationConfiguration) Defaults.iCloud.add(.windowSnapping) Defaults.iCloud.add(.suppressMissionControlOnTopDrag) @@ -242,7 +255,6 @@ enum DefaultsiCloudSyncRegistrar { Defaults.iCloud.add(.enablePadding) Defaults.iCloud.add(.padding) Defaults.iCloud.add(.useScreenWithCursor) - Defaults.iCloud.add(.moveCursorWithWindow) Defaults.iCloud.add(.resizeWindowUnderCursor) Defaults.iCloud.add(.focusWindowOnResize) Defaults.iCloud.add(.respectStageManager) diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index b4b98fc23..9eb3c0a0e 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -267,30 +267,30 @@ } } }, - "%@ 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?" } }, @@ -314,7 +314,7 @@ }, "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,49 +338,43 @@ }, "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" : { @@ -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", @@ -799,444 +787,446 @@ } } }, - "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.", + "Accent opacity" : { + "comment" : "Label for the slider that controls the opacity of the accent color in the background of the preview.", "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" : "Accent opacity" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "Accent opacity" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "Accent opacity" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "A single %1$@ action can only track one window. To stash\nmultiple windows, add additional %2$@ actions." + "value" : "Accent opacity" } }, "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" : "Opacité de la couleur d’accentuation" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Una singola azione %1$@ può tracciare solamente una finestra.\nPer nascondere più finestre, aggiungi altre azioni %2$@." + "value" : "Opacità colore dettagli" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "1つの%1$@アクションで追跡できるウインドウは1つだけです。\n複数のウインドウをスタッシュするには、別の%2$@アクションを追加してください。" + "value" : "アクセントカラーの不透明度" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "단일 %1$@ 액션은 하나의 창만 추적할 수 있습니다. 여러 창을 숨기려면 %2$@ 액션을 추가로 설정하세요." + "value" : "강조 불투명도" } }, "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." + "value" : "Accentdekking" } }, "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." + "value" : "Przezroczystość koloru akcentu" } }, "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." + "value" : "Opacidade da cor de destaque" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Действие %1$@ может следить только за одним окном. Добавьте дополнительные %2$@ действий, чтобы спрятать несколько окон." + "value" : "Прозрачность акцента" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "单个%1$@操作只能应用于单个窗口。要收纳多个窗口,请添加更多%2$@操作。" + "value" : "强调色不透明度" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "單個%1$@操作只能應用於單個視窗。要收納多個視窗,請添加更多%2$@操作。" + "value" : "強調色不透明度" } } } }, - "Accent opacity" : { - "comment" : "Label for the slider that controls the opacity of the accent color in the background of the preview.", + "Accessibility access" : { + "comment" : "Name of the privacy pane in macOS 26 and earlier, shown as a permission in settings", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Accent opacity" + "state" : "translated", + "value" : "الوصول إلى إمكانية الوصول" } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Accent opacity" + "state" : "translated", + "value" : "Bedienungshilfen-Zugriff" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Accent opacity" + "value" : "Accessibility access" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Accent opacity" + "state" : "translated", + "value" : "Permisos de Accesibilidad" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Opacité de la couleur d’accentuation" + "value" : "Accès d’accessibilité" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Opacità colore dettagli" + "value" : "Accessibilità" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "アクセントカラーの不透明度" + "value" : "アクセシビリティのアクセス権" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "강조 불투명도" + "value" : "접근성 접근" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Accentdekking" + "value" : "Toegankelijkheid" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Przezroczystość koloru akcentu" + "value" : "Pozwolenie w sekcji Dostępność" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Opacidade da cor de destaque" + "value" : "Acesso à acessibilidade" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Прозрачность акцента" + "value" : "Универсальный доступ" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "强调色不透明度" + "value" : "辅助功能" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "強調色不透明度" + "value" : "輔助功能" } } } }, - "Accessibility access" : { + "Accessibility Request: Content" : { "localizations" : { "ar" : { "stringUnit" : { - "state" : "translated", - "value" : "الوصول إلى إمكانية الوصول" + "state" : "needs_review", + "value" : "يرجى منح الوصول لتتمكن من تغيير حجم النوافذ." } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Bedienungshilfen-Zugriff" + "state" : "needs_review", + "value" : "Bitte erlaube den Zugriff, um Fenstergrößen ändern zu können." } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Accessibility access" + "value" : "Grant access in System Settings so %@ can resize windows." } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Permisos de Accesibilidad" + "state" : "needs_review", + "value" : "Por favor, concede permiso para que Loop pueda cambiar el tamaño de las ventanas" } }, "fr" : { "stringUnit" : { - "state" : "translated", - "value" : "Accès d’accessibilité" + "state" : "needs_review", + "value" : "Veuillez accorder l’accès pour pouvoir redimensionner les fenêtres." } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Accessibilità" + "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", - "value" : "접근성 접근" + "state" : "needs_review", + "value" : "창 크기를 조절하려면 접근성 권한을 부여해 주세요" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Toegankelijkheid" + "state" : "needs_review", + "value" : "Geef toegang om het grootte van vensters aan te passen." } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Pozwolenie w sekcji Dostępność" + "state" : "needs_review", + "value" : "Udziel dostępu, aby móc zmieniać wielkość okien." } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Acesso à acessibilidade" + "state" : "needs_review", + "value" : "Por favor, conceda acesso para redimensionar janelas." } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Универсальный доступ" + "state" : "needs_review", + "value" : "Пожалуйста выдайте доступ к изменению размера окон." } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "辅助功能" + "state" : "needs_review", + "value" : "请授予权限以允许调整窗口大小。" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "輔助功能" + "state" : "needs_review", + "value" : "請授予權限以允許調整視窗大小。" } } } }, - "Accessibility Request: Content" : { + "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" : { "state" : "translated", - "value" : "يرجى منح الوصول لتتمكن من تغيير حجم النوافذ." + "value" : "%@ يحتاج إلى أذونات الوصول" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Bitte erlaube den Zugriff, um Fenstergrößen ändern zu können." + "value" : "%@ braucht Zugriff auf Bedienungshilfen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Please grant access to be able to resize windows." + "value" : "%@ Needs Accessibility Permission" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Por favor, concede permiso para que Loop pueda cambiar el tamaño de las ventanas" + "value" : "%@ necesita permisos de Accesibilidad" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Veuillez accorder l’accès pour pouvoir redimensionner les fenêtres." + "value" : "%@ nécessite des autorisations d’accessibilité" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Per favore consenti l'accesso per poter ridimensionare le finestre." + "value" : "%@ ha bisogno del permesso di accessibilità" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ウインドウのサイズを変更できるようにするには、アクセスを許可してください。" + "value" : "%@にはアクセシビリティのアクセス権が必要です" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "창 크기를 조절하려면 접근성 권한을 부여해 주세요" + "value" : "%@ 접근성 권한이 필요합니다" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Geef toegang om het grootte van vensters aan te passen." + "value" : "%@ Heeft toegankelijkheid toegang nodig" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Udziel dostępu, aby móc zmieniać wielkość okien." + "value" : "%@ Potrzebuje pozwolenia w sekcji Dostępność" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Por favor, conceda acesso para redimensionar janelas." + "value" : "%@ Precisa de Permissões de Acessibilidade" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Пожалуйста выдайте доступ к изменению размера окон." + "value" : "%@ нужны разрешения универсального доступа" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "请授予权限以允许调整窗口大小。" + "value" : "%@需要辅助功能权限" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "請授予權限以允許調整視窗大小。" + "value" : "%@需要輔助功能權限" } } } }, - "Accessibility Request: Title" : { + "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" : "translated", - "value" : "%@ يحتاج إلى أذونات الوصول" + "value" : "%@ يحتاج إلى إذن التحكم في الأجهزة والوصول إلى البيانات" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "%@ braucht Zugriff auf Bedienungshilfen" + "value" : "%@ braucht Gerätesteuerung und Datenzugriff" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "%@ Needs Accessibility Permissions" + "value" : "%@ Needs Device Control and Data Access" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "%@ necesita permisos de Accesibilidad" + "value" : "%@ necesita permisos de Control de dispositivos y acceso a datos" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "%@ nécessite des autorisations d’accessibilité" + "value" : "%@ nécessite l’autorisation Contrôle de l’appareil et accès aux données" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "%@ ha bisogno del permesso di accessibilità" + "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" : "%@ Heeft toegankelijkheid toegang nodig" + "value" : "%@ heeft toegang tot Apparaatbeheer en gegevenstoegang nodig" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "%@ Potrzebuje pozwolenia w sekcji Dostępność" + "value" : "%@ potrzebuje pozwolenia w sekcji Sterowanie urządzeniami i dostęp do danych" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "%@ Precisa de Permissões de Acessibilidade" + "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" : "%@需要裝置控制和資料取用權限" } } } @@ -1508,95 +1498,6 @@ } } }, - "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.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Allow radial menu customization" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Allow radial menu customization" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Allow radial menu customization" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Allow radial menu customization" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Autoriser la personnalisation du menu radial" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Consenti personalizzazione del menu radiale" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "円形メニューのカスタマイズを許可" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "원형 메뉴 사용자화 허용" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Radiaal menu aanpassen toestaan" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zezwalaj na dostosowywanie menu kołowego" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Permitir customização do menu radial" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Разрешить изменение радиального меню" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "允许自定义环形菜单" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "允許自訂環形菜單" - } - } - } - }, "Almost Maximize" : { "comment" : "Window action", "localizations" : { @@ -1686,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" : { @@ -1700,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" : { @@ -1774,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" : "Animé" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Animazione" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "アニメーション" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "애니메이션" + } + }, + "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Animate window resize" + "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" : { @@ -1862,178 +1839,255 @@ } } }, - "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" : "此按鍵組合與已有按鍵綁定衝突。" } } } @@ -2569,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" : { @@ -3611,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" : { @@ -3989,7 +4127,8 @@ } } }, - "Check for updates…" : { + "Check for Updates…" : { + "comment" : "Button to check for updates in menubar dropdown menu", "localizations" : { "ar" : { "stringUnit" : { @@ -4000,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" : { @@ -4036,13 +4175,13 @@ "ko" : { "stringUnit" : { "state" : "translated", - "value" : "업데이트 확인..." + "value" : "업데이트 확인…" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Controleer voor updates…" + "value" : "Controleren op updates…" } }, "pl" : { @@ -4054,7 +4193,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Verificar atualizações..." + "value" : "Procurar por Atualizações…" } }, "ru" : { @@ -4077,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" : "選定按鍵綁定檔案" } } } @@ -4254,91 +4386,415 @@ } } }, - "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" : "إغلاق" + "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" : "「追加」を押すと、新しいジェスチャを追加できます。" + } + }, + "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" : "닫기" + "value" : "“추가”를 눌러 액션을 추가하세요." } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Sluiten" + "value" : "Klik op “Toevoegen” om een actie toe te voegen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zamknij" + "value" : "Naciśnij „Dodaj”, aby dodać akcję" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Fechar" + "value" : "Pressione “Adicionar” para incluir uma ação" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Закрыть" + "value" : "Нажмите «Добавить», чтобы добавить действие" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "关闭" + "value" : "点按“添加”以添加操作" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "關閉" + "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" : "애플리케이션을 추가하려면 “추가”를 누르세요" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Druk op “Toevoegen” om een applicatie toe te voegen" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Naciśnij „Dodaj”, aby dodać aplikację" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pressione “Adicionar” para adicionar um aplicativo" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Нажмите «Добавить», чтобы добавить приложение" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "点按“添加”以添加应用" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "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" : "按一下來遍歷循環操作。" } } } @@ -5053,209 +5509,197 @@ } } }, - "Cursor" : { - "comment" : "Section header shown in settings", + "Custom" : { + "comment" : "Accent color option\nPreview background style: a configurable blur and accent color\nWindow action", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "المؤشر" + "value" : "مخصص" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Mauszeiger" + "value" : "Benutzerdefiniert" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor" + "value" : "Custom" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Cursor" + "state" : "translated", + "value" : "Personalizado" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Curseur" + "value" : "Personnalisée" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Cursore" + "value" : "Personalizzata" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "カーソル" + "value" : "カスタム" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "커서" + "value" : "사용자 정의" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor" + "value" : "Aangepast" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Kursor" + "value" : "Własny" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Cursor" + "value" : "Customizado" } }, "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", + "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" : "translated", - "value" : "مخصص" + "state" : "needs_review", + "value" : "Customize actions" } }, "de" : { "stringUnit" : { - "state" : "translated", - "value" : "Benutzerdefiniert" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Custom" + "state" : "needs_review", + "value" : "Customize actions" } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Personalizado" + "state" : "needs_review", + "value" : "Customize actions" } }, "fr" : { "stringUnit" : { - "state" : "translated", - "value" : "Personnalisée" + "state" : "needs_review", + "value" : "Autoriser la personnalisation du menu radial" } }, "it" : { "stringUnit" : { - "state" : "translated", - "value" : "Personalizzata" + "state" : "needs_review", + "value" : "Consenti personalizzazione del menu radiale" } }, "ja" : { "stringUnit" : { - "state" : "translated", - "value" : "カスタム" + "state" : "needs_review", + "value" : "円形メニューのカスタマイズを許可" } }, "ko" : { "stringUnit" : { - "state" : "translated", - "value" : "사용자 정의" + "state" : "needs_review", + "value" : "원형 메뉴 사용자화 허용" } }, "nl-BE" : { "stringUnit" : { - "state" : "translated", - "value" : "Aangepast" + "state" : "needs_review", + "value" : "Radiaal menu aanpassen toestaan" } }, "pl" : { "stringUnit" : { - "state" : "translated", - "value" : "Własny" + "state" : "needs_review", + "value" : "Zezwalaj na dostosowywanie menu kołowego" } }, "pt-BR" : { "stringUnit" : { - "state" : "translated", - "value" : "Customizado" + "state" : "needs_review", + "value" : "Permitir customização do menu radial" } }, "ru" : { "stringUnit" : { - "state" : "translated", - "value" : "Свои значения" + "state" : "needs_review", + "value" : "Разрешить изменение радиального меню" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", - "value" : "自定义" + "state" : "needs_review", + "value" : "允许自定义环形菜单" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", - "value" : "自訂" + "state" : "needs_review", + "value" : "允許自訂環形菜單" } } } }, - "Customize this action's custom frame." : { + "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." + "value" : "Customize this action’s custom frame." } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this action's custom frame." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Customize this action's custom frame." + "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" : { @@ -5409,31 +5853,25 @@ } } }, - "Customize this gesture's action." : { + "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." + "value" : "Customize this gesture’s action." } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "fr" : { @@ -5445,7 +5883,7 @@ "it" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "ja" : { @@ -5457,48 +5895,48 @@ "ko" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "nl-BE" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "pl" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "pt-BR" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "ru" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "zh-Hans" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } }, "zh-Hant" : { "stringUnit" : { "state" : "needs_review", - "value" : "Customize this gesture's action." + "value" : "Customize this gesture’s action." } } } }, - "Customize this keybind's action." : { + "Customize this keybind’s action." : { "localizations" : { "ar" : { "stringUnit" : { @@ -5512,12 +5950,6 @@ "value" : "Aktion dieser Tastenkombination anpassen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Customize this keybind's action." - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -5918,7 +6350,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Ciclo para trás com \"Shift\"" + "value" : "Ciclo para trás com Shift" } }, "ru" : { @@ -6030,95 +6462,6 @@ } } }, - "Default corner radius" : { - "comment" : "Label for the slider that controls the corner radius of the preview when the user has not selected a window.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Default corner radius" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standard-Eckenradius" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Default corner radius" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Default corner radius" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Rayon des coins par défaut" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Raggio predefinito degli angoli" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "デフォルトのコーナーの丸み" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "기본 모서리 반경" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standaard hoekradius" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Domyślne zaokrąglenie narożników" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Raio de canto padrão" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Скругление по умолчанию" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "默认圆角半径" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "默認圓角半徑" - } - } - } - }, "Design" : { "comment" : "Role title shown in Loop’s credits section.", "localizations" : { @@ -6185,7 +6528,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Design\"" + "value" : "Design" } }, "ru" : { @@ -6297,799 +6640,785 @@ } } }, - "Direction" : { - "comment" : "Label for the swipe direction picker in the gesture configuration modal", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Direction" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Direction" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Direction" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Direction" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "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" - } - } - } - }, - "Disable cursor interaction" : { + "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" : "Mauszeiger Interaktion deaktivieren" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Disable cursor interaction" + "value" : "Gerätesteuerung und Datenzugriff" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Deshabilitar interacción con el cursor" + "value" : "Control de dispositivos y acceso a datos" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Désactiver l’interaction du curseur" + "value" : "Contrôle de l’appareil et accès aux données" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Disabilita interazione con cursore" + "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" : "Cursor interactie uitschakelen" + "value" : "Apparaatbeheer en gegevenstoegang" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Wyłącz reakcję na kursor" + "value" : "Sterowanie urządzeniami i dostęp do danych" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Desabilitar interações com o cursor" + "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" : "裝置控制和資料取用" } } } }, - "Do you want to merge or erase existing keybinds?" : { + "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" : "Bestehende Tastenbelegungen zusammenführen oder löschen?" + "state" : "needs_review", + "value" : "Direction" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Do you want to merge or erase existing keybinds?" + "value" : "Direction" } }, "es" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "Direction" + } + }, + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Quieres unir o borrar las combinaciones existentes?" + "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" : "Voulez-vous fusionner ou effacer les raccourcis existants ?" + "value" : "Traiter les touches gauche et droite différemment" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Vuoi unire o sovrascrivere le attuali scorciatoie?" + "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" : "Wil je bestaande toetscombinaties samenvoegen of wissen?" + "value" : "Behandel linker- en rechtertoetsen anders" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Chcesz scalić czy usunąć istniejące skróty klawiszowe?" + "value" : "Rozróżniaj klawisze po prawej i lewej stronie klawiatury" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Você quer mesclar ou deletar os atalhos existentes?" + "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" : "分開對待鍵盤兩側的修飾鍵" } } } }, - "Donate" : { + "Do you want to merge or erase existing keybinds?" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "تبرع" + "value" : "هل تريد دمج أو محو روابط المفاتيح الحالية؟" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Spenden" + "value" : "Bestehende Tastenbelegungen zusammenführen oder löschen?" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Donate" + "value" : "Do you want to merge or erase existing keybinds?" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Donar" + "value" : "Quieres unir o borrar las combinaciones existentes?" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Faire un don" + "value" : "Voulez-vous fusionner ou effacer les raccourcis existants ?" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Dona" + "value" : "Vuoi unire o sovrascrivere le attuali scorciatoie?" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "寄付する" + "value" : "既存のキー設定を結合しますか、それとも消去しますか?" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "기부" + "value" : "기존 키바인드를 병합하거나 지우시겠습니까?" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Doneren" + "value" : "Wil je bestaande toetscombinaties samenvoegen of wissen?" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Wesprzyj" + "value" : "Chcesz scalić czy usunąć istniejące skróty klawiszowe?" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Doar" + "value" : "Você quer mesclar ou deletar os atalhos existentes?" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Пожертвовать" + "value" : "Соединить или удалить существующие горячие клавиши?" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "捐赠" + "value" : "你希望合并还是清空现有快捷键设置?" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "捐贈" + "value" : "你希望合併還是清空現有按鍵綁定設置?" } } } }, - "Double-click to trigger" : { + "Donate" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "انقر مرتين للتشغيل" + "value" : "تبرع" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Doppelklick zum Aktivieren" + "value" : "Spenden" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Double-click to trigger" + "value" : "Donate" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Doble click para activar" + "value" : "Donar" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Activer par double-clic" + "value" : "Faire un don" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Attiva con doppio clic" + "value" : "Dona" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ダブルクリックでトリガー" + "value" : "寄付する" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "더블 클릭으로 트리거" + "value" : "기부" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Dubbelklik om te activeren" + "value" : "Doneren" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Kliknij dwukrotnie, aby uruchomić" + "value" : "Wesprzyj" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Clique duplo para disparar" + "value" : "Doar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Двойное нажатие для активации" + "value" : "Пожертвовать" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "双击以触发" + "value" : "捐赠" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "按兩下來觸發" + "value" : "捐贈" } } } }, - "Down" : { - "comment" : "Swipe direction picker option: down", + "Done" : { + "comment" : "Label for a button that closes a modal window", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "تم" } }, "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Down" - } - }, - "en" : { "stringUnit" : { "state" : "translated", - "value" : "Down" + "value" : "Fertig" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "Aceptar" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Bas" + "value" : "Terminé" } }, "it" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "Fine" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "下" + "value" : "完了" } }, "ko" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "완료" } }, "nl-BE" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "Gereed" } }, "pl" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "Gotowe" } }, "pt-BR" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "OK" } }, "ru" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "Готово" } }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "完成" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Down" + "state" : "translated", + "value" : "完成" } } } }, - "Enable blur" : { - "comment" : "Text for enabling the blur effect on the preview.", + "Double-click to trigger" : { "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Enable blur" + "state" : "translated", + "value" : "انقر مرتين للتشغيل" } }, "de" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Enable blur" + "state" : "translated", + "value" : "Doppelklick zum Aktivieren" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Enable blur" + "value" : "Double-click to trigger" } }, "es" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Enable blur" + "state" : "translated", + "value" : "Doble click para activar" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Activer le flou" + "value" : "Activer par double-clic" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Abilita sfocatura" + "value" : "Attiva con doppio clic" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "ぼかしを有効化" + "value" : "ダブルクリックでトリガー" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "블러 활성화" + "value" : "더블 클릭으로 트리거" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Vervaging" + "value" : "Dubbelklik om te activeren" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Zastosuj rozmycie" + "value" : "Kliknij dwukrotnie, aby uruchomić" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Habilitar desfoque" + "value" : "Clique duplo para disparar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Включить размытие" + "value" : "Двойное нажатие для активации" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "启用模糊" + "value" : "双击以触发" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "啟用模糊" + "value" : "按兩下來觸發" } } } }, - "Enable trackpad gestures" : { - "comment" : "Toggle in gestures settings", + "Down" : { + "comment" : "Swipe direction picker option: down", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Activer les gestes du trackpad" + "value" : "Bas" } }, "it" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "トラックパッドジェスチャを有効化" + "value" : "下" } }, "ko" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "nl-BE" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "pl" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "pt-BR" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "ru" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "zh-Hans" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "value" : "Down" } }, "zh-Hant" : { "stringUnit" : { "state" : "needs_review", - "value" : "Enable trackpad gestures" + "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$@操作。" } } } @@ -7186,262 +7515,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" : "輸出⋯" } } } @@ -7535,95 +7853,6 @@ } } }, - "Failed to resolve linked keybind" : { - "comment" : "An error message displayed when a linked keybind cannot be resolved.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Failed to resolve linked keybind" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Failed to resolve linked keybind" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Failed to resolve linked keybind" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Failed to resolve linked keybind" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Impossible de résoudre le raccourci lié" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Impossibile trovare la scorciatoia collegata" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "リンクされたキー設定が見つかりません" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "연결된 키 바인딩을 확인하지 못했습니다" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Gelinkte toetscombinatie ophalen mislukt" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nie udało się odnaleźć powiązanego skrótu klawiszowego" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Falha ao resolver tecla vinculada" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Не удалось определить связанную клавишу" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "无法解析关联的快捷键" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "無法解析關聯的按鍵綁定" - } - } - } - }, "Fill Available Space" : { "comment" : "Window action", "localizations" : { @@ -8247,31 +8476,25 @@ } } }, - "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" : { @@ -8336,6 +8559,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" : { @@ -8515,6 +8821,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" : { @@ -8528,12 +8835,6 @@ "value" : "Fenster beim manipulieren fokussieren" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Focus window on resize" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -8602,6 +8903,9 @@ } } }, + "Active" : { + "comment" : "Target window option: act on the active window" + }, "Fourth Fourth" : { "comment" : "Window action", "localizations" : { @@ -8691,7 +8995,7 @@ } } }, - "Fullscreen" : { + "Full Screen" : { "comment" : "Window action", "localizations" : { "ar" : { @@ -8706,12 +9010,6 @@ "value" : "Vollbild" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fullscreen" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -8781,7 +9079,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" : { @@ -10201,94 +10499,6 @@ } } }, - "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 des menus" - } - }, - "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 to hide the radial menu whenever no action is selected", "localizations" : { @@ -11503,7 +11713,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Meta Loop\"" + "value" : "Meta Loop" } }, "ru" : { @@ -11679,7 +11889,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Rosé Pine\"" + "value" : "Rosé Pine" } }, "ru" : { @@ -11970,85 +12180,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", + "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" : "你將會在解鎖新圖標時收到通知。" } } @@ -12321,7 +12531,8 @@ } } }, - "Ignore fullscreen windows" : { + "Ignore full-screen windows" : { + "comment" : "Toggle that makes Loop ignore full-screen windows.", "localizations" : { "ar" : { "stringUnit" : { @@ -12335,12 +12546,6 @@ "value" : "Vollbildfenster ignorieren" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ignore fullscreen windows" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -12409,442 +12614,520 @@ } } }, - "Import" : { + "Import Keybinds" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "استيراد" + "value" : "استيراد روابط المفاتيح" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Importieren" + "value" : "Tastenbelegungen Importieren" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Import" + "value" : "Import Keybinds" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Importar" + "value" : "Importar combinaciones" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Importer" + "value" : "Importer les raccourcis" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Importa" + "value" : "Importa scorciatoie" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "読み込む" + "value" : "キー設定を読み込む" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "가져오기" + "value" : "키바인드 가져오기" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Importeren" + "value" : "Toetscombinaties importeren" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Importuj" + "value" : "Importuj skróty klawiszowe" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Importar" + "value" : "Importar Atalhos" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Импортировать" + "value" : "Импортировать горячие клавиши" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "导入" + "value" : "导入快捷键" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "匯入" + "value" : "匯入按鍵綁定" } } } }, - "Import Keybinds" : { + "Import keybinds: cancel" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "استيراد روابط المفاتيح" + "value" : "إلغاء" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Tastenbelegungen Importieren" + "value" : "Abbrechen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Import Keybinds" + "value" : "Cancel" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Importar combinaciones" + "value" : "Cancelar" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Importer les raccourcis" + "value" : "Annuler" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Importa scorciatoie" + "value" : "Annulla" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キー設定を読み込む" + "value" : "キャンセル" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "키바인드 가져오기" + "value" : "취소" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Toetscombinaties importeren" + "value" : "Annuleren" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Importuj skróty klawiszowe" + "value" : "Anuluj" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Importar Atalhos" + "value" : "Cancelar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Импортировать горячие клавиши" + "value" : "Отменить" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "导入快捷键" + "value" : "取消" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "匯入按鍵綁定" + "value" : "取消" } } } }, - "Import keybinds: cancel" : { + "Import keybinds: erase" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "إلغاء" + "value" : "استبدال" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Abbrechen" + "value" : "Ersetzen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Cancel" + "value" : "Replace" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Cancelar" + "value" : "Reemplazar" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Annuler" + "value" : "Remplacer" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Annulla" + "value" : "Sostituisci" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "キャンセル" + "value" : "置き換える" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "취소" + "value" : "대치" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Annuleren" + "value" : "Vervang" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Anuluj" + "value" : "Zastąp" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Cancelar" + "value" : "Substituir" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Отменить" + "value" : "Заменить" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "取消" + "value" : "替换" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "取消" + "value" : "取代" } } } }, - "Import keybinds: erase" : { + "Import keybinds: merge" : { "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "مسح" + "value" : "دمج" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Löschen" + "value" : "Zusammenführen" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Erase" + "value" : "Merge" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Borrar" + "value" : "Unir" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Effacer" + "value" : "Fusionner" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Sovrascrivi" + "value" : "Unisci" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "消去" + "value" : "結合" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "지우기" + "value" : "병합" } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Wissen" + "value" : "Samenvoegen" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Wyczyść" + "value" : "Scal" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Apagar" + "value" : "Mesclar" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Удалить" + "value" : "Соединить" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "清空" + "value" : "合并" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "清空" + "value" : "合併" } } } }, - "Import keybinds: merge" : { + "Import…" : { + "comment" : "Button that opens a file dialog to import keybinds.", "localizations" : { "ar" : { "stringUnit" : { "state" : "translated", - "value" : "دمج" + "value" : "استيراد…" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Zusammenführen" + "value" : "Importieren …" } }, - "en" : { + "es" : { "stringUnit" : { "state" : "translated", - "value" : "Merge" + "value" : "Importar…" } }, - "es" : { + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Unir" + "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" : "Fusionner" + "value" : "Veuillez inclure au moins une touche de modification." } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Unisci" + "value" : "Includi almeno un tasto modificatore." } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "結合" + "value" : "少なくとも1つの修飾キーを含めてください。" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "병합" + "value" : "하나 이상의 보조 키를 포함해 주세요." } }, "nl-BE" : { "stringUnit" : { "state" : "translated", - "value" : "Samenvoegen" + "value" : "Voeg ten minste één aanpassingstoets toe." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Scal" + "value" : "Proszę podać co najmniej jeden klawisz." } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Mesclar" + "value" : "Por favor, inclua pelo menos uma tecla modificadora." } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Соединить" + "value" : "Пожалуйста, используйте хотя бы одну специальную клавишу." } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "合并" + "value" : "请包含至少一个修饰键。" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "合併" + "value" : "請包括至少一個修飾鍵。" } } } @@ -13202,13 +13485,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" : { @@ -13217,16 +13500,10 @@ "value" : "Installation fehlgeschlagen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Install failed" - } - }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Install failed" + "value" : "Install Failed" } }, "fr" : { @@ -13291,31 +13568,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" : { @@ -13338,8 +13609,8 @@ }, "ko" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "state" : "translated", + "value" : "응용 프로그램 폴더에 설치" } }, "nl-BE" : { @@ -13350,8 +13621,8 @@ }, "pl" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Install in Your Applications Folder" + "state" : "translated", + "value" : "Zainstaluj do folderu Aplikacje" } }, "pt-BR" : { @@ -13368,192 +13639,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原生窗口管理系統。" } } } @@ -14712,180 +14978,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" : "無法解析關聯的按鍵綁定" } } } @@ -17811,30 +18071,24 @@ } } }, - "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" : { @@ -17846,7 +18100,7 @@ "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" : { @@ -17858,25 +18112,25 @@ "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" : { @@ -17988,6 +18242,171 @@ } } }, + "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" : { @@ -18699,94 +19118,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" : { @@ -19126,7 +19457,7 @@ "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Переместить в папку \"Приложения\"?" + "value" : "Переместить в папку «Приложения»?" } }, "zh-Hans" : { @@ -19143,6 +19474,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" : { @@ -19499,94 +19913,6 @@ } } }, - "Move window to cursor's screen" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "استخدام الشاشة مع المؤشر" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bildschirm mit Mauszeiger verwenden" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Move window to cursor's screen" - } - }, - "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" : "使用游標所在的屏幕" - } - } - } - }, "Next Screen" : { "comment" : "Window action", "localizations" : { @@ -19765,7 +20091,7 @@ } } }, - "No excluded applications" : { + "No excluded apps" : { "localizations" : { "ar" : { "stringUnit" : { @@ -19779,12 +20105,6 @@ "value" : "Keine ausgeschlossenen Anwendungen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "No excluded applications" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -21269,7 +21589,7 @@ "ar" : { "stringUnit" : { "state" : "translated", - "value" : "لقد أضعنا زر \"التحديث\". عذراً!" + "value" : "لقد أضعنا زر «التحديث». عذراً!" } }, "de" : { @@ -21287,7 +21607,7 @@ "es" : { "stringUnit" : { "state" : "translated", - "value" : "Hemos perdido el botón \"Actualizar\". ¡Uy!" + "value" : "Hemos perdido el botón “Actualizar”. ¡Uy!" } }, "fr" : { @@ -21299,7 +21619,7 @@ "it" : { "stringUnit" : { "state" : "translated", - "value" : "Abbiamo smarrito il pulsante \"Aggiorna\". Ops!" + "value" : "Abbiamo smarrito il pulsante “Aggiorna”. Ops!" } }, "ja" : { @@ -21335,7 +21655,7 @@ "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Мы поставили кнопку \"Обновить\" не туда. Упс!" + "value" : "Мы поставили кнопку «Обновить» не туда. Упс!" } }, "zh-Hans" : { @@ -24266,79 +24586,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", + "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" : "%@的通知權限目前已被禁用。" } } @@ -24349,31 +24669,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 Réglages Système" + "value" : "Ouvrir Réglages Système" } }, "it" : { @@ -24385,49 +24705,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" : "打開「系統設定」" } } } @@ -24442,85 +24762,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", + "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" : { @@ -24534,12 +24855,6 @@ "value" : "Benachrichtige mich beim freischalten neuer App Icons" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Notify when unlocking new icons" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -24696,91 +25011,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" : "打開「系統設定」" } } } @@ -25140,95 +25449,6 @@ } } }, - "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.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Please include at least one modifier key." - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Please include at least one modifier key." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Please include at least one modifier key." - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Please 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" : "請包括至少一個修飾鍵。" - } - } - } - }, "Position" : { "localizations" : { "ar" : { @@ -25405,444 +25625,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 gesture" : { - "comment" : "Empty state subtitle in gestures settings", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Press \"Add\" to add a gesture" + "value" : "Mission Control unterdrücken" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" + "value" : "Prevent Mission Control at top edge" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Appuyez sur « Ajouter » pour ajouter un geste" - } - }, - "it" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "「追加」を押すと、新しいジェスチャを追加できます。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "pl" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "ru" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add a gesture" - } - } - } - }, - "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" + "value" : "Bloquer Mission Control" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Premi “Aggiungi” per aggiungere una scorciatoia" + "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 toetscombinatie toe te voegen" + "value" : "Mission Control onderdrukken" } }, "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" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Press \"Add\" to add an action" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Appuyez sur « Ajouter » pour ajouter une action" - } - }, - "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ę" + "value" : "Prevent Mission Control at top edge" } }, "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" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "「追加」を押すと、新しいアプリを追加できます。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "애플리케이션을 추가하려면 \"추가\"를 누르세요" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Druk op “Toevoegen” om een applicatie toe te voegen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Naciśnij \"Dodaj\", aby dodać aplikację" - } - }, - "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" : "禁用調度中心手勢" } } } @@ -26024,95 +25885,6 @@ } } }, - "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.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Prioritize selected window’s corner radius" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Eckenradius des gewählten Fensters priorisieren" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Prioritize selected window’s corner radius" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Prioritize selected window’s corner radius" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Prioriser le rayon des coins de la fenêtre sélectionnée" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Dai priorità al raggio degli angoli della finestra" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "選択中のウインドウのコーナーの丸みを優先" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "선택한 창의 모서리 반경 우선" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hoekradius van geselecteerde venster prioriseren" - } - }, - "pl" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Prioritize selected window’s corner radius" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Priorizar raio de canto da janela selecionada" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Установить приоритет скругления для выбранного окна" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "优先使用已选窗口的圆角半径" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "優先使用已選視窗的圓角半徑" - } - } - } - }, "px" : { "comment" : "Unit symbol: pixels", "localizations" : { @@ -26557,31 +26329,108 @@ } } }, - "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.", + "Radius" : { + "comment" : "Label for the preview corner radius slider, inside the “Corner Radius” section", "localizations" : { "ar" : { "stringUnit" : { - "state" : "needs_review", - "value" : "Relaunch to complete" + "state" : "translated", + "value" : "نصف قطر الزاوية" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Neustarten, um abzuschließen" + "value" : "Eckenradius" } }, - "en" : { + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Radio de las esquinas" + } + }, + "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Relaunch to complete" + "value" : "Rayon des coins" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Raggio degli angoli" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "コーナーの丸み" + } + }, + "ko" : { + "stringUnit" : { + "state" : "translated", + "value" : "모서리 반경" + } + }, + "nl-BE" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hoekradius" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Zaokrąglenie rogów" + } + }, + "pt-BR" : { + "stringUnit" : { + "state" : "translated", + "value" : "Raio dos cantos" + } + }, + "ru" : { + "stringUnit" : { + "state" : "translated", + "value" : "Скругление" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "圆角半径" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "圓角半徑" + } + } + } + }, + "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" + } + }, + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Neustarten, um abzuschließen" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Relaunch to complete" + "value" : "Relaunch to Complete" } }, "fr" : { @@ -26735,7 +26584,7 @@ } } }, - "Remind me later" : { + "Remind Me Later" : { "localizations" : { "ar" : { "stringUnit" : { @@ -26749,12 +26598,6 @@ "value" : "Erinnere mich später" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Remind me later" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -27178,267 +27021,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" : "重置…" } } } @@ -27531,7 +27363,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" : { @@ -27545,12 +27378,6 @@ "value" : "Fenster wiederherstellen beim ziehen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Restore window frame on drag" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -28423,86 +28250,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" : "搜尋" } } } @@ -28596,93 +28423,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" : { @@ -28860,95 +28603,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" : { @@ -30007,7 +29661,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" : { @@ -30021,12 +29675,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", @@ -30095,95 +29743,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 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" : "收納時移動焦點" - } - } - } - }, - "Show in dock" : { + "Show in Dock" : { + "comment" : "Toggle that shows Loop’s icon in the Dock.", "localizations" : { "ar" : { "stringUnit" : { @@ -30197,12 +29758,6 @@ "value" : "Im Dock zeigen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show in dock" - } - }, "es" : { "stringUnit" : { "state" : "translated", @@ -30271,94 +29826,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" : { @@ -31513,6 +30980,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" : { @@ -31935,7 +31485,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "\"Stage\" \"Manager\"" + "value" : "Stage Manager" } }, "ru" : { @@ -32046,94 +31596,6 @@ } } }, - "Start hidden" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Start hidden" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Start hidden" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Start hidden" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Start hidden" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Démarrer masqué" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Avvia nascosta" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "起動時に非表示" - } - }, - "ko" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Start hidden" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Start verborgen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Uruchom jako ukryte" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Iniciar oculto" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Запускать скрытым" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "开始隐藏" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "開始隱藏" - } - } - } - }, "Stash" : { "comment" : "Section header in the action picker of the Keybinds tab\nSection header shown in settings\nWindow action", "localizations" : { @@ -32223,183 +31685,9 @@ } } }, - "Supports macOS Tahoe’s Liquid Glass effects" : { - "comment" : "A tooltip that appears when hovering over the icon, explaining its function.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Supports macOS Tahoe’s Liquid Glass effects" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Unterstützt macOS Tahoe’s Liquid Glass Effekte" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Supports macOS Tahoe’s Liquid Glass effects" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Supports macOS Tahoe’s Liquid Glass effects" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Prend en charge les effets Liquid Glass de macOS Tahoe" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Supporta gli effetti Liquid Glass di macOS Tahoe" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "macOS TahoeのLiquid Glass効果に対応" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "macOS Tahoe의 Liquid Glass 효과 지원" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Heeft ondersteuning voor \"MacOS Tahoe Liquid Glass\"-effecten" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wspiera efekt Liquid Glass systemu macOS Tahoe" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Suporta efeitos de Liquid Glass do macOS Tahoe" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Поддерживает эффект жидкого стекла из macOS Tahoe" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "支持macOS Tahoe液态玻璃效果" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "支持macOS Tahoe液態玻璃效果" - } - } - } - }, - "Suppress Mission Control" : { - "comment" : "A toggle that, when enabled, prevents Mission Control from opening when windows are dragged to the top of the screen.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Suppress Mission Control" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mission Control unterdrücken" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Suppress Mission Control" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Suppress Mission Control" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bloquer Mission Control" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ignora Mission Control" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mission Controlを抑制" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mission Control 억제" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mission Control onderdrukken" - } - }, - "pl" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Suppress Mission Control" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Suprimir Controle de Missão" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Игнорировать Mission Control" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "禁用调度中心手势" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "禁用調度中心手勢" - } - } - } + "Style" : { + "comment" : "Section title for the preview background style picker.", + "isCommentAutoGenerated" : true }, "Swipe" : { "comment" : "Gesture category label: swipe", @@ -32846,96 +32134,8 @@ } } }, - "Sync Wallpaper" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "مزامنة خلفية الشاشة" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hintergrundbild synchronisieren" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sync Wallpaper" - } - }, - "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" : "同步牆紙" - } - } - } - }, "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" : { @@ -33023,6 +32223,10 @@ } } }, + "Target window" : { + "comment" : "Label for the target window picker.", + "isCommentAutoGenerated" : true + }, "That keybind is already being used by %@." : { "localizations" : { "ar" : { @@ -33375,183 +32579,6 @@ } } }, - "There are other gestures that conflict with this gesture." : { - "comment" : "Tooltip shown on a conflicting gesture in settings", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ce geste entre en conflit avec d’autres gestes." - } - }, - "it" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "このジェスチャと競合する他のジェスチャがあります。" - } - }, - "ko" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "pl" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "ru" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "There are other gestures that conflict with this gesture." - } - } - } - }, - "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" : { @@ -33907,31 +32934,25 @@ } } }, - "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" : { @@ -33996,31 +33017,25 @@ } } }, - "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" : { @@ -34085,31 +33100,25 @@ } } }, - "Titlebar Only" : { - "comment" : "Gesture activation zone restricted to a window's titlebar", + "Title Bar Only" : { + "comment" : "Gesture activation zone restricted to a window's title bar", "localizations" : { "ar" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "de" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "es" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "fr" : { @@ -34121,7 +33130,7 @@ "it" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "ja" : { @@ -34133,43 +33142,43 @@ "ko" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "nl-BE" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "pl" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "pt-BR" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "ru" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "zh-Hans" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } }, "zh-Hant" : { "stringUnit" : { "state" : "needs_review", - "value" : "Titlebar Only" + "value" : "Title Bar Only" } } } @@ -34973,91 +33982,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" } } } @@ -35239,31 +34242,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" : { @@ -35328,6 +34325,9 @@ } } }, + "Under Cursor" : { + "comment" : "Window selection option: act on the window under the cursor" + }, "Undo" : { "comment" : "Window action", "localizations" : { @@ -35772,95 +34772,6 @@ } } }, - "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.", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Update from: %@" - } - }, - "de" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Update from: %@" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Update from: %@" - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Update from: %@" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Version actuelle : %@" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Aggiorna da: %@" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "現在のバージョン: %@" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "업데이트 대상: %@" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Update van: %@" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Aktualizacja z: %@" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Atualizar da versão: %@" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Обновиться с %@" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "从%@更新" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "自%@更新" - } - } - } - }, "Update…" : { "comment" : "Button to update app in menubar dropdown menu", "localizations" : { @@ -36127,267 +35038,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屏幕中心" } } } @@ -36480,24 +35386,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" : { @@ -36539,7 +35522,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" : { @@ -37013,95 +35996,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 ou non 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" : { @@ -37368,182 +36262,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", @@ -38166,5 +36886,5 @@ } } }, - "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/Settings Window/Loop/AboutConfiguration.swift b/Loop/Settings Window/Loop/AboutConfiguration.swift index ec9d5e0fa..480be45b6 100644 --- a/Loop/Settings Window/Loop/AboutConfiguration.swift +++ b/Loop/Settings Window/Loop/AboutConfiguration.swift @@ -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 be7b4d113..a8da8a108 100644 --- a/Loop/Settings Window/Loop/AdvancedConfiguration.swift +++ b/Loop/Settings Window/Loop/AdvancedConfiguration.swift @@ -140,6 +140,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 @@ -150,40 +159,50 @@ 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) LuminareSlider( @@ -202,7 +221,7 @@ struct AdvancedConfigurationView: View { LuminareSection(String(localized: "Radial Menu", comment: "Section header shown in settings")) { LuminareToggle(isOn: $enableRadialMenuCustomization) { HStack { - Text("Allow radial menu customization") + Text("Customize actions") if enableRadialMenuCustomization { Button { @@ -221,7 +240,7 @@ struct AdvancedConfigurationView: View { isConfirmingResetRadialMenuActions = true } label: { HStack { - Text("Reset radial menu actions") + Text("Reset radial menu actions…") if model.showResetRadialMenuActionsSuccessIndicator { Image(systemName: "checkmark") @@ -235,7 +254,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.") } } } @@ -246,7 +265,7 @@ struct AdvancedConfigurationView: View { LuminareButtonRow { Button(action: model.importPrompt) { HStack { - Text("Import") + Text("Import…") if model.showImportKeybindsSuccessIndicator { Image(systemName: "checkmark") @@ -258,7 +277,7 @@ struct AdvancedConfigurationView: View { Button(action: model.exportPrompt) { HStack { - Text("Export") + Text("Export…") if model.showExportKeybindsSuccessIndicator { Image(systemName: "checkmark") @@ -272,7 +291,7 @@ struct AdvancedConfigurationView: View { isConfirmingResetKeybinds = true } label: { HStack { - Text("Reset") + Text("Reset…") if model.showResetKeybindsSuccessIndicator { Image(systemName: "checkmark") @@ -285,7 +304,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) @@ -307,7 +326,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 7f6590cfa..dbe04934b 100644 --- a/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift +++ b/Loop/Settings Window/Loop/ExcludedAppsConfiguration.swift @@ -38,9 +38,9 @@ struct ExcludedAppsConfigurationView: View { .equatable() } emptyView: { VStack { - Text("No excluded applications") + Text("No excluded apps") .font(.title3) - Text("Press \"Add\" to add an application") + Text("Click “Add” to add an app") .font(.caption) } .foregroundStyle(.secondary) 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 index acf199afa..e73ac7f64 100644 --- a/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift +++ b/Loop/Settings Window/Settings/Gestures/GestureConfigurationView.swift @@ -170,7 +170,7 @@ struct GestureConfigurationView: 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/Gestures/GestureItemView.swift b/Loop/Settings Window/Settings/Gestures/GestureItemView.swift index 94e82871b..47ce8aa8e 100644 --- a/Loop/Settings Window/Settings/Gestures/GestureItemView.swift +++ b/Loop/Settings Window/Settings/Gestures/GestureItemView.swift @@ -93,7 +93,7 @@ struct GestureItemView: View { gestureConfiguration .luminareToolTip(attachedTo: .topTrailing, hidden: !hasConflict) { - Text(String(localized: "There are other gestures that conflict with this gesture.", comment: "Tooltip shown on a conflicting gesture in settings")) + Text(String(localized: "Another gesture is set up the same way.", comment: "Tooltip shown on a conflicting gesture in settings")) .padding(6) } } @@ -209,7 +209,7 @@ struct GestureItemView: View { Image(systemName: "bolt.horizontal.fill") .foregroundStyle(.secondary) - Text("Failed to resolve linked keybind") + Text("Linked keybind not found") .fontWeight(.regular) .lineLimit(1) .foregroundStyle(.secondary) @@ -222,7 +222,7 @@ struct GestureItemView: View { .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")) + .help(String(localized: "Customize this gesture’s action.", comment: "Help text shown when hovering a gesture's action button")) .allowsHitTesting(!opensRadialMenu) .padding(.leading, -4) @@ -251,7 +251,7 @@ struct GestureItemView: View { } } .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")) + .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 { diff --git a/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift b/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift index 13e88ea18..41f30c221 100644 --- a/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift +++ b/Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift @@ -38,7 +38,7 @@ struct GesturesConfigurationView: View { private var settingsSection: some View { LuminareSection { - LuminareToggle(String(localized: "Enable trackpad gestures", comment: "Toggle in gestures settings"), isOn: $enableGestures) + LuminareToggle(String(localized: "Trackpad gestures", comment: "Toggle in gestures settings"), isOn: $enableGestures) } } @@ -74,7 +74,7 @@ struct GesturesConfigurationView: View { VStack { Text(String(localized: "No gestures", comment: "Empty state title in gestures settings")) .font(.title3) - Text(String(localized: "Press \"Add\" to add a gesture", comment: "Empty state subtitle in gestures settings")) + Text(String(localized: "Click “Add” to add a gesture", comment: "Empty state subtitle in gestures settings")) .font(.caption) } .foregroundStyle(.secondary) diff --git a/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift b/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift index 653fd38c4..02683bbc5 100644 --- a/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift +++ b/Loop/Settings Window/Settings/Keybinds/DirectionPickerView.swift @@ -49,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 95f4ac94f..1b419fd20 100644 --- a/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift +++ b/Loop/Settings Window/Settings/Keybinds/Keybind Recorder/Keycorder.swift @@ -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 24374467d..ec267c2d6 100644 --- a/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift +++ b/Loop/Settings Window/Settings/Keybinds/KeybindItemView.swift @@ -118,7 +118,7 @@ struct KeybindItemView: View { .luminareFilledStates([.hovering, .pressed]) .luminareBorderedStates(.hovering) .luminareMinHeight(24) - .help("Customize this keybind's action.") + .help("Customize this keybind’s action.") .padding(.leading, -4) Group { @@ -145,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 { @@ -182,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) diff --git a/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift index 9c260224d..c01060176 100644 --- a/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/KeybindsConfigurationView.swift @@ -71,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", @@ -99,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.") @@ -139,7 +139,7 @@ struct KeybindsConfigurationView: View { VStack { Text("No keybinds") .font(.title3) - Text("Press \"Add\" to add a keybind") + Text("Click “Add” to add a keybind") .font(.caption) } .foregroundStyle(.secondary) diff --git a/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift b/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift index a324f4e64..3d048cee3 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift @@ -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 cfe6c1856..4c4a34904 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/CycleActionConfigurationView.swift @@ -72,7 +72,7 @@ struct CycleActionConfigurationView: View { VStack { Text("Nothing to cycle through") .font(.title3) - Text("Press \"Add\" to add a cycle item") + Text("Click “Add” to add an action") .font(.caption) } .foregroundStyle(.secondary) @@ -86,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 ee1a9333f..5ed039231 100644 --- a/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift +++ b/Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift @@ -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/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 0242614b2..58c356a96 100644 --- a/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift +++ b/Loop/Settings Window/Theming/Radial Menu/RadialMenuActionItemView.swift @@ -142,7 +142,7 @@ struct RadialMenuActionItemView: View { Image(systemName: "bolt.horizontal.fill") .foregroundStyle(.secondary) - Text("Failed to resolve linked keybind") + Text("Linked keybind not found") .fontWeight(.regular) .lineLimit(1) .foregroundStyle(.secondary) @@ -183,7 +183,7 @@ struct RadialMenuActionItemView: View { } } .luminareModalCornerRadius(24) - .help("Customize this action's custom frame.") + .help("Customize this action’s custom frame.") } if resolvedAction.direction == .cycle { 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 67daeeee3..60b63c127 100644 --- a/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift +++ b/Loop/Settings Window/Theming/Radial Menu/RadialMenuConfigurationView.swift @@ -62,7 +62,7 @@ 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(String(localized: "Add", comment: "Used to add items to a list")) { @@ -91,7 +91,7 @@ struct RadialMenuConfigurationView: View { VStack { Text("No radial menu actions") .font(.title3) - Text("Press \"Add\" to add an action") + Text("Click “Add” to add an action") .font(.caption) } .foregroundStyle(.secondary) diff --git a/Loop/Updater/UpdateInstaller.swift b/Loop/Updater/UpdateInstaller.swift index 718168043..1af8cc5ae 100644 --- a/Loop/Updater/UpdateInstaller.swift +++ b/Loop/Updater/UpdateInstaller.swift @@ -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/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 0ec42662a..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) { 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/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 Management/Window Action/GestureBinding.swift b/Loop/Window Management/Window Action/GestureBinding.swift index 61c774b19..84addb8a6 100644 --- a/Loop/Window Management/Window Action/GestureBinding.swift +++ b/Loop/Window Management/Window Action/GestureBinding.swift @@ -99,7 +99,7 @@ struct GestureBinding: Identifiable, Codable, Hashable, Defaults.Serializable { var displayName: String { switch self { - case .titlebar: String(localized: "Titlebar Only", comment: "Gesture activation zone restricted to a window's titlebar") + 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") } } 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 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 } From 995b1bdabde591526527819921f0f4656c1e2570 Mon Sep 17 00:00:00 2001 From: Anand Hegde Date: Mon, 5 Oct 2026 22:36:28 +0530 Subject: [PATCH 11/13] =?UTF-8?q?=E2=9C=A8Next/previous=20screen=20order?= =?UTF-8?q?=20setting:=20Z-shaped,=20clockwise=20or=20counterclockwise=20(?= =?UTF-8?q?#1156)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kai Azim --- .../Contents.json | 12 + .../arrow.trianglehead.swap.rotated.svg | 89 +++++ Loop/Extensions/Defaults+Extensions.swift | 2 + Loop/Localizable.xcstrings | 9 + .../Loop/AdvancedConfiguration.swift | 9 + Loop/Utilities/ScreenOrder.swift | 343 ++++++++++++++++++ Loop/Utilities/ScreenUtility.swift | 13 +- LoopTests/ScreenOrderTests.swift | 268 ++++++++++++++ 8 files changed, 734 insertions(+), 11 deletions(-) create mode 100644 Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/Contents.json create mode 100644 Loop/Assets.xcassets/arrow.trianglehead.swap.rotated.symbolset/arrow.trianglehead.swap.rotated.svg create mode 100644 Loop/Utilities/ScreenOrder.swift create mode 100644 LoopTests/ScreenOrderTests.swift 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/Extensions/Defaults+Extensions.swift b/Loop/Extensions/Defaults+Extensions.swift index e67de8472..daf2adeb4 100644 --- a/Loop/Extensions/Defaults+Extensions.swift +++ b/Loop/Extensions/Defaults+Extensions.swift @@ -82,6 +82,7 @@ extension Defaults.Keys { static let hapticFeedback = Defaults.Key("hapticFeedback", default: true) static let enableRadialMenuCustomization = Defaults.Key("enableRadialMenuCustomization", default: false) static let sizeIncrement = Key("sizeIncrement", default: 20) + static let screenOrder = Key("screenOrder", default: .zShaped) /// Excluded apps static let excludedApps = Key<[URL]>("excludedApps", default: []) @@ -284,6 +285,7 @@ enum DefaultsiCloudSyncRegistrar { Defaults.iCloud.add(.hapticFeedback) Defaults.iCloud.add(.enableRadialMenuCustomization) Defaults.iCloud.add(.sizeIncrement) + Defaults.iCloud.add(.screenOrder) Defaults.iCloud.add(.excludedApps) } diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index 9eb3c0a0e..4777ec6bc 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -4799,6 +4799,9 @@ } } }, + "Clockwise" : { + "comment" : "Name of the screen order that walks around the screen arrangement clockwise" + }, "Color" : { "comment" : "Section header shown in settings", "localizations" : { @@ -20002,6 +20005,9 @@ } } }, + "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" : { @@ -36884,6 +36890,9 @@ } } } + }, + "Z-shaped" : { + "comment" : "Name of the screen order that walks the screens row by row, like reading a page" } }, "version" : "1.1" diff --git a/Loop/Settings Window/Loop/AdvancedConfiguration.swift b/Loop/Settings Window/Loop/AdvancedConfiguration.swift index a8da8a108..ef3c2583c 100644 --- a/Loop/Settings Window/Loop/AdvancedConfiguration.swift +++ b/Loop/Settings Window/Loop/AdvancedConfiguration.swift @@ -132,6 +132,7 @@ struct AdvancedConfigurationView: View { @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 @@ -205,6 +206,14 @@ struct AdvancedConfigurationView: View { 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, 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/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) + } + } + } +} From da454681ffa57eeffd59e520d3a4730071dea363 Mon Sep 17 00:00:00 2001 From: Marcin Wisniewski <78590652+itsNotMyUsername@users.noreply.github.com> Date: Thu, 8 Oct 2026 12:57:42 +0200 Subject: [PATCH 12/13] =?UTF-8?q?=E2=9C=A8=20Make=20the=20update=20check?= =?UTF-8?q?=20interval=20a=20hidden=20setting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- Loop/Extensions/Defaults+Extensions.swift | 6 ++++++ Loop/Updater/Updater.swift | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Loop/Extensions/Defaults+Extensions.swift b/Loop/Extensions/Defaults+Extensions.swift index 808451dfc..e371fe252 100644 --- a/Loop/Extensions/Defaults+Extensions.swift +++ b/Loop/Extensions/Defaults+Extensions.swift @@ -125,6 +125,12 @@ extension Defaults.Keys { /// 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` diff --git a/Loop/Updater/Updater.swift b/Loop/Updater/Updater.swift index 3eb147992..c94b9d892 100755 --- a/Loop/Updater/Updater.swift +++ b/Loop/Updater/Updater.swift @@ -123,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() } From c96d44e08f44f41b2644a370d1ee1a83fec19705 Mon Sep 17 00:00:00 2001 From: Marcin Wisniewski <78590652+itsNotMyUsername@users.noreply.github.com> Date: Wed, 4 Nov 2026 13:51:18 +0100 Subject: [PATCH 13/13] =?UTF-8?q?=E2=9C=A8=20Add=202/3=20and=203/4=20cente?= =?UTF-8?q?red=20steps=20to=20the=20Center=20Cycle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trigger + left + right now cycles a full-height centered window through 1/3, 1/2, 2/3 and 3/4 of the screen width. Co-Authored-By: Claude Opus 5.5 --- .../Window Action/WindowAction+Defaults.swift | 29 ++++++++++++++++++- tools/apply-loop-config.sh | 3 +- 2 files changed, 30 insertions(+), 2 deletions(-) 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/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 -------------------------------------------