diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/desktop/password-store.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/desktop/password-store.sh b/tools/desktop/password-store.sh new file mode 100755 index 0000000..e83529b --- /dev/null +++ b/tools/desktop/password-store.sh | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #! /bin/bash | ||
| 2 | |||
| 3 | find ~/.password-store -name '*gpg' -printf %P\\n | \ | ||
| 4 | sed 's/.gpg$//' | \ | ||
| 5 | rofi -dmenu -font 'Hack 22' | { | ||
| 6 | read ARG1 ARG2 | ||
| 7 | if [[ $ARG1 =~ gen ]]; then | ||
| 8 | # Generate a new password by ARG2 | ||
| 9 | alacritty --hold -e pass generate $ARG2 | ||
| 10 | else | ||
| 11 | pass $ARG1 | { | ||
| 12 | read PASSWORD | ||
| 13 | echo $PASSWORD | xsel -ib | ||
| 14 | |||
| 15 | rofi -e "Password Copied: $ARG1 $(echo; echo; cat | sed '1{/^$/d}')" \ | ||
| 16 | -font 'Hack 22' | ||
| 17 | } | ||
| 18 | fi | ||
| 19 | } | ||