How mrkai77/loop works
Loop is a macOS window-management app. Users trigger actions with a keybind, mouse gesture, radial menu, or URL command; Loop resolves the target window and action, then applies the requested layout or movement. The README also documents previews, cycles, stashing, and extensive customization. The graph follows documented capabilities and sampled call sites; unsampled subsystem internals are represented only where their paths are present in the tree, and uncertain wiring is omitted.
Main entry points: LoopManager.swift App coordinator · WindowActionEngine.swift Action dispatcher · StashManager.swift Stash manager · Window.swift Window access
Components 23
Inputs and runtime
- URL commands
Loop/Core/URLCommandHandler.swift - App coordinator
Loop/Core/LoopManager.swift - Input triggers
Loop/Core/Observers/KeybindTrigger.swift - Mouse observer
Loop/Core/Observers/MouseInteractionObserver.swift - Accessibility access
Loop/Utilities/AccessibilityManager.swift
Window actions
- Action definitions
Loop/Window Management/Window Action/WindowAction.swift - Cycle actions
Loop/Window Management/Window Action/CycleActionCoordinator.swift - Action dispatcher
Loop/Window Management/Window Manipulation/WindowActionEngine.swift - Window layout engine
Loop/Window Management/Window Manipulation/WindowEngine.swift - Window access
Loop/Window Management/Window/Window.swift - Drag snapping
Loop/Core/WindowDragManager.swift
Workspace features
- Radial menu
Loop/Window Action Indicators/Radial Menu/RadialMenuController.swift - Action preview
Loop/Window Action Indicators/Preview Window/PreviewController.swift - Stash manager
Loop/Stashing/StashManager.swift - Stashed windows
Loop/Stashing/StashedWindowStore.swift
Settings and appearance
- Settings UI
Loop/Settings Window/SettingsWindowManager.swift - Accent colors
Loop/Accent Color/AccentColorController.swift - Wallpaper analysis
Loop/Accent Color/WallpaperProcessor.swift
Updates
- Update workflow
Loop/Updater/Updater.swift - Update interface
Loop/Updater/Views/UpdateView.swift - Privileged installer
LoopUpdaterHelper/PrivilegedInstallerService.swift
Other components
- User
- macOS windows
Connections 30
- User → Input triggers: presses keys
- User → Mouse observer: moves cursor
- User → URL commands: opens command
- Input triggers → App coordinator: dispatches input
- Mouse observer → App coordinator: dispatches input
- URL commands → App coordinator: dispatches command
- App coordinator → Action definitions: resolves action
- App coordinator → Action dispatcher: applies action
- App coordinator → Radial menu: presents menu
- App coordinator → Action preview: presents preview
- App coordinator → Cycle actions: coordinates cycles
- Cycle actions → Action dispatcher: applies cycle step
- Radial menu → App coordinator: selects direction
- Action dispatcher → Window layout engine: routes resize
- Action dispatcher → Window access: targets window
- Window layout engine → Window access: resizes window
- Window access → macOS windows: reads and sets frames
- User → Drag snapping: drags window
- Drag snapping → Action dispatcher: applies snap
- Window layout engine → Stash manager: notifies resize
- Drag snapping → Stash manager: notifies manipulation
- Stash manager → Stashed windows: reads and updates
- Stash manager → Window access: moves stashed window
- User → Settings UI: configures features
- Settings UI → Accent colors: sets color preferences
- Accent colors → Wallpaper analysis: fetches colors
- Accessibility access → macOS windows: checks permission
- User → Update interface: reviews update
- Update interface → Update workflow: requests update
- Update workflow → Privileged installer: requests installation