diff options
-rwxr-xr-x | tools/desktop/password-store.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/desktop/password-store.sh b/tools/desktop/password-store.sh index 21dec79..1de3148 100755 --- a/tools/desktop/password-store.sh +++ b/tools/desktop/password-store.sh | |||
@@ -10,8 +10,6 @@ sed 's/.gpg$//' | \ | |||
10 | rofi -dmenu "${ROFI_ARGS[@]}" | { | 10 | rofi -dmenu "${ROFI_ARGS[@]}" | { |
11 | # Get arguments for command 'pass' | 11 | # Get arguments for command 'pass' |
12 | read ARG1 ARG2 | 12 | read ARG1 ARG2 |
13 | echo ARG1: $ARG1 | ||
14 | echo ARG2: $ARG2 | ||
15 | 13 | ||
16 | if [[ -z $ARG1 ]]; then | 14 | if [[ -z $ARG1 ]]; then |
17 | exit 1 | 15 | exit 1 |
@@ -35,8 +33,11 @@ rofi -dmenu "${ROFI_ARGS[@]}" | { | |||
35 | -e "Copied: $ARG1 $(echo; echo; cat | sed '1{/^$/d}')" | 33 | -e "Copied: $ARG1 $(echo; echo; cat | sed '1{/^$/d}')" |
36 | } || { | 34 | } || { |
37 | # Make sure user want to create a new password | 35 | # Make sure user want to create a new password |
38 | alacritty -e dialog --yesno \ | 36 | return_code=$(alacritty -e sh -c ' |
39 | "Password doesn't exist, Generate a new one?" 7 30 || exit 1 | 37 | dialog --yesno "Password does not exist, Generate a new one?" 8 30; |
38 | echo "$?" | ||
39 | ') | ||
40 | [[ $return_code == 1 ]] && exit 1 | ||
40 | 41 | ||
41 | # Generate a new password by ARG1 | 42 | # Generate a new password by ARG1 |
42 | alacritty -e pass generate $ARG1 --clip && \ | 43 | alacritty -e pass generate $ARG1 --clip && \ |