#! /bin/bash PWD_DIR="$HOME/.password-store" PASSWORDS=$(locate "${PWD_DIR}/**/*.gpg") TARGET=$(echo "${PASSWORDS//"$PWD_DIR/"/}" | dmenu -i -p "Get identifier for:") basename $TARGET .gpg | xclip -i