From d983e23b57f1c1aa16ef1e43e00f322601c912df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sat, 9 Jan 2016 00:06:41 +0100 Subject: Add --user option to passmenu --- contrib/dmenu/passmenu | 9 +++++++-- 1 file 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 -- cgit v1.2.3