From 0edd762ec5f0b33e02fb6473dfea4e6fed54c498 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sun, 18 Oct 2015 21:26:04 +0100 Subject: Add script to obtain password --- .gitmodules | 3 +++ .passwords | 1 + bin/password | 5 +++++ 3 files changed, 9 insertions(+) create mode 160000 .passwords create mode 100755 bin/password diff --git a/.gitmodules b/.gitmodules index b713ac5..aa879dd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule ".urxvt/ext"] path = .urxvt/ext url = https://github.com/muennich/urxvt-perls +[submodule ".passwords"] + path = .passwords + url = https://github.com/uvaes/passwords diff --git a/.passwords b/.passwords new file mode 160000 index 0000000..ebfe618 --- /dev/null +++ b/.passwords @@ -0,0 +1 @@ +Subproject commit ebfe618e5197447046cb94996a1650d51d9bf401 diff --git a/bin/password b/bin/password new file mode 100755 index 0000000..b0415e3 --- /dev/null +++ b/bin/password @@ -0,0 +1,5 @@ +#! /bin/bash +PWD_DIR="$HOME/dotfiles/.passwords" +PASSWORDS=$(locate "$PWD_DIR/**/*.gpg") +TARGET=$(echo "${PASSWORDS//"$PWD_DIR/"/}" | dmenu -i -p "Decode password:") +gpg --use-agent --quiet --batch -d $PWD_DIR/$TARGET | xclip -i -- cgit v1.2.3