diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-18 22:32:25 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-18 22:33:18 +0200 |
commit | 3c5941df55d843dacf6378317747ed59fe249a5d (patch) | |
tree | 258d060be04d2627062992dc07314cb2c17f0308 /bin/menuscripts/mpass | |
parent | 76b94ef4b1c25fb5511e33e4d6632aa8c88a0e4a (diff) |
added mpass to menuscripts
Diffstat (limited to 'bin/menuscripts/mpass')
-rwxr-xr-x | bin/menuscripts/mpass | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass new file mode 100755 index 0000000..ebe3956 --- /dev/null +++ b/bin/menuscripts/mpass @@ -0,0 +1,19 @@ +#!/usr/bin/env sh +store="$HOME/.password-store" +lscmd="ls --group-directories-first" +if [ "$MENUCMD" = "tofi" ] +then + menucmd="tofi --prompt pass:" +elif [ "$MENUCMD" = "dmenu" ] +then + menucmd="dmenu -l 4 -g 2 -x -i -p pass:" +else + menucmd="fzf --prompt pass:" +fi +while [ -d "${store}/${file}" ] +do + choice="$($lscmd "${store}/${file}" | sed 's/\.gpg$//'| $menucmd)" + [ "$choice" ] || break + file="${file}/${choice}" +done +pass show -c "${file}" |