diff options
Diffstat (limited to 'bin/guiscripts')
-rwxr-xr-x | bin/guiscripts/dmpass | 11 | ||||
-rwxr-xr-x | bin/guiscripts/mpass | 19 |
2 files changed, 19 insertions, 11 deletions
diff --git a/bin/guiscripts/dmpass b/bin/guiscripts/dmpass deleted file mode 100755 index bb7bee2..0000000 --- a/bin/guiscripts/dmpass +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env sh -store="$HOME/.password-store" -lscmd="ls --group-directories-first" -dmenucmd="dmenu -l 4 -g 2" -while [ -d "${store}/${file}" ] -do - choice="$($lscmd "${store}/${file}" | sed 's/\.gpg$//'| $dmenucmd)" - [ "$choice" ] || break - file="${file}/${choice}" -done -pass show -c "${file}" diff --git a/bin/guiscripts/mpass b/bin/guiscripts/mpass new file mode 100755 index 0000000..386abdf --- /dev/null +++ b/bin/guiscripts/mpass @@ -0,0 +1,19 @@ +#!/usr/bin/env sh +store="$HOME/.password-store" +lscmd="ls --group-directories-first" +if [ "$MENUCMD" = "tofi" ] +then + menucmd="tofi --matching-algorithm prefix --prompt pass:" +elif [ "$MENUCMD" = "dmenu" ] +then + menucmd="dmenu -l 4 -g 2 -x -i -p pass:" +else + menucmd="fzf" +fi +while [ -d "${store}/${file}" ] +do + choice="$($lscmd "${store}/${file}" | sed 's/\.gpg$//'| $menucmd)" + [ "$choice" ] || break + file="${file}/${choice}" +done +pass show -c "${file}" |