#! /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