Skip to content

Commit

Permalink
copied to clipboard fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ODAncona committed Feb 17, 2025
1 parent 91b59ca commit c752483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions src/clipboard.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::{Context, Result};
use arboard::{Clipboard, LinuxClipboardKind};
use colored::*;
use log::info;
use std::process::{Command, Stdio};

Expand Down Expand Up @@ -69,6 +70,13 @@ pub fn spawn_clipboard_daemon(content: &str) -> anyhow::Result<()> {
.context("Failed to write content to clipboard daemon process")?;
}
info!("Clipboard daemon launched successfully");
println!(
"{}{}{} {}",
"[".bold().white(),
"✓".bold().green(),
"]".bold().white(),
"Copied to clipboard successfully.".green()
);
Ok(())
}

Expand Down
7 changes: 0 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,6 @@ fn main() -> Result<()> {
#[cfg(target_os = "linux")]
{
spawn_clipboard_daemon(&rendered)?;
println!(
"{}{}{} {}",
"[".bold().white(),
"✓".bold().green(),
"]".bold().white(),
"Copied to clipboard successfully.".green()
);
}
#[cfg(not(target_os = "linux"))]
{
Expand Down

0 comments on commit c752483

Please sign in to comment.