Clipboard Variable
The clipboard variable type captures the current system clipboard text into a variable that can be used in expansion output.
Basic Usage
- trigger: ":clip"
replace: "{{clip}}"
vars:
- name: clip
type: clipboard
When triggered, the current clipboard content replaces {{clip}}.
Using Clipboard as Form Default
A powerful pattern: pre-fill a form field with clipboard content so you can edit it before expansion.
- trigger: ":review"
replace: |
Reviewed by: Donny
Date: {{date}}
Notes: {{form.notes}}
Content:
{{form.content}}
vars:
- name: clip
type: clipboard
- name: date
type: date
params:
format: "%Y-%m-%d"
- name: form
type: form
params:
layout: |
Notes: [[notes]]
Content:
[[content]]
fields:
notes:
placeholder: "Add your notes"
content:
multiline: true
default: "{{clip}}"
This pattern is useful for:
- Reviewing code snippets
- Editing copied text before pasting
- Adding context to clipboard content
How It Works
Requirements
- Requires a display server (X11 or Wayland)
- On Wayland,
wl-clipboardpackage must be installed - On X11,
xcliporxselis used automatically
What's Next
Learn about the Shell Variable for dynamic content from command execution.