From 56fa6951bccc312b24b3766c38c0e49e64a796fb Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 1 Mar 2018 14:38:58 +0000 Subject: Merge 'username' and 'passwords' scripts --- bin/bin/password | 7 ++++++- bin/bin/username | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100755 bin/bin/username (limited to 'bin') diff --git a/bin/bin/password b/bin/bin/password index f94379a..ffcbb7e 100755 --- a/bin/bin/password +++ b/bin/bin/password @@ -1,2 +1,7 @@ #!/usr/bin/env bash -passmenu + +# Username in primary, password in clipboard + +target=$(find "$HOME/.password-store/" -name "*.gpg" -printf "%P\\n" | dmenu -i -p "Get identifier for:") +basename "$target" .gpg | xclip -i -selection "primary" +pass show --clip "${target%.gpg}" diff --git a/bin/bin/username b/bin/bin/username deleted file mode 100755 index b124733..0000000 --- a/bin/bin/username +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -target=$(find $HOME/.password-store/ -name "*.gpg" -printf "%P\n" | dmenu -i -p "Get identifier for:") -basename $target .gpg | xclip -i -- cgit v1.2.3