diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:56:17 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:56:17 -0400 |
commit | 9e82c96713989a7565eadac505b36e3dbe91cd5a (patch) | |
tree | 7c2f998cc9d06f97bfe10ce1ee844121b662f595 /.local/bin/getpass | |
parent | 3adcf542289a0883924ae9b9be8b898c36702c95 (diff) |
Added, removed, renamed scripts
Diffstat (limited to '.local/bin/getpass')
-rwxr-xr-x | .local/bin/getpass | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/.local/bin/getpass b/.local/bin/getpass index bfa344f..1f9b3b5 100755 --- a/.local/bin/getpass +++ b/.local/bin/getpass | |||
@@ -3,13 +3,12 @@ | |||
3 | pb=$PASSWORD_STORE_DIR | 3 | pb=$PASSWORD_STORE_DIR |
4 | [ -z "$PASSWORD_STORE_CLIP_TIME" ] && ct=45 || ct=$PASSWORD_STORE_CLIP_TIME | 4 | [ -z "$PASSWORD_STORE_CLIP_TIME" ] && ct=45 || ct=$PASSWORD_STORE_CLIP_TIME |
5 | chars=$(echo $pb | wc -c) | 5 | chars=$(echo $pb | wc -c) |
6 | accts=$(find $pb -type f -name "*.gpg" | cut -c 2- | \ | 6 | accts=$(find $pb -type f -name "*.gpg" | cut -c 2- | cut -c $chars- | \ |
7 | grep -v ".*-OTP.gpg\|.*-2farecovery.gpg" | cut -c $chars- | \ | ||
8 | rev | cut -c 5- | rev) | 7 | rev | cut -c 5- | rev) |
9 | acct="$(echo "$accts" | dmenu)" | 8 | acct="$(echo "$accts" | dmenu)" |
10 | [ "$acct" = "" ] && exit | 9 | [ "$acct" = "" ] && exit |
11 | pass show $acct | xclip -r -selection "primary" \ | 10 | pass show $acct | head -1 | xclip -r -selection "primary" \ |
12 | && pass show $acct | xclip -r -selection "clipboard" \ | 11 | && pass show $acct | head -1 | xclip -r -selection "clipboard" \ |
13 | && notify-send "Password Copied to Clipboard" \ | 12 | && notify-send "Password Copied to Clipboard" \ |
14 | && sleep $ct \ | 13 | && sleep $ct \ |
15 | && pkill xclip | 14 | && pkill xclip |