treewide: make logging format more consistent; make clipboard persistence opt-in

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9092f93c29fcbe99c90483875f4acd0c6a6a6964
This commit is contained in:
raf 2026-04-03 13:59:09 +03:00
commit da9bf5ea3e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
11 changed files with 44 additions and 32 deletions

View file

@ -160,6 +160,10 @@ enum Command {
/// MIME type preference for clipboard reading.
#[arg(short = 't', long, default_value = "any")]
mime_type: String,
/// Persist clipboard contents after the source application closes.
#[arg(long)]
persist: bool,
},
}
@ -201,7 +205,7 @@ fn confirm(prompt: &str) -> bool {
.with_default(false)
.prompt()
.unwrap_or_else(|e| {
log::error!("Confirmation prompt failed: {e}");
log::error!("confirmation prompt failed: {e}");
false
})
}
@ -477,6 +481,7 @@ fn main() -> eyre::Result<()> {
Some(Command::Watch {
expire_after,
mime_type,
persist,
}) => {
db.watch(
cli.max_dedupe_search,
@ -489,6 +494,7 @@ fn main() -> eyre::Result<()> {
&mime_type,
cli.min_size,
cli.max_size,
persist,
)
.await;
},