mirror of
https://github.com/ellie/atuin.git
synced 2024-09-11 21:18:22 +03:00
chore(deps): Replace cli-clipboard with arboard (#2067)
This commit is contained in:
parent
69def05f75
commit
33925e3302
645
Cargo.lock
generated
645
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user