tauri-text-selection-popup

Detect global text selections and display a cursor-following popup with Translate and Summarize actions.

22|2|Updated Sep 13, 2023
One-click install
npx skills add https://github.com/HuakunShen/tauri-demo --skill tauri-text-selection-popup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tauri-text-selection-popup
Source: https://github.com/HuakunShen/tauri-demo/tree/main/examples/text-selection
Command: npx skills add https://github.com/HuakunShen/tauri-demo --skill tauri-text-selection-popup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This tool solves the tedious, manual process of selecting text in any application and turning it into actionable options by displaying a floating popup near the cursor with Translate and Summarize actions.

Core Features & Use Cases

  • Global text selection detection across applications
  • Floating, always-on-top frameless popup positioned near the cursor with monitor-aware edge clamping
  • Actions like Translate and Summarize, with multi-monitor support and accessibility prerequisites

Quick Start

Select text anywhere to see a contextual popup near your cursor and choose an action.

Frequently Asked Questions about tauri-text-selection-popup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I display a floating popup near the cursor when text is selected in a Tauri app?

This Skill detects system-wide text selection and dynamically creates a frameless Tauri WebviewWindow popup near the cursor. It uses monitor-aware edge clamping to ensure the floating window remains fully visible across multi-monitor setups.

Can I trigger a global text selection popup across different operating systems?

Yes, this Skill supports global text selection detection across macOS, Linux, and Windows. It retrieves native text universally and displays the contextual floating popup over any active application.

How does monitor-aware positioning work for multi-monitor floating windows in Tauri?

Monitor-aware positioning applies edge clamping to prevent floating windows from rendering off-screen. It calculates cursor boundaries relative to active monitors to keep the popup fully visible in multi-monitor environments.

What Rust crates do I need for global input monitoring and native text retrieval in Tauri?

You need the monio crate for global input monitoring and the selection crate for native text retrieval. These dependencies enable system-wide detection to trigger the floating popup.

Do I need accessibility permissions to detect system-wide text selection on macOS?

Yes, accessibility prerequisites are required to detect system-wide text selection on macOS. Granting these permissions allows global input monitoring and native text retrieval to function across applications.

How do I add Translate and Summarize actions to a system-wide text selection popup?

You implement Translate and Summarize actions by configuring the dynamically generated frameless popup. When text is selected, the floating window appears with these actionable options to process the retrieved native text.