Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions extensions/loop-window-control/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.DS_Store
4 changes: 4 additions & 0 deletions extensions/loop-window-control/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
pnpm-lock.yaml
raycast-env.d.ts
3 changes: 3 additions & 0 deletions extensions/loop-window-control/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 120
}
8 changes: 8 additions & 0 deletions extensions/loop-window-control/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Loop Window Control Changelog

## [Initial Version] - {PR_MERGE_DATE}

- Search and run 71 Loop window actions.
- Run nine common window actions directly with Raycast hotkeys.
- Run named Loop layouts, cycles, and stashes.
- Check installation and troubleshoot URL delivery.
21 changes: 21 additions & 0 deletions extensions/loop-window-control/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Loop Window Control contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
80 changes: 80 additions & 0 deletions extensions/loop-window-control/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Loop Window Control

Control [Loop](https://github.com/mrkai77/Loop) from Raycast. Search 71 window actions, assign Raycast hotkeys to common actions, and run your named Loop layouts, cycles, and stashes.

This is an independent integration. It uses Loop's native URL scheme and does not bundle or modify Loop. The extension icon is original artwork.

## Requirements

- macOS and Raycast.
- **Loop 1.4.2 or later**, installed and configured. [Download Loop](https://github.com/mrkai77/Loop/releases) or install it using `brew install --cask loop`.
- Enable **Loop** in **System Settings → Privacy & Security → Accessibility**.

Open Loop once to complete its first-run setup before using the extension. No additional CLI, local server, API key, or account is required.

## Commands

| Command | Function |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Window Actions | Search 71 actions: maximize, center, halves, quarters, thirds, fourths, screen switching, resizing, movement, focus, undo, and more |
| Left / Right / Top / Bottom Half | Run half-screen actions directly |
| Maximize / Center / Undo | Run these common actions directly |
| Next Screen / Previous Screen | Move the target window between displays |
| Run Named Keybind | Run a layout, cycle, or stash already configured and named in Loop |
| Check Installation | Check installation metadata and read troubleshooting instructions |

Assign hotkeys or aliases to the nine direct commands in Raycast Settings → Extensions. **Copy Loop URL** in the action list copies an action's native URL.

### Named Keybinds

Give your custom layout, cycle, or stash a name in Loop. Run **Run Named Keybind** and enter that name, not a URL. Matching is case-insensitive. Spaces and Unicode are supported. Names containing `/` or control characters, and the reserved names `.`, `..`, and `list`, are not supported.

**Show Named Keybinds** asks Loop to open its list in your default text editor. Loop creates a temporary text file; the extension does not parse that file or read your Loop preferences.

## Preferences

- **Loop Application Path:** defaults to `/Applications/Loop.app`. Change this if you installed Loop elsewhere, such as `~/Applications/Loop.app`.
- **Focus Restore Delay:** waits after closing Raycast before sending an action. Defaults to 250 ms; try 500 or 800 ms if focus restoration is slow.

## Troubleshooting

### “Sent to Loop,” but the window did not change

Loop's URL interface does not acknowledge execution. The message means macOS accepted the request, not that a window moved. Check Loop's Accessibility permission, first-run setup, and whether the target window is resizable. Check that a named keybind exists in Loop. Earlier Loop versions may not support all listed actions.

### The wrong window moves

Window selection follows Loop's settings. If its option to resize the window under the cursor is enabled, move the cursor over the intended window or disable that option. Focus your target window before opening Raycast.

### Loop was not running

macOS starts Loop when a URL is delivered. If the first request is not applied during startup, wait until Loop is ready and try again. The extension does not automatically repeat requests because repeating a cycle or undo could have an unintended result.

### Installation or delivery errors

The extension checks the application path, bundle identifier, and declared URL scheme before closing Raycast. If a check fails, its error message links to extension preferences. Installation diagnostics cannot verify Accessibility permission or whether a window action completed.

## Development

Install Node.js 22.22.2 or later and npm, then run:

```sh
npm ci
npm run dev
```

Validation:

```sh
npm run build
npm run typecheck
npm run lint
npm test
```

The action catalog is based on Loop tag `1.4.2`:

- [URL command handler](https://github.com/mrkai77/Loop/blob/1.4.2/Loop/Core/URLCommandHandler.swift)
- [Window directions](https://github.com/mrkai77/Loop/blob/1.4.2/Loop/Window%20Management/Window%20Action/WindowDirection.swift)

No upstream implementation or artwork is copied. Newer development-branch Space actions are intentionally excluded from the 1.4.2 catalog. Parameterized Custom, Cycle, and Stash actions are invoked through named keybinds.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions extensions/loop-window-control/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import raycast from "@raycast/eslint-config";
export default [{ ignores: ["raycast-env.d.ts", "dist/**"] }, ...raycast];
Loading
Loading