added OTP support to passmenu2
This commit is contained in:
parent
41be977044
commit
8cff4b256f
@ -44,8 +44,12 @@ while [ "$DONE" -eq 0 ] ; do
|
|||||||
# not a directory so it must be a real password entry
|
# not a directory so it must be a real password entry
|
||||||
|
|
||||||
if [[ $typeit -eq 0 ]]; then
|
if [[ $typeit -eq 0 ]]; then
|
||||||
|
if echo "$SELECTION" | grep -q '^/OTP'; then
|
||||||
|
pass otp show -c "$SELECTION" > $HOME/.cache/passstring
|
||||||
|
else
|
||||||
pass show -c "$SELECTION" > $HOME/.cache/passstring
|
pass show -c "$SELECTION" > $HOME/.cache/passstring
|
||||||
pass show "$SELECTION" | awk 'NR == 2 {print $NF}' | xclip -r -i -selection primary
|
pass show "$SELECTION" | awk 'NR == 2 {print $NF}' | xclip -r -i -selection primary
|
||||||
|
fi
|
||||||
sed -e "s/^/\"/" -e "s/$/\"/" $HOME/.cache/passstring | xargs -r notify-send "Password" -t 4000
|
sed -e "s/^/\"/" -e "s/$/\"/" $HOME/.cache/passstring | xargs -r notify-send "Password" -t 4000
|
||||||
sleep 45
|
sleep 45
|
||||||
if [ -f $HOME/.cache/passstring ]; then
|
if [ -f $HOME/.cache/passstring ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user