047445b143
db: distinguish HEIC from HEIF in mime type detection
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1a25c6d30fde6b4cc33c2a1666b2e1606a6a6964
2026-01-22 13:48:30 +03:00
3d22a271bc
chore: add tempfile dependency for tests
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibf7a842a2a26f83e8adaf1123386306b6a6a6964
2026-01-22 13:41:59 +03:00
c65073e0d1
db: rewrite migration with transactional schema versioning
...
This makes Stash's database handler a bit more robust. The changes
started as me trying to add an entry expiry, but I've realized that the
database system is a little fragile and it assumed the database does not
change, ever. Well that's not true, it does change and when it does
there's a chance that everything implodes.
We now wrap migrations in transaction for atomicity and track version
via PRAGMA user_version (0 -> 3). We also check column existence before
ALTER TABLE and use `last_insert_rowid()` instead of `next_sequence()`.
Last but not least, a bunch of regression tests have been added to the
database system because I'd rather not discover regressions in
production.
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ifeab42b0816a5161d736767cb82065346a6a6964
2026-01-22 13:41:58 +03:00
3165543580
commands: prevent usize underflow when navigating empty entry list
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0432dcc88b22226772f6bb6e05cc64d36a6a6964
2026-01-22 13:41:57 +03:00
20b6a12461
stash: make db module public for test visibility
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5f75e6515114e7479a3fe63771a4e7fe6a6a6964
2026-01-22 13:41:56 +03:00
dca7cca455
nix: add cargo-nextest to devshell
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2266c2f3fccff23fa3950f8fac3365f36a6a6964
2026-01-22 13:41:55 +03:00
59423f9ae4
list: add content_hash and last_accessed tracking with de-duplication
...
Adds a `content_hash` column and index for deduplication, and a
`last_accessed` column & index for time tracking. We now de-duplicate on
copy by not copying if present, but instead bubbling up matching entry.
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icbcdbd6ac28bbb21324785cae30911f96a6a6964
2026-01-22 13:41:54 +03:00
65a8eebd46
Merge pull request #57 from NotAShelf/notashelf/push-royltkszywmz
...
multicall: prevent newline corruption of binary data in wl-copy
2025-12-23 10:29:12 +03:00
f2274aa524
multicall: auto-select MIME type more intelligently when not specified
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Idfd5ab25079161d694bda429e70500a16a6a6964
2025-12-23 10:11:28 +03:00
bbfe583423
multicall: prevent newline corruption of binary data in wl-copy
...
Previously we unconditionally appended a newline to all clipboard
contents, which ended up corrupting binary files like PNG images when
using shell redirection (e.g., `wl-paste > file.png`). Now we
intelligently (in quotes) detect content type via MIME type and only
append newlines to text-based content such as `text/*`,
`application/json` and so on. Binary data on another hand is written
exactly as it is. Falls back to UTF-8 validation when MIME type is
unavailable.
On paper this is also fully backwards compatible; text content still
gets newline by default *unless* the `--no-newline` flag is used.
Fixes #52
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8b1e6f7013d081150be761820cafd1926a6a6964
2025-12-23 09:41:19 +03:00
1f0312b2f6
Merge pull request #56 from NotAShelf/notashelf/push-umuwyuqntslp
...
various: bump dependencies
2025-12-22 17:14:53 +03:00
f6818c9e6f
chore: release v0.3.3
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5d53159c67ea83260c213ea93114b3d96a6a6964
2025-12-22 16:59:13 +03:00
c2182d21dc
chore: bump dependencies; fix lifetime warnings for Rust 1.90+
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If755ceefb970311c7660118cb2019c2c6a6a6964
2025-12-22 16:59:12 +03:00
8a25a03486
flake: bump nixpkgs
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4572c7075e11282280d514ffde4361586a6a6964
2025-12-22 16:59:11 +03:00
f838365314
Merge pull request #49 from NotAShelf/notashelf/push-vootvqpuytyv
...
multicall: go back to forking solution
2025-11-25 10:08:24 +03:00
bb88c89a0f
Merge pull request #50 from NotAShelf/dependabot/github_actions/actions/checkout-6
...
build(deps): bump actions/checkout from 5 to 6
2025-11-21 21:03:35 +03:00
dependabot[bot]
c8ead9a308
build(deps): bump actions/checkout from 5 to 6
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 14:26:17 +00:00
a68946d54d
various: fix clippy lints
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4bb649a5161460d8794dc5c93baa6cc46a6a6964
2025-11-13 00:05:52 +03:00
2d8ccf2a4f
multicall: go back to forking solution
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2a24a3c7efc41fc45c675fd98e08782e6a6a6964
2025-11-13 00:05:48 +03:00
96089f364b
docs: fix typo
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9b29db50afe2f2768bd4bc260bc5aaf96a6a6964
2025-10-28 13:03:00 +03:00
61ff65e9e8
stash: make log messages lowercase
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I45a9055b6bc3bfbf2179627470d0cedd6a6a6964
2025-10-28 13:02:59 +03:00
b71801f7df
Merge pull request #44 from NotAShelf/dependabot/cargo/clap-4.5.50
...
build(deps): bump clap from 4.5.49 to 4.5.50
2025-10-28 13:03:05 +03:00
dependabot[bot]
9fc118a924
build(deps): bump clap from 4.5.49 to 4.5.50
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.49 to 4.5.50.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.49...clap_complete-v4.5.50 )
---
updated-dependencies:
- dependency-name: clap
dependency-version: 4.5.50
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 09:54:29 +00:00
5a71640e5f
Merge pull request #43 from NotAShelf/notashelf/push-rnnzunzyvynn
...
multicall: cleanup; match wl-copy/wl-paste interfaces more closely
2025-10-28 12:53:05 +03:00
d59ac77b9f
stash: utilize clap for multicall functionality; simplify CLI handler
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I84d9f46bb9bba0e893aa4f99d6ff48f76a6a6964
2025-10-28 12:40:17 +03:00
43a3aae496
docs: add attributions section; detail remaining sections
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ice462ee8fc34e375a01940b6b013f5496a6a6964
2025-10-28 12:40:13 +03:00
c95d9a4567
chore: remove unused deps; format with taplo
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If575be0b2c6f1f8b8eac6cacaa2784606a6a6964
2025-10-27 11:11:14 +03:00
78acc38044
multicall: cleanup; modularize
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I658f22fdf983777354a5beb32df631916a6a6964
2025-10-27 11:11:13 +03:00
e94d931e67
chore: remove redundant unix check in build wrapper
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I174857e67f2e400d5dfdd8bfbe7c681d6a6a6964
2025-10-27 11:10:57 +03:00
955a5d51f8
multicall: cleanup; match wl-copy/wl-paste interfaces more closely
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8cc05c0141cccff8378ef4fd83ccf77d6a6a6964
2025-10-25 08:38:53 +03:00
7a4f6378e9
nix: build with the mold linker on x86_64-linux
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5d1e28f9b74fe1a4881a7105722ef3376a6a6964
2025-10-25 08:37:21 +03:00
d3911dd81a
nix: add NixOS module
...
Closes #3
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964ecdb3bf1e5f7e2b902713eb8d2755ad1
2025-10-23 15:10:46 +03:00
b50702480f
meta: rename 'vendor' to contrib; don't vendor service in Nix derivation
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696479e976a7f4db18e6501e347a4940ce28
2025-10-23 15:10:45 +03:00
a9da424e70
chore: release v0.3.2
...
v0.3.2
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964fc36c56f505e7a679727e1f4f7d7095c
2025-10-14 08:48:50 +03:00
0a8fda66a0
chore: bump dependencies
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964fc9d82b2ca85798ea4dda196e0a25e33
2025-10-14 08:48:49 +03:00
a94ef7f5b4
nix: install multicall binaries in postInstall
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69646b6afeb1d9dda8d16e00f6f39b8046ff
2025-10-14 08:48:45 +03:00
a59e207e76
ci: trigger Nix cache action more often
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696463b203052b421a924fb85885fc34752b
2025-10-09 16:42:40 +03:00
7f6949b001
Merge pull request #39 from NotAShelf/notashelf/push-vtwowuvxsnos
...
stash: add multicall support for stash-copy and stash-paste
2025-10-09 15:04:27 +03:00
c2427c138a
docs: mention multicall exports
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964c5f2d863774a214ab54bc17caa7c9bbb
2025-10-09 14:58:34 +03:00
78fa23a764
multicall: remove program name prefixes from log and error messages
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964f65a0f1e473a50abfa985365ad8f1fa1
2025-10-09 14:44:45 +03:00
6496d3963d
stash: add multicall support for stash-copy and stash-paste
...
We can finally tell the users that they can uninstall `wl-copy` and
`wl-paste` on their systems. Stash now somewhat supports being invoked
under the names `stash-copy` and `stash-paste` to fully reimplement the
functionality of `wl-copy` and `wl-paste` respectively.
A build wrapper has been added generate symlinks for `stash-copy`, `stash-paste`,
`wl-copy`, and `wl-paste`. `wl-copy` and `wl-paste` links are provided
only for backwards compatibility, but they will not go away anytime
soon.
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964463b35427cb720fbab68b252944cc90c
2025-10-09 14:40:54 +03:00
74f9374a4e
Merge pull request #38 from NotAShelf/notashelf/push-xmznywpywuqo
...
list: add clipboard actions for delete and copy; notify
2025-10-09 14:22:06 +03:00
f8440926b1
list: log clipboard copy errors and update notification message
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69649bdd37a44f254d520e33a54634958ada
2025-10-09 11:45:37 +03:00
d8b1ac1f37
list: properly error notification if clipboard copy fails
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696459d7fbc344545daeead6164cad5cde6f
2025-10-09 11:45:36 +03:00
4c0782f80e
list: add clipboard actions for delete and copy; notify
...
This adds an optional dependency on notify-rust, which we use to display
notifications when an entry is deleted or copied. If the user thinks a
TUI using desktop notifications is *not* desirable, it can be disabled
with the `notifications` feature flag.
We now support copying entries to the clipboard with `Enter` and
deleting entries with `Shift+D`. Both of those will show notifications.
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69642d0c13a1359b3b51125cc4b691cd5679
2025-10-09 11:08:50 +03:00
514572b804
nix: add a 'stash' package alias
...
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69644d284206d2502da6f21997293fecd784
2025-10-09 09:19:05 +03:00
dd4a9b5894
Merge pull request #36 from NotAShelf/dependabot/cargo/serde-1.0.228
...
build(deps): bump serde from 1.0.226 to 1.0.228
2025-09-30 12:45:40 +03:00
dependabot[bot]
3d0810c824
build(deps): bump serde from 1.0.226 to 1.0.228
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.226 to 1.0.228.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.226...v1.0.228 )
---
updated-dependencies:
- dependency-name: serde
dependency-version: 1.0.228
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 18:59:20 +00:00
91be1ad241
Merge pull request #34 from NotAShelf/dependabot/cargo/thiserror-2.0.17
...
build(deps): bump thiserror from 2.0.16 to 2.0.17
2025-09-29 21:52:49 +03:00
0a803a6a40
Merge pull request #35 from NotAShelf/dependabot/cargo/regex-1.11.3
...
build(deps): bump regex from 1.11.2 to 1.11.3
2025-09-29 21:52:40 +03:00