mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-22 00:03:49 +01: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"]
|
sync = ["atuin-client/sync"]
|
||||||
daemon = ["atuin-client/daemon"]
|
daemon = ["atuin-client/daemon"]
|
||||||
server = ["atuin-server", "atuin-server-postgres"]
|
server = ["atuin-server", "atuin-server-postgres"]
|
||||||
clipboard = ["cli-clipboard"]
|
clipboard = ["arboard"]
|
||||||
check-update = ["atuin-client/check-update"]
|
check-update = ["atuin-client/check-update"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
@ -86,8 +86,11 @@ unicode-segmentation = "1.11.0"
|
|||||||
sysinfo = "0.30.7"
|
sysinfo = "0.30.7"
|
||||||
regex="1.10.5"
|
regex="1.10.5"
|
||||||
|
|
||||||
[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies]
|
[target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies]
|
||||||
cli-clipboard = { version = "0.4.0", optional = true }
|
arboard = { version = "3.4", optional = true }
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
|
arboard = { version = "3.4", optional = true, features = ["wayland-data-control"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tracing-tree = "0.3"
|
tracing-tree = "0.3"
|
||||||
|
@ -1181,7 +1181,10 @@ pub async fn history(
|
|||||||
any(target_os = "windows", target_os = "macos", target_os = "linux")
|
any(target_os = "windows", target_os = "macos", target_os = "linux")
|
||||||
))]
|
))]
|
||||||
fn set_clipboard(s: String) {
|
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(
|
#[cfg(not(all(
|
||||||
|
Loading…
Reference in New Issue
Block a user