1 Commits

Author SHA1 Message Date
f7b233614c fix(deps): update all dependencies 2025-04-07 00:49:45 +00:00
6 changed files with 185 additions and 347 deletions

View File

@@ -6,33 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [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 ## [0.0.1] - 2025-01-10
### Added ### Added

457
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
version = "0.0.2" version = "0.0.1"
[workspace.dependencies] [workspace.dependencies]
voidpin = { path = "crates/voidpin" } voidpin = { path = "crates/voidpin" }

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "voidpin" name = "voidpin"
edition = "2024" edition = "2021"
version.workspace = true version.workspace = true

View File

@@ -15,26 +15,9 @@ impl LocalCopier {
pub async fn copy(&self, input: &[u8]) -> anyhow::Result<()> { pub async fn copy(&self, input: &[u8]) -> anyhow::Result<()> {
// FIXME: hardcode for macos // FIXME: hardcode for macos
#[cfg(target_os = "macos")] let mut copy_process = tokio::process::Command::new("pbcopy")
let mut copy_process = { .stdin(Stdio::piped())
tokio::process::Command::new("pbcopy") .spawn()?;
.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()?
};
if let Some(mut stdin_handle) = copy_process.stdin.take() { if let Some(mut stdin_handle) = copy_process.stdin.take() {
stdin_handle stdin_handle

View File

@@ -70,26 +70,6 @@ async fn main() -> anyhow::Result<()> {
.await?; .await?;
} }
Commands::Copy {} => { 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(); let mut input = String::new();
std::io::stdin() std::io::stdin()
.read_to_string(&mut input) .read_to_string(&mut input)
@@ -122,6 +102,7 @@ async fn main() -> anyhow::Result<()> {
.await?; .await?;
} }
}, },
_ => (),
} }
Ok(()) Ok(())