Compare commits
1 Commits
cuddle-ple
...
36821ec329
Author | SHA1 | Date | |
---|---|---|---|
36821ec329 |
27
CHANGELOG.md
27
CHANGELOG.md
@@ -6,33 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.2] - 2025-08-02
|
||||
|
||||
### Added
|
||||
- voidpin now copies to linux as well
|
||||
- add demo gif
|
||||
- add basic remote copu
|
||||
|
||||
### Docs
|
||||
- add more thorough example
|
||||
- correct docs
|
||||
|
||||
### Fixed
|
||||
- *(deps)* update all dependencies (#16)
|
||||
- *(deps)* update rust crate bytes to v1.10.1
|
||||
- *(deps)* update rust crate serde to v1.0.218
|
||||
- *(deps)* update tokio-prost monorepo to v0.13.5
|
||||
- *(deps)* update rust crate uuid to v1.13.1
|
||||
- *(deps)* update all dependencies
|
||||
- *(deps)* update rust crate uuid to v1.12.0
|
||||
|
||||
### Other
|
||||
- *(deps)* update all dependencies
|
||||
- *(deps)* update all dependencies
|
||||
- *(deps)* update all dependencies
|
||||
- *(deps)* update rust crate clap to v4.5.29
|
||||
- fix demo
|
||||
|
||||
## [0.0.1] - 2025-01-10
|
||||
|
||||
### Added
|
||||
|
453
Cargo.lock
generated
453
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.0.2"
|
||||
version = "0.0.1"
|
||||
|
||||
[workspace.dependencies]
|
||||
voidpin = { path = "crates/voidpin" }
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "voidpin"
|
||||
edition = "2024"
|
||||
edition = "2021"
|
||||
|
||||
version.workspace = true
|
||||
|
||||
|
@@ -15,26 +15,9 @@ impl LocalCopier {
|
||||
|
||||
pub async fn copy(&self, input: &[u8]) -> anyhow::Result<()> {
|
||||
// FIXME: hardcode for macos
|
||||
#[cfg(target_os = "macos")]
|
||||
let mut copy_process = {
|
||||
tokio::process::Command::new("pbcopy")
|
||||
.stdin(Stdio::piped())
|
||||
.spawn()?
|
||||
};
|
||||
#[cfg(target_os = "linux")]
|
||||
let mut copy_process = {
|
||||
tokio::process::Command::new("wl-copy")
|
||||
.stdin(Stdio::piped())
|
||||
.spawn()?
|
||||
};
|
||||
#[cfg(target_os = "windows")]
|
||||
let mut copy_process = {
|
||||
todo!("windows not supported yet");
|
||||
|
||||
tokio::process::Command::new("wl-copy")
|
||||
.stdin(Stdio::piped())
|
||||
.spawn()?
|
||||
};
|
||||
let mut copy_process = tokio::process::Command::new("pbcopy")
|
||||
.stdin(Stdio::piped())
|
||||
.spawn()?;
|
||||
|
||||
if let Some(mut stdin_handle) = copy_process.stdin.take() {
|
||||
stdin_handle
|
||||
|
@@ -70,26 +70,6 @@ async fn main() -> anyhow::Result<()> {
|
||||
.await?;
|
||||
}
|
||||
Commands::Copy {} => {
|
||||
if let Ok(remote_host) = std::env::var("VOIDPIN_REMOTE") {
|
||||
let mut input = String::new();
|
||||
std::io::stdin()
|
||||
.read_to_string(&mut input)
|
||||
.context("failed to read from stdin")?;
|
||||
|
||||
if input.is_empty() {
|
||||
tracing::info!("no content to put in clipboard");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
tracing::debug!(content = &input, "found content");
|
||||
state
|
||||
.remote_copier(&remote_host)
|
||||
.copy(input.as_bytes())
|
||||
.await?;
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut input = String::new();
|
||||
std::io::stdin()
|
||||
.read_to_string(&mut input)
|
||||
@@ -122,6 +102,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
.await?;
|
||||
}
|
||||
},
|
||||
_ => (),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user