Built-in Actions
User GuideBuilt-in Actions

Built-in Actions

Calculate evaluator, dictionary define, calendar event creation, search engines, and clipboard tools.

Calculate (Smart Math Evaluator)

OpenClip includes a custom recursive descent math parser (MathEvaluator.swift) that evaluates arithmetic expressions without relying on risky shell evaluations or crashing on malformed syntax:

  • Supported Operations: +, -, * (and Unicode ×), / (and Unicode ÷), % (modulo), parentheses (), and decimal numbers.
  • Automatic Sanitization: Strips thousands commas (e.g. 1,000 * 2.52500).
  • Configurable Modes: Output can be set to Paste Result, Copy Result, or Append Expression (e.g. 12 * 8 = 96).

Dictionary Define

When a single word (1–40 characters) is selected:

  • Left-Click: Opens macOS Dictionary.app via dict://<word>.
  • Shift-Click / Right-Click: Headless lookup via CoreServices DCSCopyTextDefinition—copies the definition to your clipboard without opening any windows.

Calendar Events (.ics & Google)

Detects natural language dates and times (e.g. "Tomorrow at 3pm" or "Friday 10:00") via NSDataDetector:

  • Native iCal Mode: Generates a valid RFC 5545 .ics file and opens macOS Calendar to create the event with a 1-hour duration.
  • Google Calendar Mode: Opens Google Calendar template URL in your default browser.

Clipboard & System Actions

ActionIdentifierBehavior
Copybuiltin.copyWrites selection to pasteboard.
Cutbuiltin.cutWrites selection to pasteboard and sends synthetic Delete keycode.
Pastebuiltin.pasteSimulates ⌘V keystroke to insert clipboard contents.
Search Webbuiltin.searchOpens configured search engine (Google, DuckDuckGo, Bing, Kagi).
Reveal in Finderbuiltin.reveal_in_finderResolves local file paths (~/Downloads, /var/log) and selects file in Finder.
Word Completionbuiltin.completionQueries NSSpellChecker for spell completions and word suggestions.
Open URLbuiltin.openurlOpens highlighted web links directly in default browser.