diff options
Diffstat (limited to 'passmenu-extended.patch')
-rw-r--r-- | passmenu-extended.patch | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/passmenu-extended.patch b/passmenu-extended.patch deleted file mode 100644 index 6aaddf930e01..000000000000 --- a/passmenu-extended.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --unified --recursive --text password-store-1.7.3/contrib/dmenu/passmenu password-store-1.7.3.new/contrib/dmenu/passmenu ---- password-store-1.7.3/contrib/dmenu/passmenu 2020-05-07 10:15:53.692356060 +1200 -+++ password-store-1.7.3.new/contrib/dmenu/passmenu 2020-05-07 10:11:21.246208556 +1200 -@@ -8,6 +8,30 @@ - shift - fi - -+typeuser=0 -+if [[ $1 == "--typeuser" ]]; then -+ typeuser=1 -+ shift -+fi -+ -+typeboth=0 -+if [[ $1 == "--typeboth" ]]; then -+ typeboth=1 -+ shift -+fi -+ -+otp=0 -+if [[ $1 == "--otp" ]]; then -+ otp=1 -+ shift -+fi -+ -+typeotp=0 -+if [[ $1 == "--typeotp" ]]; then -+ typeotp=1 -+ shift -+fi -+ - prefix=${PASSWORD_STORE_DIR-~/.password-store} - password_files=( "$prefix"/**/*.gpg ) - password_files=( "${password_files[@]#"$prefix"/}" ) -@@ -17,9 +41,24 @@ - - [[ -n $password ]] || exit - --if [[ $typeit -eq 0 ]]; then -- pass show -c "$password" 2>/dev/null --else -+if [[ $typeit -eq 1 ]]; then -+ pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | -+ xdotool type --clearmodifiers --file - -+elif [[ $typeuser -eq 1 ]]; then -+ pass show "$password" | awk 'BEGIN{ORS="\t"} NR==2 {print; exit}' | -+ sed 's/user\:\s//' | # Specify a custom filter if needed -+ xdotool type --clearmodifiers --file - -+elif [[ $typeboth -eq 1 ]]; then -+ pass show "$password" | awk 'BEGIN{ORS="\t"} NR==2 {print; exit}' | -+ sed 's/user\:\s//' | # Specify a custom filter if needed -+ xdotool type --clearmodifiers --file - - pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | - xdotool type --clearmodifiers --file - -+elif [[ $otp -eq 1 ]]; then -+ pass otp -c "$password" 2>/dev/null -+elif [[ $typeotp -eq 1 ]]; then -+ pass otp "$password" | { IFS= read -r pass; printf %s "$pass"; } | -+ xdotool type --clearmodifiers --file - -+else -+ pass show -c "$password" 2>/dev/null - fi -diff --unified --recursive --text password-store-1.7.3/contrib/dmenu/README.md password-store-1.7.3.new/contrib/dmenu/README.md ---- password-store-1.7.3/contrib/dmenu/README.md 2020-05-07 10:15:27.296221593 +1200 -+++ password-store-1.7.3.new/contrib/dmenu/README.md 2020-05-07 10:09:48.133462161 +1200 -@@ -1,13 +1,24 @@ - `passmenu` is a [dmenu][]-based interface to [pass][], the standard Unix - password manager. This design allows you to quickly copy a password to the - clipboard without having to open up a terminal window if you don't already have --one open. If `--type` is specified, the password is typed using [xdotool][] --instead of copied to the clipboard. -+one open. -+ -+If `--type` is specified, the password is typed using [xdotool][] -+instead of copied to the clipboard. If `--typeuser` is specified, the -+second line is typed using [xdotool][] (ideally the username). If `--typeboth` -+is specified, the second line is typed using [xdotool][] first (ideally the -+username), then tab, then the first line. -+ -+If [pass-otp][] is installed and `--typeotp` is specified, the otpauth URI -+is used to generate a token that is typed using [xdotool][]. If `--otp` is -+specified, the otpauth URI is used to generate a token that is copied to -+the clipboard. - - # Usage - -- passmenu [--type] [dmenu arguments...] -+ passmenu [--type | --typeuser | --typeboth | --typeotp | --otp] [dmenu arguments...] - --[dmenu]: http://tools.suckless.org/dmenu/ --[xdotool]: http://www.semicomplete.com/projects/xdotool/ --[pass]: http://www.zx2c4.com/projects/password-store/ -+[dmenu]: https://tools.suckless.org/dmenu/ -+[xdotool]: https://www.semicomplete.com/projects/xdotool/ -+[pass]: https://www.zx2c4.com/projects/password-store/ -+[pass-otp]: https://github.com/tadfisher/pass-otp |