How domkeq/macos-window-previews works
WindowBar is a native macOS taskbar and Dock-hover companion. The user enables it from the menu-bar app, sees running-app icons, activates apps, and can inspect an app’s windows in a popover; selecting a window attempts focused activation. Dock hover uses Accessibility to identify a standard Dock item and show its window popover. Accessibility window listing/focusing and Screen Recording thumbnails are permission-gated, with thumbnail capture also controlled by a preference. Relationships follow the shown excerpts and SOURCE INDEX references; unsampled implementations are represented only where README or index evidence supports them.
Main entry points: TaskbarModel.swift Taskbar model · DockHoverController.swift Dock hover controller · StatusItemController.swift Menu-bar controls · AppDelegate.swift Lifecycle assembly
Components 25
App host
- App entry
Sources/WindowBar/main.swift - Lifecycle assembly
Sources/WindowBar/AppHost/AppDelegate.swift - Menu-bar controls
Sources/WindowBar/AppHost/StatusItemController.swift
Taskbar UI
- Taskbar model
Sources/WindowBar/Taskbar/TaskbarModel.swift - Floating panel
Sources/WindowBar/Taskbar/TaskbarWindowController.swift - App icon strip
Sources/WindowBar/Taskbar/TaskbarViewController.swift - App icon item
Sources/WindowBar/Taskbar/TaskbarAppItemView.swift - Window popover
Sources/WindowBar/Taskbar/WindowListPopoverPresenter.swift - Window cards
Sources/WindowBar/Taskbar/WindowListViewController.swift - Preview card
Sources/WindowBar/Taskbar/WindowPreviewCardView.swift
Dock companion
- Dock hover controller
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock item resolver
Sources/WindowBar/DockIntegration/DockItemResolver.swift - Hover state machine
Sources/WindowBarCore/DockHoverStateMachine.swift
Window services
- Running apps
Sources/WindowBar/Windowing/NSWorkspaceRunningApplicationProvider.swift - Window repository
Sources/WindowBar/Windowing/CompositeWindowRepository.swift - Accessibility listing
Sources/WindowBar/Windowing/AccessibilityWindowRepository.swift - Core Graphics listing
Sources/WindowBar/Windowing/CoreGraphicsWindowRepository.swift - Window activation
Sources/WindowBar/Windowing/AccessibilityWindowActivator.swift - Window identity matcher
Sources/WindowBarCore/WindowIdentityMatcher.swift - Thumbnail provider
Sources/WindowBar/Windowing/CoreGraphicsWindowPreviewProvider.swift
Permissions and settings
- OS permission monitor
Sources/WindowBar/Permissions/SystemPermissionMonitor.swift - Preview preference
Sources/WindowBar/Preferences/WindowBarPreferences.swift - Permission feature gate
Sources/WindowBarCore/PermissionFeatureResolver.swift - Diagnostics logger
Sources/WindowBar/Diagnostics/WindowBarLogger.swift
Other components
- User
Connections 38
- User → Menu-bar controls: configures
Sources/WindowBar/AppHost/StatusItemController.swift - App entry → Lifecycle assembly: launches
Sources/WindowBar/main.swift - Lifecycle assembly → Menu-bar controls: creates
Sources/WindowBar/AppHost/AppDelegate.swift - Lifecycle assembly → Taskbar model: creates
Sources/WindowBar/AppHost/AppDelegate.swift - Lifecycle assembly → Floating panel: creates
Sources/WindowBar/AppHost/AppDelegate.swift - Lifecycle assembly → Dock hover controller: creates
Sources/WindowBar/AppHost/AppDelegate.swift - Menu-bar controls → Taskbar model: reloads
Sources/WindowBar/AppHost/StatusItemController.swift - Menu-bar controls → OS permission monitor: requests access
Sources/WindowBar/AppHost/StatusItemController.swift - Menu-bar controls → Preview preference: toggles
Sources/WindowBar/AppHost/StatusItemController.swift - Menu-bar controls → Permission feature gate: checks eligibility
Sources/WindowBar/AppHost/StatusItemController.swift - Floating panel → App icon strip: hosts
Sources/WindowBar/Taskbar/TaskbarWindowController.swift - App icon strip → Taskbar model: observes and acts
Sources/WindowBar/Taskbar/TaskbarViewController.swift - App icon strip → App icon item: renders
Sources/WindowBar/Taskbar/TaskbarViewController.swift - App icon strip → Window popover: presents
Sources/WindowBar/Taskbar/TaskbarViewController.swift - Window popover → Taskbar model: requests previews
Sources/WindowBar/Taskbar/WindowListPopoverPresenter.swift - Window popover → Window cards: presents
Sources/WindowBar/Taskbar/WindowListPopoverPresenter.swift - Window cards → Preview card: renders
Sources/WindowBar/Taskbar/WindowListViewController.swift - Window cards → Taskbar model: loads thumbnails
Sources/WindowBar/Taskbar/WindowListViewController.swift - Taskbar model → Running apps: discovers
Sources/WindowBar/Taskbar/TaskbarModel.swift - Taskbar model → Window repository: lists windows
Sources/WindowBar/Taskbar/TaskbarModel.swift - Taskbar model → Window activation: activates window
Sources/WindowBar/Taskbar/TaskbarModel.swift - Taskbar model → Thumbnail provider: gets thumbnails
Sources/WindowBar/Taskbar/TaskbarModel.swift - Taskbar model → OS permission monitor: reads status
Sources/WindowBar/Taskbar/TaskbarModel.swift - Taskbar model → Diagnostics logger: logs failures
Sources/WindowBar/Taskbar/TaskbarModel.swift - Dock hover controller → OS permission monitor: checks trust
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock hover controller → Dock item resolver: resolves pointer
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock hover controller → Hover state machine: dispatches events
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock hover controller → Taskbar model: gets apps and windows
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock hover controller → Window popover: shows overlay
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock hover controller → Diagnostics logger: logs activity
Sources/WindowBar/DockIntegration/DockHoverController.swift - Dock item resolver → Running apps: matches candidates
Sources/WindowBar/DockIntegration/DockItemResolver.swift - Window repository → Accessibility listing: combines listings
Sources/WindowBar/Windowing/CompositeWindowRepository.swift - Window repository → Core Graphics listing: combines listings
Sources/WindowBar/Windowing/CompositeWindowRepository.swift - Window repository → Window identity matcher: matches identities
Sources/WindowBar/Windowing/CompositeWindowRepository.swift - Window activation → OS permission monitor: checks trust
Sources/WindowBar/Windowing/AccessibilityWindowActivator.swift - Window activation → Window identity matcher: matches target
Sources/WindowBar/Windowing/AccessibilityWindowActivator.swift - Thumbnail provider → OS permission monitor: checks capture access
Sources/WindowBar/Windowing/CoreGraphicsWindowPreviewProvider.swift - Thumbnail provider → Preview preference: checks preview toggle
Sources/WindowBar/Windowing/CoreGraphicsWindowPreviewProvider.swift