MrKai77/Loop
Window management made elegant.
Mixed signals — read the receipts
worst of 4 axescopyleft license (GPL-3.0) — review compatibility; no tests detected
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 1d ago
- ✓10 active contributors
- ✓GPL-3.0 licensed
Show 4 more →Show less
- ✓CI configured
- ⚠Concentrated ownership — top contributor handles 78% of recent commits
- ⚠GPL-3.0 is copyleft — check downstream compatibility
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Concerns → Mixed if: relicense under MIT/Apache-2.0 (rare for established libs)
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/mrkai77/loop)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/mrkai77/loop on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: MrKai77/Loop
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/MrKai77/Loop shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Mixed signals — read the receipts
- Last commit 1d ago
- 10 active contributors
- GPL-3.0 licensed
- CI configured
- ⚠ Concentrated ownership — top contributor handles 78% of recent commits
- ⚠ GPL-3.0 is copyleft — check downstream compatibility
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live MrKai77/Loop
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/MrKai77/Loop.
What it runs against: a local clone of MrKai77/Loop — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in MrKai77/Loop | Confirms the artifact applies here, not a fork |
| 2 | License is still GPL-3.0 | Catches relicense before you depend on it |
| 3 | Default branch develop exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 31 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of MrKai77/Loop. If you don't
# have one yet, run these first:
#
# git clone https://github.com/MrKai77/Loop.git
# cd Loop
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of MrKai77/Loop and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "MrKai77/Loop(\\.git)?\\b" \\
&& ok "origin remote is MrKai77/Loop" \\
|| miss "origin remote is not MrKai77/Loop (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(GPL-3\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"GPL-3\\.0\"" package.json 2>/dev/null) \\
&& ok "license is GPL-3.0" \\
|| miss "license drift — was GPL-3.0 at generation time"
# 3. Default branch
git rev-parse --verify develop >/dev/null 2>&1 \\
&& ok "default branch develop exists" \\
|| miss "default branch develop no longer exists"
# 4. Critical files exist
test -f "Loop/App/LoopApp.swift" \\
&& ok "Loop/App/LoopApp.swift" \\
|| miss "missing critical file: Loop/App/LoopApp.swift"
test -f "Loop/App/AppDelegate.swift" \\
&& ok "Loop/App/AppDelegate.swift" \\
|| miss "missing critical file: Loop/App/AppDelegate.swift"
test -f "Loop/Accent Color/AccentColorController.swift" \\
&& ok "Loop/Accent Color/AccentColorController.swift" \\
|| miss "missing critical file: Loop/Accent Color/AccentColorController.swift"
test -f ".github/workflows/dev-build.yml" \\
&& ok ".github/workflows/dev-build.yml" \\
|| miss "missing critical file: .github/workflows/dev-build.yml"
test -f "Loop.xcodeproj/project.pbxproj" \\
&& ok "Loop.xcodeproj/project.pbxproj" \\
|| miss "missing critical file: Loop.xcodeproj/project.pbxproj"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 31 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~1d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/MrKai77/Loop"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Loop is a macOS window management application written in Swift that provides an elegant radial menu UI for manipulating windows. Users trigger keyboard shortcuts to open a radial menu where they move the cursor in cardinal/diagonal directions to snap, resize, and position windows, with real-time preview support before committing changes. It eliminates tedious manual dragging and supports customization via accent colors, keybindings, and reusable window manipulation cycles. Modular feature-based structure: Loop/App/ contains lifecycle management (AppDelegate, LaunchAtLoginManager, DataPatcher); Loop/Accent\ Color/ handles UI theming (WallpaperProcessor, AccentColorController); remaining features are domain-driven folders. SwiftUI likely used given .xcassets organization and modern macOS 13+ target. No monorepo—single-target Xcode project at the root.
👥Who it's for
macOS users (13+) and power users who spend significant time managing multiple windows and want keyboard-driven or gesture-based window tiling without the complexity of full tiling window managers. Also contributors interested in Swift UI development and accessibility features on macOS.
🌱Maturity & risk
Actively maintained and used, with a healthy community presence (Discord link in README suggests active user base) and CI/CD pipelines (.github/workflows for linting and dev builds). The project uses Swift exclusively with organized folder structure, suggesting solid foundational architecture. Not yet versioned or marked stable in visible release channels, but appears production-ready for the macOS 13+ target audience.
Single maintainer (MrKai77) creates concentration risk. No visible test suite in file listing (no Tests/ directory), raising concerns about regression coverage. Localization via Crowdin suggests international scope but external dependency on a third-party service. No explicit breaking-change log visible, though the DataPatcher.swift suggests schema migrations are managed.
Active areas of work
Crowdin localization workflows are active (crowdin-download.yml, crowdin-upload.yml), indicating ongoing i18n support. The project accepts feature requests via GitHub issues (.github/ISSUE_TEMPLATE/feature-request.yml) and has structured dev-build, lint, and PR template workflows. Recent additions suggest focus on polish (icon suggestions template) and community engagement.
🚀Get running
Clone: git clone https://github.com/MrKai77/Loop.git. Open Loop.xcodeproj in Xcode 15+ (Swift codebase). No package manager config visible in file list—use Xcode's native build system. Run via Xcode scheme 'Loop' or 'Loop (GH ACTIONS)' for local testing.
Daily commands:
- Open Loop.xcodeproj in Xcode. 2. Select the 'Loop' scheme. 3. Press Cmd+R to build and run. For GitHub Actions testing:
xcodebuild -scheme 'Loop (GH ACTIONS)' -configuration Debug(see .github/workflows/dev-build.yml). The app launches as a menu-bar utility.
🗺️Map of the codebase
Loop/App/LoopApp.swift— Main SwiftUI app entry point defining the app lifecycle, menu bar integration, and keyboard shortcut system for window managementLoop/App/AppDelegate.swift— AppDelegate managing menu bar icon, accessibility permissions, and global event handling for the window management systemLoop/Accent Color/AccentColorController.swift— Core controller managing the radial menu UI state, color themes, and accent color persistence across app sessions.github/workflows/dev-build.yml— CI/CD pipeline defining build, code lint, and release automation for contributors submitting changesLoop.xcodeproj/project.pbxproj— Xcode project configuration defining build targets, dependencies, signing, and code organization for the macOS app
🧩Components & responsibilities
- AppDelegate (AppKit, NSApplication, NSMenu, AXUIElement, Event monitoring) — Manages app lifecycle, menu bar icon state, global keyboard event capture, and accessibility API dispatch
- Failure mode: If permissions revoked, window operations fail silently; if global shortcut unregistered, menu won't trigger
- LoopApp (SwiftUI root) (SwiftUI, @main, keyboardShortcut modifier) — Coordinates SwiftUI scene lifecycle, binds keyboard shortcuts, manages radial menu presentation state
- Failure mode: If SwiftUI scene crashes, entire app closes; if state lost, menu disappears until restart
🛠️How to make changes
Add a new app icon theme variant
- Create a new icon asset folder in Loop/Assets.xcassets/App Icons/ named AppIcon-YourThemeName.appiconset (
Loop/Assets.xcassets/App Icons/AppIcon-Neon.appiconset) - Add icon images in all required sizes (16, 32, 64, 128, 256, 512, 1024) to the new folder (
Loop/Assets.xcassets/App Icons/AppIcon-Neon.appiconset/appicon_1024.png) - Create a Contents.json file in the new folder following the same structure as existing icon sets (
Loop/Assets.xcassets/App Icons/AppIcon-Neon.appiconset/Contents.json) - Register the new theme in AccentColorOption.swift by adding it to the color preset definitions (
Loop/Accent Color/AccentColorOption.swift)
Add a new accent color theme
- Define the new color in AccentColorOption.swift as a new case in the theme enum (
Loop/Accent Color/AccentColorOption.swift) - Configure the RGB or dynamic color values for the new theme option (
Loop/Accent Color/AccentColorOption.swift) - Update AccentColorController.swift to handle the new theme in color derivation logic (
Loop/Accent Color/AccentColorController.swift) - Test the color display in the radial menu by running the app and selecting the new theme from settings (
Loop/App/LoopApp.swift)
Modify keyboard shortcut trigger for window management
- Locate the keyboard event handler in AppDelegate.swift where global shortcuts are registered (
Loop/App/AppDelegate.swift) - Update the key combination and modifier detection logic (e.g., change from Cmd+Space to Ctrl+Space) (
Loop/App/AppDelegate.swift) - Bind the new shortcut in LoopApp.swift using SwiftUI's @available(macOS 14, *) keyboardShortcut modifier (
Loop/App/LoopApp.swift) - Test the new shortcut by building and running the app, confirming the radial menu triggers correctly (
Loop.xcodeproj/project.pbxproj)
🔧Why these technologies
- SwiftUI — Modern declarative UI framework for macOS 13+ supporting real-time theme updates and accessibility bindings
- AppKit/NSWindowController — Required for low-level macOS window manipulation, accessibility API integration, and menu bar icon management
- Accessibility API (AXUIElement) — Only mechanism to move/resize windows and detect active window without requiring root or assistive device trust
- Swift Concurrency (async/await) — Safe background color extraction and wallpaper processing without blocking main UI thread
- UserDefaults — Lightweight persistent storage for user theme preferences, launch-at-login state, and keyboard shortcut bindings
⚖️Trade-offs already made
-
Accessibility API for window manipulation instead of creating a daemon service
- Why: Accessibility API is the only public macOS API for arbitrary window resizing without root; daemon would require more complex IPC
- Consequence: Users must grant accessibility permissions once; window operations depend on macOS Accessibility framework stability
-
Radial menu as overlay UI rather than separate floating window
- Why: Single-window overlay reduces complexity and prevents menu from being lost behind other windows
- Consequence: Menu is tightly coupled to main app lifecycle; less flexible for multi-screen positioning
-
Dynamic color extraction from wallpaper vs. user-curated color palette only
- Why: Wallpaper extraction provides automatic theme cohesion; user presets provide consistency
- Consequence: Wallpaper processing adds startup latency; extraction can fail on non-standard wallpapers
-
Menu bar icon application rather than system-level preference pane
- Why: Menu bar app is simpler to distribute, update, and control than a system preference plugin
- Consequence: Settings are not in System Preferences; requires custom settings UI in the app
🚫Non-goals (don't propose these)
- Linux or Windows support (macOS-only window management via Accessibility API)
- Virtual desktop / Space management (only physical monitor window snapping)
- Tiling window manager with automatic layout (manual drag-based positioning only)
- Window grouping or tabbing (independent window management only)
- Application-specific window rules or context-aware automation
- Multi-user or network-based window sync
🪤Traps & gotchas
No visible SPM package dependencies mean all functionality is custom or Apple framework-only—be aware that common macOS utilities (e.g., window snapping, event monitoring) require direct AppKit/CoreGraphics coding with potential macOS version quirks. DataPatcher.swift suggests a migration system; understand the versioning scheme before modifying data structures. Accent color extraction (WallpaperProcessor) depends on system wallpaper availability—handle nil gracefully. Menu-bar app status requires NSStatusBar integration, likely hidden in AppDelegate. No obvious test infrastructure means manual testing is the primary validation. Crowdin integration requires specific secret management in CI (see crowdin.yml).
🏗️Architecture
💡Concepts to learn
- Radial Menu / Pie Menu — Core interaction pattern in Loop—understanding radial menu UX design principles (distance, angle quantization, visual feedback) is essential to contribute to the menu logic
- Window Snapping / Window Tiling — Loop's primary function; knowing how modern window managers snap and tile windows (edge detection, size grids, preview rendering) informs feature design
- AppKit Event Monitoring & Accessibility APIs — Loop must intercept global keyboard events and window focus changes; understanding NSEvent and AXUIElement is mandatory for window manipulation logic
- macOS Menu Bar / NSStatusBar — Loop runs as a menu-bar utility; NSStatusBar management and persistent background app architecture are central to the UX model
- Dynamic Theming via Dominant Color Extraction — WallpaperProcessor extracts dominant colors from system wallpaper for auto-theming; color space conversion and image processing are non-trivial on macOS
- Data Migration & Versioning (DataPatcher Pattern) — Loop uses DataPatcher.swift to manage schema changes across updates; understanding this pattern prevents data loss and ensures backward compatibility
- Internationalization (i18n) via Crowdin — Loop integrates Crowdin for community translations; understanding the localization workflow (.github workflows) is needed to add new user-facing strings
🔗Related repos
koekeishiya/yabai— Industry-standard tiling window manager for macOS; Loop is a user-friendly alternative with radial menu UX instead of vim-like keybindingsnickm980/windowmagnet— Similar window snapping utility for macOS; smaller scope but solves the same core problem with different interaction paradigmianyh/Amethyst— Another macOS tiling window manager; Loop borrows the 'elegant' positioning concept but via GUI radial menu rather than automatic tilingapple/swift-foundation— Upstream Swift foundation APIs used throughout Loop for AppKit, Notifications, and data persistencecrowdin/mobile-sdk-macos— Loop integrates Crowdin for localization; this SDK or docs clarify the CI/CD workflow in crowdin.yml
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add unit tests for WallpaperProcessor and WallpaperImageFetcher
The accent color system has image processing logic in Loop/Accent Color/WallpaperProcessor.swift and Loop/Accent Color/WallpaperImageFetcher.swift, but there are no visible test files for these critical components. Adding tests would ensure the accent color extraction from wallpapers is reliable across different image types and edge cases, preventing regressions as the feature evolves.
- [ ] Create Loop/Accent Color/Tests/ directory structure
- [ ] Write unit tests for WallpaperProcessor.swift covering image processing edge cases
- [ ] Write unit tests for WallpaperImageFetcher.swift covering fetch failures and invalid images
- [ ] Add test target to Loop.xcodeproj/project.pbxproj
- [ ] Integrate tests into the existing lint.yml or create a new test.yml workflow
Implement GitHub Actions workflow for automated SwiftFormat linting
The repo has .swiftformat configuration and a lint.yml workflow exists, but there's no visible CI step that auto-formats or validates Swift code formatting on every PR. This prevents inconsistent code style from being merged. Adding a SwiftFormat check (and optional auto-fix on PRs) would maintain code quality standards referenced in CONTRIBUTING.md.
- [ ] Review existing .github/workflows/lint.yml and enhance it to include swiftformat validation
- [ ] Add a build phase or pre-commit hook documentation in CONTRIBUTING.md referencing the linter
- [ ] Configure the workflow to fail the PR check if formatting doesn't match .swiftformat rules
- [ ] Optionally add a 'format-code' workflow that auto-commits formatting fixes to PRs
Add comprehensive localization key validation and missing translation detection
Loop has complex localization infrastructure (crowdin.yml, crowdin-upload.yml, crowdin-download.yml workflows, and .github/LocalizationSorter.swift), suggesting extensive multi-language support. However, there's no visible CI check to detect missing or orphaned localization keys. Adding a validation workflow would prevent broken translations and inconsistent key references across the codebase.
- [ ] Create a Swift script in .github/ (e.g., LocalizationValidator.swift) to scan Loop/ for hardcoded strings and compare against localization files
- [ ] Add a GitHub Actions workflow (.github/workflows/validate-localizations.yml) that runs this script on every PR
- [ ] Detect orphaned localization keys (defined but unused) and missing keys (used but not defined)
- [ ] Integrate into CONTRIBUTING.md with guidelines for adding new localizable strings
- [ ] Make the workflow fail if critical language files are missing translations
🌿Good first issues
- Add unit tests for WallpaperProcessor.swift color extraction logic—currently no Tests/ directory exists, and dynamic theming is error-prone without coverage
- Create comprehensive documentation for the radial menu interaction model in /docs or README—current README shows videos but lacks technical architecture explanation for contributors
- Implement missing keyboard shortcut validation in LaunchAtLoginManager or keybinding handler—add unit tests and UI validation to prevent conflicts with system keybindings
⭐Top contributors
Click to expand
Top contributors
- @MrKai77 — 78 commits
- @github-actions[bot] — 9 commits
- @SenpaiHunters — 4 commits
- @manuthebyte — 2 commits
- @zenangst — 2 commits
📝Recent commits
Click to expand
Recent commits
98ecbfa— ✨ Reverse-engineerSLSWindowTags+ handle sharp inset corners on preview (#1090) (MrKai77)2b0a7cc— ✨ AddSLSGetWindowLevelinside window validation checks (#1088) (MrKai77)b0741e2— 💚 Updatemikepenz/release-changelog-builder-action(MrKai77)8a906ed— 💚 Update workflows (MrKai77)891c574— ✨ Add moreSkyLightAPIs for improved window/screen selection (#1087) (MrKai77)e21d282— ⚡ Performance optimizations (#1065) (MrKai77)6245b4e— ✨ Use NSDockTilePlugIn to customize icon (#1075) (MrKai77)d11fac4— ✨ Add simple snapping mode on shorter edge of screen (#1072) (MrKai77)4419cee— 🐞 Top snapping fixes (MrKai77)52de4c7— ✨ Improved snapping on left, right, and bottom edges (#1068) (jvanderen1)
🔒Security observations
Loop is a macOS window management application with moderate security posture. Primary concerns revolve around accessibility framework usage (which is inherently sensitive) and proper permission gating. The codebase shows no obvious hardcoded secrets, SQL injection risks, or critical misconfiguration. Key recommendations: (1) Audit all accessibility API usage for proper permission checks, (2) Implement HTTPS and certificate pinning for network operations in wallpaper fetching, (3) Ensure robust code signing and notarization, (4) Validate all external data sources and inputs. The lack of visible dependency lock files and empty dependency section should be clarified with project maintainers.
- Medium · Potential Privilege Escalation via Launch at Login —
Loop/App/LaunchAtLoginManager.swift. The LaunchAtLoginManager.swift file suggests the app implements launch-at-login functionality. macOS apps with this capability require careful permission handling to prevent privilege escalation attacks. The file structure doesn't show explicit permission validation or sandboxing configuration. Fix: Ensure the app requests and validates proper user permissions. Verify the Info.plist includes appropriate entitlements (com.apple.security.automation). Test that the app respects System Preferences accessibility settings and user consent. - Medium · Accessibility Framework Usage Without Explicit Audit —
Loop (general - window management features). Window management functionality typically requires macOS Accessibility Framework permissions. The codebase shows window manipulation capabilities but lacks visible security audit trail documentation. Accessibility permissions are sensitive and could be exploited if not properly gated. Fix: Implement explicit accessibility permission checks before accessing window APIs. Document all accessibility-dependent features. Consider implementing a permission audit log. Regularly review macOS security advisories related to accessibility APIs. - Low · Missing Dependency Lock File Verification —
Package dependencies (not visible). The provided dependency file content is empty. There is no evidence of a Podfile.lock, Package.resolved, or similar lock file in the file structure, which could indicate dependency version pinning issues. Fix: Ensure Package.resolved (for SPM) or equivalent lock files are committed to version control. Regularly audit dependencies for known vulnerabilities using tools like SwiftLint security checks or OWASP Dependency-Check adapted for Swift. - Low · Wallpaper Fetcher External Data Handling —
Loop/Accent Color/WallpaperImageFetcher.swift, Loop/Accent Color/WallpaperProcessor.swift. The WallpaperImageFetcher.swift and WallpaperProcessor.swift files suggest network requests and image processing. These operations could be vulnerable to MITM attacks, malicious image payloads, or resource exhaustion if not properly validated. Fix: Use HTTPS exclusively for all network requests. Implement certificate pinning for sensitive endpoints. Validate image dimensions and file sizes before processing. Implement resource limits to prevent DoS via large file processing. - Low · No Visible Code Signing Configuration —
Loop.xcodeproj/project.pbxproj. The Loop.xcodeproj file structure is present but detailed signing configuration details are not visible. For a macOS application requiring accessibility permissions, code signing is critical. Fix: Ensure code signing is configured with a valid Apple Developer identity. Implement hardened runtime options. Enable code signing verification in deployment workflows. Use notarization for distribution. - Low · Notification Handling Potential Information Disclosure —
Loop/App/AppDelegate+UNNotifications.swift. The AppDelegate+UNNotifications.swift file indicates notification functionality. Notifications could potentially leak sensitive information if not properly handled. Fix: Avoid including sensitive data in notification payloads. Implement proper notification authentication. Review notification content for information disclosure risks. Test notification behavior when screen is locked.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.