added password menu script and updated the readme.

This commit is contained in:
2026-06-02 18:43:57 -05:00
parent d5305cf47e
commit 2465ec78c2
2 changed files with 32 additions and 0 deletions
+5
View File
@@ -8,3 +8,8 @@ A script that wraps the pushover API for sending notifications.
[Here](https://learningunix.net/posts/dead-simple-notifications-with-pushover/)
is an article on example usage. It relies on the user's pushover user and api key
to be saved as environment variables.
## pass-menu.sh
Pipe the password store entries into wofi to create a selectable menu.
Depends on wofi, pass, and wl-clipboard. Kilpper was fighing me when
clearing the clipboard so the dbus6 line was added.
Executable
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
deps="wofi pass wl-copy"
for dep in $deps; do
command -v $dep >/dev/null 2>&1 || {
echo "error: $dep is not installed" >&2
exit 1
}
done
store="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
passwords="$(find "$store" -name "*.gpg" | sed -e 's|\.gpg$||' | sed -e "s|$store/||")"
selection=$(echo "$passwords" | wofi --dmenu)
[ -z "$selection" ] && exit 0
pass show "$selection" | head -n 1 | wl-copy
(
sleep 15
wl-copy --clear
command -v qdbus6 >/dev/null 2>&1 && qdbus6 org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory
) &