dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit 7b9996c95692a29784036c7f7284f8cffb3df591
parent cfba11af69437e00ede65ea8a15d69cf01556495
Author: Paco Esteban <paco@onna.be>
Date:   Wed,  8 May 2019 19:15:39 +0200

New script to use password-store with fzf

Diffstat:
Abin/bin/getpass.sh | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/bin/bin/getpass.sh b/bin/bin/getpass.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -eu + +for c in fzf pass notify-send; do + if ! command -v "$c" > /dev/null 2>&1; then + echo "This script needs $c to work" + exit 1 + fi +done + +target=$(find "$PASSWORD_STORE_DIR/" -name "*gpg" | \ + sed -re "s/\\.gpg$//" | \ + sed -re "s,$PASSWORD_STORE_DIR/,," | \ + fzf) + +echo "$target" + +/usr/local/bin/pass -c "$target" + +sleep 0.5 + +notify-send \ + -u normal \ + -t 10000 \ + "Password in clipboard" \ + "Your $target password is currently in your clipboard."