pub fn copy_plain_text_to_clipboard(text: &str) -> Result<(), String>Expand description
What: Copy plain text to the system clipboard without extra suffixes.
Inputs:
text: Exact bytes to place on the clipboard.
Output:
Ok(())whenwl-copyorxclipaccepted stdin.
ยงErrors
- Returns
Errwith install guidance when neither clipboard tool could be spawned.
Details:
- Prefers
wl-copywhenWAYLAND_DISPLAYis set, otherwise triesxclip. - Does not invoke a shell; uses
Commandargument lists only.