Skip to content

Features Clipboard

coe0718 edited this page May 23, 2026 · 4 revisions

Clipboard

Read and write clipboard content, plus clipboard history.

Read Clipboard

deskbrid clipboard read

Response:

{
  "type": "response",
  "status": "ok",
  "data": {
    "type": "text",
    "text": "Hello, world!"
  }
}

Protocol:

{"action": "clipboard.read"}

Python:

from deskbrid import Deskbrid

client = Deskbrid()
content = client.clipboard_read()
print(content.text)  # "Hello, world!"

Write Clipboard

deskbrid clipboard write "Hello from Deskbrid!"

Protocol:

{"action": "clipboard.write", "text": "Hello from Deskbrid!"}

Python:

client.clipboard_write("New clipboard content")

Clipboard History

Keep track of clipboard changes over time.

Note: History requires the GNOME Shell extension or Hyprland autostart hook.

List History

deskbrid clipboard history
deskbrid clipboard history --limit 10
deskbrid clipboard history --query "error"

Protocol:

{"action": "clipboard.history", "limit": 10, "query": "error"}

Response:

{
  "type": "response",
  "status": "ok",
  "data": {
    "entries": [
      {
        "id": 1,
        "text": "fixed the bug",
        "timestamp": "2024-01-15T10:30:00Z",
        "source": "terminal"
      },
      {
        "id": 2,
        "text": "git commit -m 'fix'",
        "timestamp": "2024-01-15T10:25:00Z",
        "source": "browser"
      }
    ]
  }
}

Clear History

deskbrid clipboard history clear

Protocol:

{"action": "clipboard.history.clear"}

Python:

# Get recent history
entries = client.clipboard_history(limit=20)

# Search history
error_entries = client.clipboard_history(query="error")

# Clear history
result = client.clipboard_history_clear()

Desktop-Specific Setup

GNOME

Clipboard history requires the GNOME Shell extension:

deskbrid setup  # Enables the extension automatically

Hyprland

Add to your Hyprland config:

exec-once = systemctl --user start deskbrid-history

Or enable clipboard history listener:

systemctl --user enable --now deskbrid-history.service

AI Agent Example

→ {"action": "clipboard.read"}
← {"type": "response", "status": "ok", "data": {"text": "def hello():"}}

→ {"action": "clipboard.write", "text": "def hello():\n    print('world')"}
← {"type": "response", "status": "ok"}

Clone this wiki locally