Skip to content

Instantly share code, notes, and snippets.

/- Secret

Created February 25, 2018 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/135a47341055eb9f72087b0dccfab102 to your computer and use it in GitHub Desktop.
Save anonymous/135a47341055eb9f72087b0dccfab102 to your computer and use it in GitHub Desktop.
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p rofi pass xclip
shopt -s nullglob globstar
password_files=(~/.data/pass/**/*.gpg)
password_files=("${password_files[@]##*/.data/pass/}")
password_files=("${password_files[@]%.gpg}")
password=$(printf '%s\n' "${password_files[@]}" | rofi -dmenu -p "Search password: " "$@")
PASSWORD_STORE_X_SELECTION=clipboard pass -c "$password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment