Clipboard actions
Press ⌘K on a copied item in the clipboard panel to transform it or act on it with your own macros: clean a link, reformat a color, pretty-print JSON, rewrite with AI.
Open the clipboard panel (⌃⌥⌘V), select a copy and press ⌘K. The right side turns into a list of actions for this link (or color, code, image, text): the macros that know how to handle that kind of thing. The one you select shows what it would give back, under Before and After, computed on the spot. ⏎ runs it and pastes the result into the app you were in.
| Key | What it does |
|---|---|
| ⏎ | Runs the action. A transform pastes its result; any other action just runs. |
| ⌘C | Copies the result without pasting. |
| ⌘S | Saves the result into the history as a new row next to the original. |
| ⌃1 to ⌃9 | Runs the first nine actions straight from the list, without opening ⌘K. Their numbers show in the actions list. |
| ⌘N | Makes a new action for this kind of thing. |
| ⎋ or ⌘K | Back to the preview. |
Type in the search field to filter the actions.
The built-in actions are macros #
Switchboard ships a group called Clipboard actions. Every action in it is an ordinary macro you can open, edit, duplicate or delete:
Text: Plain text, UPPERCASE, lowercase, Title Case, Trim and collapse spaces, Straight quotes, Smart quotes, Sort lines, Remove duplicate lines.
Links: Clean URL (removes
utm_*,fbclid,gclid,mc_*andref), Markdown link, and Open in each browser you have.Code: Pretty JSON, Minify JSON, Wrap in a code fence, Escape as a string literal.
Colors: As HEX, As RGB, As HSL, As SwiftUI Color, As NSColor.
Images: Text from image (reads the words in it), Save image as file (to Downloads, with the path on the clipboard), Scale image to 50%.
Write your own #
An action is a macro whose first input is a thing type. Add an input named text of type thing:text, do something with {{text}}, and finish with a Return step. That is all: the macro now appears in ⌘K for text. The types are:
| Input type | Takes |
|---|---|
thing:text | any text |
thing:url | a single link |
thing:code | code or a shell command |
thing:color | a color such as #FF8A3D, rgb(255 138 61) or hsl(21 100% 62%) |
thing:image | a picture; the input is the path of a PNG file |
thing:any | everything |
A copy can be more than one thing. A link is url and also text, so text actions show up for it too, after the link actions.
- Transform “{{url}}” with clean url
- Return “{{clean}}”
Transform or action #
Switchboard reads which one a macro is. If it ends with a Return step that gives back text for text (or a file for an image), it is a transform: the panel shows its result and pastes it. Anything else is an action: it runs and the panel closes. If it guesses wrong, set mode to transform or action in the macro.
Shows in #
A thing-taking macro can be listed in four places: the clipboard panel, Paste as, the selection bar and Actions for This. All four are on by default. Untick one under the input (Shows in) to keep a place short without hiding the action elsewhere.
What the preview runs #
The preview is a dry run, so it only computes macros whose steps cannot change anything outside Switchboard (text filters, variables, Return). A macro that clicks, runs a script, calls another macro or uses AI shows one line saying what it will do instead, and runs for real only when you press ⏎. A preview that takes longer than a second gives up and says so; the action can still be run.
Transform with AI #
The last line of the list is Transform with AI…. Type what you want in the search field ("as a bullet list", "in French", "as a SQL INSERT"), press ⏎ to see the result, and ⏎ again to paste it. It uses the same model settings as the AI steps (on this Mac by default; a cloud model only if you allowed it in Settings). Your last ten instructions are listed under it; press ⌘S on one to keep it as a real action in the Clipboard actions group.
Transform on copy #
To rewrite things as you copy them, use a macro with a Clipboard change trigger and the transform operation of the Clipboard step. The example Strip tracking from copied links ships switched off:
When: the clipboard changes,
kinds: ["url"](only links).Do: Clipboard › transform with the macro Clean URL.
Turn it on and every link you copy loses its tracking parameters on the way in. Clipboard history keeps the rewritten copy with the original on the same row: the row is marked ↺, and ⌥⏎ pastes the original. A group's app scope limits it to certain apps, so "links copied in Safari" is a scope on the group. The rewrite does not trigger itself again.
Gotchas #
A macro with a
thing:input still runs from the palette or a hotkey: it asks for the value like any input.Only the first input can be a thing; the others are ordinary inputs.
Actions on files copied in Finder are not here yet: the history records text, rich text and pictures.