summaryrefslogtreecommitdiff
path: root/contrib/dmenu/passmenu
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dmenu/passmenu')
-rwxr-xr-xcontrib/dmenu/passmenu9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 76d92ab..2cc9364 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -7,6 +7,11 @@ if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
+user=
+if [[ $1 == "--user" ]]; then
+ user=-u
+ shift
+fi
if [[ -n $WAYLAND_DISPLAY ]]; then
dmenu=dmenu-wl
@@ -29,7 +34,7 @@ password=$(printf '%s\n' "${password_files[@]}" | "$dmenu" "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
- pass show -c "$password" 2>/dev/null
+ pass show $user -c "$password" 2>/dev/null
else
- pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
+ pass show $user "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
fi