Tags: hytfjwr/statusbar-plugin-aerospace
Tags
build(deps): bump github.com/hytfjwr/statusbarkit from 1.6.0 to 1.10.0 ( #13) Bumps [github.com/hytfjwr/statusbarkit](https://github.com/hytfjwr/StatusBarKit) from 1.6.0 to 1.10.0. - [Release notes](https://github.com/hytfjwr/StatusBarKit/releases) - [Commits](hytfjwr/StatusBarKit@v1.6.0...v1.10.0) --- updated-dependencies: - dependency-name: github.com/hytfjwr/statusbarkit dependency-version: 1.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
perf: optimize workspace updates and fix trigger command (#11) * refactor: remove redundant focused workspace CLI call from fetchWorkspaces Split fetchFocusedWorkspace() into its own method (called once at startup) and simplified fetchWorkspaces() to only run list-windows. Also replaced O(n²) app dedup (Array.contains) with Set-based O(1) lookup while preserving insertion order. * perf: eliminate unnecessary CLI calls on workspace switch - handleEvent: toggle isFocused in-place without CLI fetch when the target workspace is already in the list; fall back to full fetch only for unknown/empty workspaces - Handle both .string and .number payloads from JSONValue.parse (numeric workspace names like "2" are decoded as .number(2.0)) - start(): run fetchFocusedWorkspace and fetchWorkspaces concurrently with async let instead of sequentially - App lifecycle: remove redundant immediate fetch on launch/terminate, keep only the delayed update that waits for AeroSpace to settle - Extract applyWorkspaceData() to share data-application logic between start() and update() * docs: fix sbar trigger command syntax in README Remove non-existent --event flag from the example aerospace.toml configuration. The event name is a positional argument, not an option.
fix: improve responsiveness of workspace updates on app events (#8) * fix: improve responsiveness of workspace updates on app events The event-driven refactor (5f0438e) introduced a 60-second fallback timer but the NSWorkspace notifications alone were insufficient: - didLaunchApplication fires before AeroSpace registers the window, so the immediate re-query returns stale data - App activation and macOS space changes were not observed at all Add didActivateApplicationNotification and activeSpaceDidChangeNotification observers for immediate response to app switches and space transitions. Add a 2-second delayed follow-up after launch/terminate events to catch windows that AeroSpace registers after the initial notification. * refactor: make delayed update cancellable and clean up on stop - Track scheduleDelayedUpdate via a DispatchWorkItem so rapid lifecycle events collapse into a single delayed re-query and stop() cancels it - Trim redundant doc comment on scheduleDelayedUpdate (rationale already on launchSettleDelay constant)
feat: add background color to active workspace (#7) The focused workspace was only distinguished by brighter text color, which was hard to notice. Add a colored background (opacity 0.35) to the active workspace item so it stands out clearly. Also add a configurable "Active Background" color picker in the settings UI, stored as a hex string and defaulting to #007AFF.
refactor: replace polling with event-driven updates (#6) Switch from a timer-based polling model (every 5–30s) to an event-driven approach using NSWorkspace notifications for app launch/terminate events and file-system monitoring for workspace focus changes. A 60-second fallback timer is retained as a safety net for events that cannot be observed (e.g. window moves between workspaces). Key changes: - Add NSWorkspace.didLaunchApplicationNotification and didTerminateApplicationNotification observers for immediate update on app lifecycle events - Add debounce (300ms via DispatchWorkItem) to coalesce rapid events into a single CLI fetch - Demote the timer from primary update mechanism to a 60-second fallback, routed through the same debounce path - Replace Combine Timer.publish pipelines with lightweight DispatchSource/DispatchWorkItem (removes Combine import) - Guard @observable property assignments with equality checks to avoid unnecessary SwiftUI re-renders on no-op polls - Add Equatable conformance to WorkspaceInfo - Remove updateInterval from WorkspaceSettings and the settings UI