oncealong / Selection

Get the text selected by the cursor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selection

Get the text selected by the cursor

Example

selection = {git = "https://github.com/pot-app/Selection"}
use selection::get_text;

fn main() {
    // Return the selected text on success
    // Otherwise return the empty string
    let text = get_text();
    println!("{}", text);
}

Support Platform

  • Windows
  • MacOS
  • Linux
    • X11
    • Wayland

Implementation details

Windows

  • Automation API
  • Clipboard

MacOS

  • Clipboard

Linux

  • Primary Clipboard
    • X11: x11-clipboard
    • Wayland: wl-clipboard

About

Get the text selected by the cursor

License:GNU General Public License v3.0


Languages

Language:Rust 100.0%