Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071public enum TourReadyCheck: Equatable, Sendable { case ready, checking, permissionMissing, permissionUnknown, stageManager, configuration, targetChanged, unavailable
public var statusLabel: String { switch self { case .ready: TourText.text("Ready to start") case .checking: TourText.text("Checking setup…") case .permissionMissing: TourText.text("Accessibility is off.") case .permissionUnknown: TourText.text("Parcel couldn’t check Accessibility access.") case .stageManager: TourText.text("Turn off Stage Manager to arrange this screen.") case .configuration: TourText.text("Parcel couldn’t load your settings.") case .targetChanged: TourText.text("Your screen changed. Check setup and try again.") case .unavailable: TourText.text("Parcel couldn’t check setup. Try again.") } }}
public enum TourStartResult: Equatable, Sendable { case success case partial(details: [String]) case failedBeforeWrite(details: [String]) case restored(details: [String]) case recoveryRequired(details: [String]) case progressSaveFailed case manualSaveFailed
public var completed: Bool { switch self { case .success, .partial: true default: false } }
public var permitsRetry: Bool { if case .recoveryRequired = self { return false } return self != .success }
public var details: [String] { switch self { case .partial(let details), .failedBeforeWrite(let details), .restored(let details), .recoveryRequired(let details): // Arrangement and recovery can report the same unsettled windows. var seen: Set<String> = [] return details.filter { seen.insert($0).inserted } default: return [] } }
public var title: String { switch self { case .success: TourText.text("Automatic tiling is on.") case .partial: TourText.text("Some windows couldn’t be arranged.") case .failedBeforeWrite: TourText.text("Parcel couldn’t arrange your windows.") case .restored: TourText.text("Your windows are back where they were.") case .recoveryRequired: TourText.text("Some windows may have moved.") case .progressSaveFailed: TourText.text("Parcel couldn’t save setup progress.") case .manualSaveFailed: TourText.text("Parcel couldn’t finish setup. Your windows haven’t moved.") } }
public var message: String? { switch self { case .success, .progressSaveFailed, .manualSaveFailed: nil case .partial: TourText.text("Automatic tiling is on for the windows Parcel can arrange.") case .failedBeforeWrite: TourText.text("Your windows haven’t moved. Automatic tiling is off.") case .restored, .recoveryRequired: TourText.text("Automatic tiling is off.") } }}