added password menu script and updated the readme.
This commit is contained in:
Executable
+27
@@ -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
|
||||
|
||||
) &
|
||||
Reference in New Issue
Block a user