dotfiles/.local/bin/passmenu

12 lines
436 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
shopt -s nullglob globstar
password_files=`ssh liberty.plantroon.com 'find /home/plantroon/.password-store/ -name *.gpg' | sed 's/\/home\/plantroon\/\.password-store\///' | sed 's/.gpg//'`
password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@");
[[ -n $password ]] || exit
SHOW_PASS=`ssh liberty.plantroon.com pass show "$password" | head -n 1`;
echo $SHOW_PASS | xclip -selection clip-board 2>/dev/null;