diff options
| author | Cristian Le <cristian.le@mpsd.mpg.de> | 2024-07-10 18:20:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-10 16:20:30 +0000 |
| commit | 33925e330253392af9bd29b6d6dc24d54cb80947 (patch) | |
| tree | 1821d7e0aa932e3180e193aecf0da05fe410d2a3 /crates | |
| parent | fix(gui): weekInfo call on Edge (#2252) (diff) | |
| download | atuin-33925e330253392af9bd29b6d6dc24d54cb80947.zip | |
chore(deps): Replace cli-clipboard with arboard (#2067)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/atuin/Cargo.toml | 9 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/search/interactive.rs | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/crates/atuin/Cargo.toml b/crates/atuin/Cargo.toml index d201e4d4..fa1cadd9 100644 --- a/crates/atuin/Cargo.toml +++ b/crates/atuin/Cargo.toml @@ -38,7 +38,7 @@ client = ["atuin-client"] sync = ["atuin-client/sync"] daemon = ["atuin-client/daemon"] server = ["atuin-server", "atuin-server-postgres"] -clipboard = ["cli-clipboard"] +clipboard = ["arboard"] check-update = ["atuin-client/check-update"] [dependencies] @@ -86,8 +86,11 @@ unicode-segmentation = "1.11.0" sysinfo = "0.30.7" regex="1.10.5" -[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies] -cli-clipboard = { version = "0.4.0", optional = true } +[target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies] +arboard = { version = "3.4", optional = true } + +[target.'cfg(target_os = "linux")'.dependencies] +arboard = { version = "3.4", optional = true, features = ["wayland-data-control"] } [dev-dependencies] tracing-tree = "0.3" diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs index 36351c54..e323b76d 100644 --- a/crates/atuin/src/command/client/search/interactive.rs +++ b/crates/atuin/src/command/client/search/interactive.rs @@ -1181,7 +1181,10 @@ pub async fn history( any(target_os = "windows", target_os = "macos", target_os = "linux") ))] fn set_clipboard(s: String) { - cli_clipboard::set_contents(s).unwrap(); + let mut ctx = arboard::Clipboard::new().unwrap(); + ctx.set_text(s).unwrap(); + // Use the clipboard context to make sure it is saved + ctx.get_text().unwrap(); } #[cfg(not(all( |
