#linux #windows #macos

selection

Get the text selected by the cursor

3 stable releases

1.1.1 Dec 23, 2023
1.1.0 Nov 14, 2023
1.0.0 Sep 7, 2023
0.1.0 Sep 7, 2023

#289 in GUI

Download history 145/week @ 2023-10-29 174/week @ 2023-11-05 133/week @ 2023-11-12 341/week @ 2023-11-19 153/week @ 2023-11-26 107/week @ 2023-12-03 149/week @ 2023-12-10 270/week @ 2023-12-17 340/week @ 2023-12-24 201/week @ 2023-12-31 293/week @ 2024-01-07 123/week @ 2024-01-14 42/week @ 2024-01-21 91/week @ 2024-01-28 64/week @ 2024-02-04 152/week @ 2024-02-11

356 downloads per month

GPL-3.0-only

17KB
252 lines

Selection

Get the text selected by the cursor

Example

selection = "1.1.0"
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

Dependencies

~0–53MB
~793K SLoC