You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/scripts/.bin/passmenu

20 lines
404 B
Bash

#!/bin/bash
shopt -s nullglob globstar
if command -v myrofi >/dev/null 2>&1;
then
program="myrofi -no-show-icons -dmenu"
else
program="dmenu"
fi
password_files=( ~/.password-store/**/*.gpg )
password_files=( "${password_files[@]##*/.password-store/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | $program "$@")
pass show -c "$password"