{"id":44722701,"url":"https://github.com/statiolake/macos-auto-tiler","last_synced_at":"2026-02-26T18:27:25.877Z","repository":{"id":338357782,"uuid":"1157584618","full_name":"statiolake/macos-auto-tiler","owner":"statiolake","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-15T17:37:12.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-15T21:21:53.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/statiolake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-14T02:01:39.000Z","updated_at":"2026-02-15T17:36:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/statiolake/macos-auto-tiler","commit_stats":null,"previous_names":["statiolake/macos-auto-tiler"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/statiolake/macos-auto-tiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statiolake%2Fmacos-auto-tiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statiolake%2Fmacos-auto-tiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statiolake%2Fmacos-auto-tiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statiolake%2Fmacos-auto-tiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statiolake","download_url":"https://codeload.github.com/statiolake/macos-auto-tiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statiolake%2Fmacos-auto-tiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29629630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T18:02:07.722Z","status":"ssl_error","status_checked_at":"2026-02-19T18:01:46.144Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-15T16:18:58.599Z","updated_at":"2026-02-19T20:00:52.493Z","avatar_url":"https://github.com/statiolake.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macos-auto-tiler\n\nDrag-to-slot snap + auto reflow tiler for macOS (MVP2).\n\n## What is implemented\n\n- `MVP0`:\n  - Menu bar app skeleton (`AppKit`)\n  - Accessibility permission prompt helper\n  - Window discovery via `CGWindowListCopyWindowInfo`\n- `MVP1`:\n  - Global drag detection via `CGEvent.tapCreate` (`down/dragged/up`)\n  - Transparent top overlay with slot highlights and ghost preview\n  - Overlay passes mouse through (`ignoresMouseEvents = true`)\n- `MVP2`:\n  - Drop-time slot insert/reflow (`Trello`-style card insert)\n  - Target frame calculation from slots\n  - Batch move/resize via AX (`kAXPositionAttribute`, `kAXSizeAttribute`)\n  - Startup auto reflow (runs once shortly after launch)\n\n## Run\n\n```bash\nswift build\nswift run macos-auto-tiler\n```\n\nThe app appears as a menu bar item (`Tiler`).\nYou can trigger manual reflow from menu item `Reflow Now`.\n\n## Build `.app` bundle\n\n```bash\n./scripts/create_app_bundle.sh\n```\n\nOutput:\n\n- `dist/macos-auto-tiler.app`\n\n## License\n\nThis project is licensed under the MIT License. See:\n\n- `LICENSE`\n\n## GitHub Actions\n\n`.github/workflows/build-app.yml` builds and uploads:\n\n- `dist/macos-auto-tiler.app`\n- `dist/macos-auto-tiler.app.zip`\n\nTriggers:\n\n- `push` to `main` (updates prerelease `nightly`)\n- `push` tag `v*` (creates/updates normal release)\n- `pull_request`\n- manual (`workflow_dispatch`)\n\n## Debug logs\n\nLogs are printed to stdout with a `[Tiler]` prefix.\n\n- Verbose (default): `swift run macos-auto-tiler`\n- Quiet debug logs: `TILER_DEBUG=0 swift run macos-auto-tiler`\n\n## Required permissions\n\n- Accessibility: required for AX move/resize\n- Input Monitoring: required for global event tap in many environments\n\nIf drag capture fails, open System Settings and allow both permissions for the app binary.\n\n## Architecture\n\n- `Sources/MacOSAutoTiler/WindowDiscovery.swift`\n  - External window list + geometry (`windowID`, `pid`, `bounds`, title/app)\n  - Space resolution using CGS private APIs (`CGSCopySpacesForWindows`)\n- `Sources/MacOSAutoTiler/CGSSpaceService.swift`\n  - Private CGS bridge for space/window mapping and current display space lookup\n- `Sources/MacOSAutoTiler/EventTapController.swift`\n  - Global mouse event tap (`leftMouseDown/Dragged/Up`)\n- `Sources/MacOSAutoTiler/LayoutPlanner.swift`\n  - Slot generation, hit testing, reflow order, target frame mapping\n- `Sources/MacOSAutoTiler/OverlayWindowController.swift`\n  - Top-most transparent overlay for hover/ghost rendering\n- `Sources/MacOSAutoTiler/AXWindowActuator.swift`\n  - AX window resolution + position/size application\n- `Sources/MacOSAutoTiler/TilerCoordinator.swift`\n  - Orchestration of drag lifecycle and drop-time batch apply\n\n## Current constraints\n\n- Drag-time movement is visual only (overlay), by design.\n- AX matching is heuristic (`CG` frame nearest `AX` frame).\n- Windows with strong size constraints may fail during apply.\n- CGS private API usage can break across macOS updates and is not App Store-friendly.\n\n## Acknowledgements\n\n- [Amethyst](https://github.com/ianyh/Amethyst) (MIT License) has been a major reference for Space handling strategy and implementation direction. Thanks to the maintainers and contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatiolake%2Fmacos-auto-tiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatiolake%2Fmacos-auto-tiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatiolake%2Fmacos-auto-tiler/lists"}