Use Spacepal with Apple Shortcuts
Spacepal adds its own actions to the Shortcuts app: switch to a Space, go back to the last one, move the front window, switch profile and get the current Space's name. For anything else, every Spacepal action has a spacepal:// link you can open with the Open URLs action, and an AppleScript command. It also works the other way: a Space can run a shortcut when you enter or leave it.
Spacepal's actions
Search for "Spacepal" in the Shortcuts action list:
| Action | Input | Does |
|---|---|---|
| Switch to Space | Desktop number or Space name | Goes to that Space without opening Spacepal's window |
| Go Back to Last Space | Returns to the Space you were on before | |
| Move Front Window to Space | Desktop number or Space name | Sends the front window there |
| Switch Spacepal Profile | Profile name | Applies a saved profile, such as Work or Home |
| Get Current Space Name | Returns the name as text, for use in later actions |
Two of them are also ready-made App Shortcuts, so you can run them from Spotlight or ask Siri: "Go back to my last space in Spacepal" and "Which space am I on in Spacepal".
Everything else: Open URLs
Add an URL action with a Spacepal link, then Open URLs. Some useful links:
| Link | Does |
|---|---|
spacepal://overview | Open the overview |
spacepal://rename/current?name=Design | Rename the current Space |
spacepal://note/current?text=Call%20at%203 | Set the current Space's note |
spacepal://template/Developer | Apply a built-in template |
spacepal://setup/2 | Go to Desktop 2 and open its apps and URLs now |
spacepal://save-layout, restore-layout | Save or restore where windows are |
spacepal://eject | Prepare to unplug external displays |
The full list is in the URL scheme docs. Spaces in names and notes need to be written as %20.
Or Run AppleScript
The Run AppleScript action can read values as well as act:
tell application "Spacepal"
set n to current space number
if n is 1 then
switch to space "Mail"
else
last space
end if
end tell
Also available: current space name, space names (one per line), next space, previous space, show overview, move window to space and rename space 3 to "Design".
Recipes
Switch profile with a Focus
In the Shortcuts app, open Automation, create a new automation for when the Work Focus turns on, and add Switch Spacepal Profile with "Work". Make a second one for when it turns off, with "Home". Your names, colors and per-Space automations then follow your Focus.
Morning setup
A time-of-day automation with Switch Spacepal Profile "Work", then Open URLs spacepal://setup/1, opens your first Space's apps before you sit down.
Log the current Space
Get Current Space Name, then Append to Note or Append to Text File, to keep a simple diary of what you worked on.
The other direction: Spaces that run shortcuts
In Settings, Spaces, each Space has "Run Shortcut" under "When you enter this Space" and "When you leave this Space". Type the shortcut's name exactly as in the Shortcuts app (the direct version also lists them to pick from). Typical uses: turn on Do Not Disturb when you enter a focus Space and off when you leave it, change the volume, or switch dark mode.
The direct version runs the shortcut in the background with the shortcuts command. The Mac App Store version is sandboxed, so it opens a shortcuts:// link and the Shortcuts app runs it, which may bring the Shortcuts app forward for a moment.
Limits
- Moving the front window works on every supported macOS version.
restore-layoutandejectmove windows that are not in front. That uses a direct WindowServer move, which works on macOS 14.0 to 14.4 and on 26.4 and later; on other versions those windows stay where they are.
Related
- Per-Space automations
- AppleScript dictionary
- All integrations
- Spacepal is a one-time purchase with a 14-day trial
Written by Dan Bayer, developer of Spacepal. Last updated 2026-10-27.