2024-10-30 16:22:35 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Use fuzzel to find a password from password-store and copy it to clipboard.
|
|
|
|
# inpired by: https://gist.github.com/igemnace/2b8609d280752e8a1b173204c14f6892
|
|
|
|
|
2024-10-30 16:36:26 +01:00
|
|
|
export BW_SESSION=$(bw unlock --passwordfile ~/secret.txt --raw)
|
2024-10-30 16:22:35 +01:00
|
|
|
pass_name=$(bw list items | jq -r '.[].name' | fuzzel -d)
|
|
|
|
|
|
|
|
[[ $pass_name != "" ]] && bw get item "$pass_name" | jq -r '.login.password' | wl-copy
|