[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-130":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":31,"discoverSource":32},130,"miri","maria-rcks\u002Fmiri","maria-rcks","Niri-ish, keyboard-first window manager for macOS.","",null,"Swift",190,8,2,0,1,20,2.86,"MIT License",false,"main",[23,24,25,26,27],"macos","niri","paper","scroll","wm","2026-06-12 02:00:08","\u003Cdiv align=\"center\">\n\n# miri\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-111111?style=flat-square)](.\u002FLICENSE)\n[![GitHub](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fgithub-maria--rcks%2Fmiri-111111?style=flat-square&logo=github)](https:\u002F\u002Fgithub.com\u002Fmaria-rcks\u002Fmiri)\n[![Ko-fi](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fko--fi-maria__rcks-111111?style=flat-square&logo=kofi)](https:\u002F\u002Fko-fi.com\u002Fmaria_rcks)\n\n\u003Cimg src=\".\u002Fassets\u002Frepo\u002Fmiri-demo.gif\" alt=\"miri macOS window layout preview\" width=\"1000\" \u002F>\n\n_Niri-ish, keyboard-first window manager for macOS._\n\n\u003C\u002Fdiv>\n\n## Install\n\nBuild and run from source:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmaria-rcks\u002Fmiri.git\ncd miri\nswift run miri\n```\n\nFor a release build:\n\n```bash\nswift build -c release\n.build\u002Frelease\u002Fmiri\n```\n\nTo build a local macOS disk image:\n\n```bash\nscripts\u002Fpackage-macos.sh --version 0.1.0\nopen dist\u002FMiri-0.1.0-*.dmg\n```\n\nmiri needs Accessibility permission, and the event tap may also need Input\nMonitoring permission. If you run it from a terminal, macOS may ask for the\nterminal app itself to get those permissions.\n\n## What it does\n\n- Keeps a Niri-like virtual layout of workspaces and columns on macOS.\n- Tiles normal app windows with Accessibility APIs instead of acting as a\n  compositor.\n- Makes each column `0.8` screen widths by default, so the next column can peek\n  in while you move sideways.\n- Centers the focused column when possible, while keeping the first column\n  pinned to the left edge.\n- Tracks `Cmd+Tab`, app launches, app exits, manual window resizes, and focused\n  windows so the model follows macOS instead of fighting it.\n- Supports app rules for tiled, floating, and ignored windows.\n- Adds a graphical menu bar status item with workspace\u002Fwindow status, settings\n  shortcuts, layout reapply, and safe quit.\n- Hot-reloads config changes without restarting, keeping the previous config if\n  a saved file cannot be parsed.\n- Persists workspace, column order, manual widths, and focused window across\n  restarts.\n- Parks off-workspace windows near the side edge, with optional SkyLight alpha\n  hiding when those private symbols are available.\n- Restores tiled windows on normal exit and starts a small cleanup watcher for\n  crash or kill recovery.\n\n## Shortcuts\n\n| Shortcut | Action |\n| :------- | :----- |\n| `Cmd+1`..`Cmd+9` | Focus workspace by dynamic index |\n| `Cmd+0` | Focus the previous workspace |\n| `Cmd+J` \u002F `Cmd+K` | Focus workspace down \u002F up |\n| `Cmd+H` \u002F `Cmd+L` | Focus column left \u002F right |\n| `Cmd+[` \u002F `Cmd+]` | Focus first \u002F last column |\n| `Cmd+Home` \u002F `Cmd+End` | Focus first \u002F last column |\n| `Cmd+Shift+1`..`Cmd+Shift+9` | Move column to workspace |\n| `Cmd+Shift+J` \u002F `Cmd+Shift+K` | Move column workspace down \u002F up |\n| `Cmd+Shift+H` \u002F `Cmd+Shift+L` | Move column left \u002F right |\n| `Cmd+Shift+[` \u002F `Cmd+Shift+]` | Move column to first \u002F last |\n| `Cmd+Ctrl+H` \u002F `Cmd+Ctrl+L` | Cycle active column width preset |\n| `Cmd+Ctrl+-` \u002F `Cmd+Ctrl+=` | Nudge active column width |\n| `Cmd+Ctrl+Shift+H` \u002F `Cmd+Ctrl+Shift+L` | Cycle every tiled window width preset |\n| `Cmd+Ctrl+Shift+-` \u002F `Cmd+Ctrl+Shift+=` | Nudge every tiled window width |\n| three-finger trackpad swipe | Navigate columns \u002F workspaces |\n\nEverything else passes through. The default config excludes `Cmd+Shift+5`, so\nmacOS screen recording keeps working.\n\nTrackpad navigation uses Apple's private MultitouchSupport framework so Miri can\nsee raw three-finger movement without stealing normal two-finger scrolling. It\nmoves a continuous camera with momentum, then focuses the workspace and column\nnearest the camera when the motion settles.\n\n## Config\n\nmiri loads the first config file it can read:\n\n- `MIRI_CONFIG`\n- `.\u002Fmiri.config.json`\n- `$XDG_CONFIG_HOME\u002Fmiri\u002Fconfig.json`\n- `~\u002F.config\u002Fmiri\u002Fconfig.json`\n\nThe loaded config file is watched for changes. Saving valid JSON reloads\nkeybindings, rules, layout settings, animations, and trackpad settings in place.\nIf a save cannot be parsed, miri keeps running with the previous config.\nThe menu bar item can open or reveal the loaded settings file, reveal the saved\nlayout state file, reload settings, reapply the layout, and quit while restoring\ntiled windows.\n\nThe repo includes a full default config. A compact version looks like this:\n\n```json\n{\n  \"default_width_ratio\": 0.8,\n  \"preset_width_ratios\": [0.5, 0.67, 0.8, 1.0],\n  \"animation_duration_ms\": 240,\n  \"keyboard_animation_ms\": 240,\n  \"hover_focus_animation_ms\": 240,\n  \"trackpad_settle_animation_ms\": 240,\n  \"move_column_animation_ms\": 240,\n  \"width_animation_ms\": 280,\n  \"animation_curve\": \"smooth\",\n  \"hover_to_focus\": true,\n  \"hover_focus_delay_ms\": 120,\n  \"hover_focus_max_scroll_ratio\": 0.15,\n  \"hover_focus_requires_visible_ratio\": 0.15,\n  \"hover_focus_edge_trigger_width\": 8,\n  \"hover_focus_after_trackpad_ms\": 280,\n  \"hover_focus_mode\": \"edge_or_visible\",\n  \"workspace_auto_back_and_forth\": true,\n  \"center_focused_column\": true,\n  \"focus_alignment\": \"smart\",\n  \"new_window_position\": \"after_active\",\n  \"inner_gap\": 0,\n  \"outer_gap\": 0,\n  \"parked_sliver_width\": 1,\n  \"excluded_keybindings\": [\"cmd+shift+5\"],\n  \"keybindings\": {\n    \"column_left\": [\"cmd+h\"],\n    \"column_right\": [\"cmd+l\"],\n    \"workspace_down\": [\"cmd+j\"],\n    \"workspace_up\": [\"cmd+k\"]\n  },\n  \"trackpad_navigation\": true,\n  \"trackpad_navigation_fingers\": 3,\n  \"trackpad_navigation_sensitivity\": 1.6,\n  \"trackpad_navigation_deceleration\": 5.5,\n  \"trackpad_navigation_hover_suppression_ms\": 280,\n  \"trackpad_navigation_momentum_min_velocity\": 80,\n  \"trackpad_navigation_velocity_gain\": 1.35,\n  \"trackpad_navigation_settle_animation_ms\": 240,\n  \"trackpad_navigation_snap\": \"nearest_column\",\n  \"trackpad_navigation_invert_x\": false,\n  \"trackpad_navigation_invert_y\": false,\n  \"rescan_interval_ms\": 1000,\n  \"restore_on_exit\": true,\n  \"persist_layout\": true,\n  \"state_path\": null,\n  \"hide_method\": \"skylight_alpha\",\n  \"debug_logging\": false,\n  \"rules\": [\n    {\n      \"bundle_id\": \"com.apple.finder\",\n      \"behavior\": \"float\"\n    }\n  ]\n}\n```\n\n`keybindings` is merged with the built-in defaults by action name, so a config\ncan override only the actions it cares about. Set an action to `[]` to disable\nit. `excluded_keybindings` always wins, which is why the default `Cmd+Shift+5`\nscreen-recording shortcut passes through even though workspace 5 has a move\nbinding. See `miri.config.json` for the full command-name list.\n\nKeybinding strings support the standard modifiers `cmd`, `ctrl`, `shift`,\n`alt`\u002F`option`, and `fn`\u002F`globe`. This makes MacBook keyboard shortcuts like\n`cmd+fn+left` configurable without requiring a separate Home\u002FEnd key.\n\nUseful string settings:\n\n- `animation_curve`: `smooth`, `snappy`, or `linear`\n- `hover_focus_mode`: `off`, `visible_only`, or `edge_or_visible`\n- `focus_alignment`: `left`, `center`, or `smart`\n- `new_window_position` and rule `open_position`: `before_active`,\n  `after_active`, or `end`\n- `trackpad_navigation_snap`: `nearest_column`, `nearest_visible`, or `none`\n- `hide_method`: `skylight_alpha` or `park_only`\n\nRules can match on `bundle_id`, `app_name`, or `title_contains`. Use\n`behavior: \"ignore\"` for windows miri should leave alone, `behavior: \"float\"`\nfor visible untiled windows that should be raised above tiled columns, and\n`width_ratio` to override an app's default column width. Rules can also set `workspace`, `open_position`,\n`trackpad_navigation`, and `hover_to_focus` for matching windows.\n\nWith `persist_layout` enabled, miri writes a local layout snapshot to\n`$XDG_STATE_HOME\u002Fmiri\u002Flayout.json` or `~\u002F.local\u002Fstate\u002Fmiri\u002Flayout.json`. Set\n`state_path` to override that location. The snapshot uses app names, bundle IDs,\nand window titles to match windows after restart.\n\n## Development\n\n```bash\nswift build\nswift run miri\n```\n\n## Releases\n\nRelease artifacts are built by `.github\u002Fworkflows\u002Frelease.yml`.\n\n- Push a stable tag like `v0.1.0` to publish a GitHub Release.\n- Run the workflow manually with `channel: nightly` to publish a prerelease.\n- The scheduled nightly checks whether `main` changed since the last nightly tag\n  before publishing.\n- The macOS artifact is a `Miri-\u003Cversion>-arm64-darwin.dmg` containing\n  `Miri.app`.\n\n## Notes\n\n- miri targets macOS 13+ and Swift 6.\n- It uses public Accessibility APIs for the core window control path.\n- The SkyLight path is private and optional; if it is unavailable, hidden\n  windows stay parked as side-edge slivers.\n- This does not use native macOS Spaces.\n\n## Links\n\n- Repository: https:\u002F\u002Fgithub.com\u002Fmaria-rcks\u002Fmiri\n- Research notes: [docs\u002Fmacos-window-management-investigation.md](docs\u002Fmacos-window-management-investigation.md)\n- Niri behavior notes: [docs\u002Fniri-mvp-behavior-notes.md](docs\u002Fniri-mvp-behavior-notes.md)\n","miri 是一个为 macOS 设计的键盘优先窗口管理器，灵感来源于 Niri。它通过 Accessibility API 实现了虚拟工作区和列布局，使用户能够通过快捷键高效地管理和切换窗口。核心功能包括自动调整窗口大小以适应屏幕宽度、支持应用程序规则配置（如平铺、浮动或忽略窗口），以及提供图形化菜单栏状态项来显示当前布局并快速访问设置。此外，miri 还具备热重载配置文件的能力，确保即使在修改配置时也不会中断用户体验。此项目特别适合那些希望提高多任务处理效率，尤其是需要频繁切换应用窗口的 macOS 用户。","2026-06-11 02:31:01","CREATED_QUERY"]