Commit graph

25 commits

Author SHA1 Message Date
0547376a9e
chore: apply clippy fixes; suppress "too many lines" lint
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696476135218b9979677c66c4be4d96aced8
2025-08-14 17:31:26 +03:00
f3089148e0
db: allow explicitly skipping sensitive entries
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964ed1deaac0215ae9c6f4c70cfdc50164d
2025-08-14 17:24:20 +03:00
86001652cd
stash: allow confirming destructive operations with --ask
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69644c23734a8b088e20473d381390d532b4
2025-08-14 17:24:01 +03:00
f6bf5586ad
import: nesting is ew yuck
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964becfe6f31b0411110b75d4cdfe2b9c63
2025-08-14 10:53:40 +03:00
64c923480e
decode: fallback to relaying current clipboard to stdout on failure
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696451def3e367afa9e8b0dd6ae626906e53
2025-08-13 18:46:02 +03:00
db6a962c75
stash: create database directory automatically if missing
Oops.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964866a1711971322c81ea194aa062466da
2025-08-13 17:07:06 +03:00
9d0ad95e07
db: treat valid UTF-8 entries as text/plain
Makes JSON output more... servicable.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964f642a02e990979f93f53a8b69764b469
2025-08-12 23:01:12 +03:00
9d40dde63a
commands/watch: make it trait-based; move out of main
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964c16396f2013e7f8a5c1a6c0c3bb2aeaa
2025-08-12 22:57:20 +03:00
d9b0908ada
db: allow listing database contents as JSON
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964a756588168f476d984d18f9e8d65bc4e
2025-08-12 22:57:19 +03:00
7d1aa21cdd
db: switch from image to imagesize
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964ab449f38999b5036d6e5554ccae7c049
2025-08-12 21:54:00 +03:00
5bcc23b6f9
stash: don't initialize watch daemon with None
Fixes the daemon always updating the latest entry.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696489a2e9a0928ff799a4210c160014c485
2025-08-12 21:53:59 +03:00
6c5408abd1
stash: make watch loop async
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69641a4f39f0368de1bcf5780afbe8e5c0b1
2025-08-12 21:53:47 +03:00
fcaf5fb14f
stash: print --help text if no subcommand is provided
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69646361b7ade52ee73a6aa11be859132a94
2025-08-12 19:21:13 +03:00
4f725425fc
db: switch to sqlite as the primary backend
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69648f81d0d094e11a3e0f0a19d3b8eccd5d
2025-08-12 19:07:38 +03:00
efcbe17d73
stash: add watch subcommand
Watches primary clipboard for changes and stores them in the database.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964de9949bbe6d8b9301ca97ae785852b46
2025-08-12 19:07:26 +03:00
aa602edbee
treewide: fix remaining clippy warnings
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964a4f18b72e3fa774cec6b81baa8267cb6
2025-08-12 17:34:43 +03:00
7ebe514e3a
stash: deduplicate error reporting
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964f0f3f13190dde392fc859718716b56a8
2025-08-12 17:34:42 +03:00
6e21021306
treewide: improve logging; custom error types with thiserror
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696464e4123d15cfaedf4727776e55948369
2025-08-12 17:34:41 +03:00
c23c5af8c1
stash: allow controlling verbosity from the command line
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69641d5d727b1d95f8c9e2b851b3a194315a
2025-08-12 17:34:39 +03:00
d8d27fab22
stash: remove redundant log messages
Ported from print-based logging, now redundant

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964c1ba52c792bd3c2a3e15a97a3b03260e
2025-08-12 17:34:38 +03:00
0e4f4018ab
stash: use more granular STASH_CLIPBOARD_STATE
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964d59d2ce974ba482aee9b1c8f20cdb44e
2025-08-12 17:34:37 +03:00
0c8003d636
stash: remove redundant import flag
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964348f1ad4915890f0b4ccd59619cc3e1a
2025-08-12 17:34:36 +03:00
254c288111
treewide: improve logging; get rid of unwrap()s
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696442ff25c3f65bb2d5f68e0d78a569fd76
2025-08-12 15:03:41 +03:00
b0820a1940
modularize codebase
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69648ea836bfeb539450db14a666c623412e
2025-08-12 15:01:32 +03:00
e2c10f386f
first working prototype
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964dedc7f122b26b0e2e5040248b7866c93
2025-08-12 15:01:28 +03:00