Skip to content

Add hot-corners extension#27448

Open
JoaoGFdev wants to merge 2 commits intoraycast:mainfrom
JoaoGFdev:ext/hot-corners
Open

Add hot-corners extension#27448
JoaoGFdev wants to merge 2 commits intoraycast:mainfrom
JoaoGFdev:ext/hot-corners

Conversation

@JoaoGFdev
Copy link
Copy Markdown
Contributor

@JoaoGFdev JoaoGFdev commented Apr 26, 2026

Description

Control macOS hot corners from Raycast: save named layouts, switch between them, or turn all corners off and back on. Changes use the same settings as System Settings and apply the Dock preferences (the Dock is restarted so updates take effect).

Commands

Command What it does
Save Hot Corners Preset Save your current hot corner setup (each corner’s action and modifier) under a name.
List Hot Corners Presets Open your presets, search, apply one, reorder, or delete. Applying updates the system and restarts the Dock.
Toggle Hot Corners If corners are on: turn all corners off and remember the previous setup. If they’re off: restore that setup. The command’s subtitle in Raycast shows Enabled or Disabled to match the current state.

How to use

  1. Save a few presets (e.g. “Work”, “Gaming”) after configuring corners in System Settings, or from whatever layout you want stored.
  2. List presets when you want to switch layouts without opening System Settings.
  3. Toggle when you want everything off (or back) in one action—useful for screen sharing or focus.

Platform: macOS only.

Screencast

hot-corners

Checklist

@raycastbot raycastbot added new extension Label for PRs with new extensions platform: macOS labels Apr 26, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@JoaoGFdev JoaoGFdev marked this pull request as ready for review April 26, 2026 17:45
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 26, 2026

Greptile Summary

This PR introduces a new hot-corners extension for macOS that lets users save named presets of their hot-corner configuration, apply them, and toggle all corners off/on — all via defaults write on com.apple.dock and a Dock restart.

  • @raycast/utils is declared as a dependency in package.json but is never imported in any source file — it should be removed.

Confidence Score: 3/5

Safe to merge after removing the unused @raycast/utils dependency; all other findings are minor style issues.

One P1 finding (unused declared dependency violating the project rule) pulls the ceiling to 4/5; combined with two P2s and the P1 being straightforward to fix, a score of 3 reflects that the fix is required before merge.

extensions/hot-corners/package.json — remove the unused @raycast/utils entry from dependencies.

Important Files Changed

Filename Overview
extensions/hot-corners/package.json Extension manifest is well-formed, but @raycast/utils is listed as a dependency without being imported anywhere in the source — this unused dependency should be removed.
extensions/hot-corners/src/lib/hot-corners.ts Core library: reads/writes macOS Dock defaults via execFileSync and manages presets as JSON on disk. Logic is solid — input validation, safe defaults, and disk I/O are all handled carefully.
extensions/hot-corners/src/toggle-hot-corners.tsx Toggle command logic is correct; minor concern that the try/finally lacks a catch, so errors from applyHotCornerSettings won't surface a user-friendly message.
extensions/hot-corners/src/list-presets.tsx Preset list UI is clean and well-structured; minor inconsistency in action title casing ("Move up" vs "Move Down").
extensions/hot-corners/src/save-preset.tsx Save-preset form is straightforward and correctly validates the name field before persisting.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/hot-corners/package.json
Line: 43

Comment:
**Unused `@raycast/utils` dependency**

`@raycast/utils` is declared as a dependency but is never imported in any source file under `src/`. This adds unnecessary weight to the bundle and violates the project rule requiring every listed dependency to be used. Remove it from `dependencies`, or import the package if it is actually needed.

```suggestion
    "@raycast/api": "^1.104.13"
```

**Rule Used:** What: Every dependency listed in package.json must... ([source](https://app.greptile.com/review/custom-context?memory=bffc60eb-f9f2-4219-b804-76e29e267d43))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/hot-corners/src/toggle-hot-corners.tsx
Line: 30-70

Comment:
**Missing error handler in `try/finally`**

The outer `try` block has only a `finally` — no `catch`. If `applyHotCornerSettings` (or any other synchronous call) throws, the error propagates out of the exported function without any user-visible feedback. The `finally` still runs `syncToggleCommandSubtitle`, but the failure itself is never surfaced through a `showToast` or `showHUD`. Wrapping the body in a `try/catch/finally` ensures users see a meaningful error message rather than a silent failure or a generic Raycast error dialog.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/hot-corners/src/list-presets.tsx
Line: 101

Comment:
**Action title casing inconsistency**

`"Move up"` uses sentence case while the sibling `"Move Down"` uses title case. Raycast action titles should consistently use title case.

```suggestion
                    title="Move Up"
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat: add Hot Corners Raycast extension" | Re-trigger Greptile

Comment thread extensions/hot-corners/package.json
Comment thread extensions/hot-corners/src/toggle-hot-corners.tsx
Comment thread extensions/hot-corners/src/list-presets.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants