This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/_gpg-unlock

11 lines
227 B
Bash
Executable File

#!/bin/sh
gpg-connect-agent reloadagent /bye
PATH="$PATH:/usr/lib:/usr/libexec:/usr/lib/gnupg"
keygrip=$(cat "$HOME/.pam-gnupg")
echo '{{@@ main_password @@}}' |
base64 -d |
gpg-preset-passphrase --preset "$keygrip"