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
This commit is contained in:
raf 2025-10-09 10:28:14 +03:00
commit 4c0782f80e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 651 additions and 11 deletions

View file

@ -14,8 +14,9 @@ name = "stash" # actual binary name for Nix, Cargo, etc.
path = "src/main.rs"
[features]
default = ["use-toplevel"]
default = ["use-toplevel", "notifications"]
use-toplevel = ["dep:wayland-client", "dep:wayland-protocols", "dep:wayland-protocols-wlr"]
notifications = ["dep:notify-rust"]
[dependencies]
clap = { version = "4.5.48", features = ["derive", "env"] }
@ -42,6 +43,7 @@ unicode-width = "0.2.0"
wayland-client = { version = "0.31.11", optional = true }
wayland-protocols = { version = "0.32.0", optional = true }
wayland-protocols-wlr = { version = "0.3.9", optional = true }
notify-rust = { version = "4.11.7", optional = true }
[profile.release]
lto = true