{"id":50666699,"url":"https://github.com/whaaaley/glaze-borders","last_synced_at":"2026-06-08T07:04:25.801Z","repository":{"id":361434402,"uuid":"1254403817","full_name":"whaaaley/glaze-borders","owner":"whaaaley","description":"Native macOS window-border daemon for GlazeWM — draws an accent-colored border on the focused window","archived":false,"fork":false,"pushed_at":"2026-05-30T17:15:54.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T17:17:15.826Z","etag":null,"topics":["glazewm","macos","swift","tiling-window-manager","window-borders","window-manager"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whaaaley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-30T14:19:53.000Z","updated_at":"2026-05-30T17:15:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/whaaaley/glaze-borders","commit_stats":null,"previous_names":["whaaaley/glaze-borders"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/whaaaley/glaze-borders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whaaaley%2Fglaze-borders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whaaaley%2Fglaze-borders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whaaaley%2Fglaze-borders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whaaaley%2Fglaze-borders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whaaaley","download_url":"https://codeload.github.com/whaaaley/glaze-borders/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whaaaley%2Fglaze-borders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34051776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["glazewm","macos","swift","tiling-window-manager","window-borders","window-manager"],"created_at":"2026-06-08T07:04:05.219Z","updated_at":"2026-06-08T07:04:25.796Z","avatar_url":"https://github.com/whaaaley.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glaze-borders\n\nA native macOS window-border daemon for [GlazeWM](https://github.com/glzr-io/glazewm). It draws a single accent-colored border around the focused window, built in Swift on AppKit and the Accessibility API — no private frameworks.\n\n## Features\n\n- **Focused-window only** — one border, your system accent color, resolved live so it tracks Appearance changes.\n- **Pixel-accurate** — draws in points and lets AppKit handle Retina scaling, so borders never land offset.\n- **Real geometry** — reads the actual window frame from the Accessibility API, so windows with a minimum size (Chrome, Slack) that overflow their tile still get a correct border.\n- **Follows everything** — focus changes, moves, resizes, and fullscreen (`alt+f`), via an AX observer plus a low-frequency safety poll.\n- **Tahoe-matched corners** — toolbar windows (Finder, System Settings) use a larger radius than plain windows (terminals, editors); the class is detected via AX and cached.\n- **Snappy** — a single reused overlay window, no animations, instant focus follow.\n\n## Install\n\n```sh\nswift build -c release\ncp .build/release/glaze-borders ~/.local/bin/glaze-borders\n```\n\n- Run directly: `glaze-borders`\n- Auto-start at login: load the LaunchAgent in `contrib/com.dustin.glaze-borders.plist`\n- Grant Accessibility permission: System Settings → Privacy \u0026 Security → Accessibility\n\n## Configuration\n\nDefaults are baked in. Override any of these with environment variables:\n\n| Variable | Meaning | Default |\n|---|---|---|\n| `GLAZE_BORDERS_WIDTH` | stroke width (pt) | 2 |\n| `GLAZE_BORDERS_OFFSET` | 0 = inner; negative pushes outward | 0 |\n| `GLAZE_BORDERS_RADIUS` | plain-window corner radius | 10 |\n| `GLAZE_BORDERS_RADIUS_TOOLBAR` | toolbar-window corner radius | 22 |\n| `GLAZE_BORDERS_POP` | `1` = native appear animation on focus | off |\n| `GLAZE_BORDERS_DEBUG` | `1` = log to `/tmp/glaze-borders.debug.log` | off |\n\n## Architecture\n\nFunctional core, imperative shell:\n\n- **Pure core** — `Geometry`, `RadiusResolver`, `Reconciler`. No AppKit or AX; given a snapshot of the world, decides what to draw. Fully unit-testable.\n- **Imperative shell** — `Daemon`, `Overlay`, `AXWatcher`, `GlazeClient`. Gathers inputs (GlazeWM IPC, AX reads, screen) and applies the decision to AppKit.\n- **Persistent classification** — `Classifier`. One-way sticky toolbar/plain cache at `~/.config/glaze-borders/classifications.json`.\n\n## Tests\n\n```sh\nswift test\n```\n\n- Unit tests cover the pure geometry and radius logic with input/output tables.\n- Integration tests cover the reconciler decision and classifier persistence.\n- Benchmarks (`BenchmarkTests`, `LiveBenchmarkTests`, `E2ELatencyBenchmarkTests`) measure the hot paths and double as regression guards.\n\n## Performance\n\nEnd-to-end switch latency is the time from issuing a real GlazeWM focus command to the border redrawing on screen.\n\n| Metric | Result |\n|---|---|\n| Switch → border redraw (median) | **~70 ms** (66–85 ms) |\n| Pure decision path (geometry/radius/screen-pick) | sub-microsecond per call |\n| AX focused-window read (incl. toolbar detection) | ~1 ms |\n\nThe border is event-driven: the focused window is parsed straight from the `glazewm sub` event payload, so a switch no longer spawns a `glazewm query windows` subprocess (~39 ms on this setup). That change cut switch latency from ~195 ms to ~70 ms.\n\nMeasured on:\n\n- **MacBook Air (M2, Mac14,2)** — 8 cores, 16 GB\n- **macOS 26.5** (Tahoe, build 25F71)\n- Built-in Liquid Retina display, 2560×1664\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhaaaley%2Fglaze-borders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhaaaley%2Fglaze-borders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhaaaley%2Fglaze-borders/lists"}