Created
November 8, 2016 12:32
-
-
Save Kilobyte22/549c5179fcca87b19efab0eb819038d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
title=$(dmenu -p 'password title: ' < /dev/null) | |
if [[ "$title" != "" ]]; then | |
if [[ -f ~/.password-store/"$title".gpg ]]; then | |
ans=$(echo -e 'no\nyes' | dmenu -p 'answer: ' -mesg 'Password exists, do you want to overwrite?' -only-match) | |
if [[ "$ans" == yes ]]; then | |
pass generate -f -c "$title" 30 && \ | |
notify-send "Password Store" "Password generated" | |
fi | |
else | |
pass generate -c "$title" 30 && \ | |
notify-send "Password Store" "Password generated" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment