From 32c6ef075a3fcd0ad1921d3df17048fb0751f94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Mon, 21 Oct 2024 16:03:31 +0200 Subject: [PATCH] Wait for clipboard to be overwritten before exitting (exitting clears the clipboard under linux) --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index ede4061..41cf4b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ -use arboard::Clipboard; +use arboard::{Clipboard, SetExtLinux}; fn main() { let mut clipboard = Clipboard::new().unwrap(); let text = clipboard.get_text().unwrap(); - clipboard.set_text(text).unwrap(); + clipboard.set().wait().text(text).unwrap(); }