aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xtools/desktop/password-store.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/desktop/password-store.sh b/tools/desktop/password-store.sh
index 4d3759e..6918e3f 100755
--- a/tools/desktop/password-store.sh
+++ b/tools/desktop/password-store.sh
@@ -12,21 +12,21 @@ rofi -dmenu "${ROFI_ARGS[@]}" | {
12 read ARG1 ARG2 12 read ARG1 ARG2
13 13
14 if [[ -z $ARG1 ]]; then 14 if [[ -z $ARG1 ]]; then
15 exit 1 15 exit 1
16 elif [[ $ARG1 =~ gen ]]; then 16 elif [[ $ARG1 =~ gen ]]; then
17 # Generate a new password by ARG2 17 # Generate a new password by ARG2
18 alacritty --hold -e pass --clip generate $ARG2 18 alacritty --hold -e pass --clip generate $ARG2
19 else 19 else
20 pass $ARG1 | { 20 pass $ARG1 | {
21 # If command fails, just fail directly 21 # If command fails, just fail directly
22 read PASSWORD; [[ -z $PASSWORD ]] && exit 1 22 read PASSWORD; [[ -z $PASSWORD ]] && exit 1
23 23
24 # Simply copy password into system clipboard 24 # Simply copy password into system clipboard
25 echo $PASSWORD | xsel -ib 25 echo $PASSWORD | xsel -ib
26 26
27 # Show success message, and display extra contents 27 # Show success message, and display extra contents
28 rofi -e "Copied: $ARG1 $(echo; echo; cat | sed '1{/^$/d}')" \ 28 rofi -e "Copied: $ARG1 $(echo; echo; cat | sed '1{/^$/d}')" \
29 "${ROFI_ARGS[@]}" 29 "${ROFI_ARGS[@]}"
30 } 30 }
31 fi 31 fi
32} 32}