adds helpers and packages for pinentry

This commit is contained in:
Dennis Schoepf 2025-09-15 21:36:14 +02:00
parent 3d0fd6065a
commit 6607c27f9c
2 changed files with 27 additions and 0 deletions

View file

@ -102,6 +102,8 @@
"openjph" "openjph"
"p11-kit" "p11-kit"
"mas" "mas"
"gpg"
"pinentry-mac"
"go" "go"
{ {
name = "emacs-plus"; name = "emacs-plus";

View file

@ -52,6 +52,29 @@
vterm_printf = '' vterm_printf = ''
printf "\e]%s\e\\" "$argv" printf "\e]%s\e\\" "$argv"
''; '';
setup_gpg = ''
set -x GPG_TTY (tty)
if not test -d $HOME/.gnupg
mkdir -p $HOME/.gnupg
chmod 700 $HOME/.gnupg
end
set pinentry_line "pinentry-program "(which pinentry-mac)
if test -f $HOME/.gnupg/gpg-agent.conf
if not grep -Fxq $pinentry_line $HOME/.gnupg/gpg-agent.conf
echo $pinentry_line >> $HOME/.gnupg/gpg-agent.conf
end
else
echo $pinentry_line > $HOME/.gnupg/gpg-agent.conf
end
if pgrep gpg-agent > /dev/null
killall gpg-agent
end
echo "gpg + pinentry-mac installed and configured."
'';
}; };
interactiveShellInit = '' interactiveShellInit = ''
@ -60,6 +83,8 @@
set hn (prompt_hostname) set hn (prompt_hostname)
set fish_cursor_default block blink set fish_cursor_default block blink
set -x GPG_TTY (tty)
if test "$INSIDE_EMACS" != "vterm" if test "$INSIDE_EMACS" != "vterm"
set fish_cursor_insert line blink set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink set fish_cursor_replace_one underscore blink