MCPcopy Index your code
hub / github.com/pot-app/Selection

github.com/pot-app/Selection @1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.2.0 ↗ · + Follow
12 symbols 20 edges 4 files 4 documented · 33% 23 cross-repo links updated 2y ago★ 691 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Selection

Get the text selected by the cursor

Example

selection = "1.2.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

  • [x] Windows
  • [x] MacOS
  • [x] Linux
  • [x] X11
  • [x] Wayland

Implementation details

Windows

  • Automation API
  • Clipboard

MacOS

  • Accessibility API
  • Clipboard

Linux

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

Core symbols most depended-on inside this repo

get_text_on_x11
called by 3
src/linux.rs
get_text_on_wayland
called by 1
src/linux.rs
get_text_by_automation
called by 1
src/windows.rs
get_text_by_clipboard
called by 1
src/windows.rs
copy
called by 1
src/windows.rs
get_selected_text_by_ax
called by 1
src/macos.rs
get_text_by_clipboard
called by 1
src/macos.rs
get_text
called by 0
src/lib.rs

Shape

Function 12

Languages

Rust100%

Modules by API surface

src/windows.rs4 symbols
src/macos.rs3 symbols
src/linux.rs3 symbols
src/lib.rs2 symbols

For agents

$ claude mcp add Selection \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page