{"id":16256826,"url":"https://github.com/johnlindquist/mac-windows-manager","last_synced_at":"2025-03-19T21:31:12.985Z","repository":{"id":252795021,"uuid":"841462167","full_name":"johnlindquist/mac-windows-manager","owner":"johnlindquist","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-13T20:22:09.000Z","size":42,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T15:21:23.151Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnlindquist.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}},"created_at":"2024-08-12T13:05:11.000Z","updated_at":"2025-03-12T00:51:09.000Z","dependencies_parsed_at":"2024-08-12T16:01:47.306Z","dependency_job_id":"5d67f39d-8197-4169-86bd-51e7d363c9f9","html_url":"https://github.com/johnlindquist/mac-windows-manager","commit_stats":null,"previous_names":["johnlindquist/mac-windows-manager"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlindquist%2Fmac-windows-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlindquist%2Fmac-windows-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlindquist%2Fmac-windows-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlindquist%2Fmac-windows-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnlindquist","download_url":"https://codeload.github.com/johnlindquist/mac-windows-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244507921,"owners_count":20463698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-10T15:46:26.883Z","updated_at":"2025-03-19T21:31:12.737Z","avatar_url":"https://github.com/johnlindquist.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mwm (Mac Windows Manager)\n\nmwm is a powerful macOS command-line tool that allows you to precisely control window positioning and sizing on your screen.\n\n## Requirements\n\n- macOS 10.15 or later\n- Swift 5.5 or later\n\n## Installation\n\nYou can download the latest release of mwm from the [Releases](https://github.com/johnlindquist/mac-windows-manager/releases) page.\n\nAfter downloading, you may need to make the file executable:\n\n```\nchmod +x mwm\n```\n\n## Usage\n\nThe general syntax for using mwm is:\n\n```\nmwm \u003ccommand\u003e [width-\u003csize\u003e] [height-\u003csize\u003e]\n```\n\n\n### Available Commands\n\n1. Positioning Commands:\n\n   - `center`: Center the window on the screen\n   - `left`, `right`: Position the window on the left or right side of the screen\n   - `top-left`, `top-right`, `bottom-left`, `bottom-right`: Position the window in the corners of the screen\n   - `center-left`, `center-top`, `center-right`, `center-bottom`: Position the window centered on each edge of the screen\n   - `left-third`, `center-third`, `right-third`: Divide the screen into thirds and position the window accordingly\n\n2. Sizing Commands:\n\n   - `fullscreen`: Toggle fullscreen mode for the window\n   - `maximize`: Maximize the window to fill the screen\n   - `maximize-height`: Maximize the window's height while maintaining its width\n   - `maximize-width`: Maximize the window's width while maintaining its height\n\n3. Movement Commands:\n\n   - `move-up`, `move-down`, `move-left`, `move-right`: Move the window to the respective edge of the screen\n\n4. Custom Sizing:\n\n   - `center-\u003cpercentage\u003e`: Center the window and resize it to the specified percentage of the screen size\n\n5. Display Movement Commands:\n   - `display-next`: Move the window to the next display, maintaining its relative position and size\n   - `display-previous`: Move the window to the previous display, maintaining its relative position and size\n\n6. Screen Information:\n   - `list-screens`: Display information about all available screens\n\n7. Presets:\n   - `preset [monitor] \u003csplit-type\u003e \u003capp1\u003e:\u003cpercentage\u003e \u003capp2\u003e:\u003cpercentage\u003e ...`: Apply a preset configuration to open and arrange multiple applications\n\n### Size Specifications\n\nYou can specify custom sizes for width and height using the following format:\n\n- Percentage: e.g., `width-50%` (50% of screen width)\n- Pixels: e.g., `height-800px` (800 pixels high)\n\nIf no size is specified, the current window size is maintained.\n\n### Examples\n\n1. Center the window and set it to 80% of screen width and 70% of screen height:\n\n   ```\n   mwm center width-80% height-70%\n   ```\n\n2. Move the window to the top-right corner and set its width to 1000 pixels:\n\n   ```\n   mwm top-right width-1000px\n   ```\n\n3. Position the window on the left side of the screen and maximize its height:\n\n   ```\n   mwm left maximize-height\n   ```\n\n4. Center the window and set its size to 60% of the screen:\n\n   ```\n   mwm center-60\n   ```\n\n5. Move the window to the next display:\n\n   ```\n   mwm display-next\n   ```\n\n6. Move the window to the previous display:\n\n   ```\n   mwm display-previous\n   ```\n\n7. List all available screens:\n\n   ```\n   mwm list-screens\n   ```\n\n8. Apply a preset to open and arrange Safari and Terminal horizontally:\n\n   ```\n   mwm preset horizontal Safari:50 Terminal:50\n   ```\n\n9. Apply a preset on the second monitor to arrange Visual Studio Code and Terminal vertically:\n\n   ```\n   mwm preset 2 vertical \"Visual Studio Code\":70 Terminal:30\n   ```\n\n\n### Help\n\nYou can access the help information by running the tool with the `-h` or `--help` flag:\n\n```\nmwm -h\n```\n\nor\n\n```\nmwm --help\n```\n\nThis will display the available commands, size specifications, and examples.\n\n## How it works\n\nmwm uses the macOS Accessibility API to identify the frontmost application and its frontmost window. It then calculates the appropriate position and size based on the command and arguments provided, and applies these changes to the window.\n\n## Permissions\n\nThis tool requires accessibility permissions to function. You may need to grant permission in System Preferences \u003e Security \u0026 Privacy \u003e Privacy \u003e Accessibility.\n\n## License\n\n[Your chosen license, e.g., MIT License]\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnlindquist%2Fmac-windows-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnlindquist%2Fmac-windows-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnlindquist%2Fmac-windows-manager/lists"}