aboutsummaryrefslogtreecommitdiffstats
path: root/bin/gpg2-x11
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-02-20 21:03:23 +0800
committerAaron LI <aly@aaronly.me>2018-02-20 21:03:23 +0800
commit607ca8f9a2252f9d93e9ce1b6af792ac75d3951c (patch)
tree11661b2c01654151aafcf6def3a8fbdc22064921 /bin/gpg2-x11
parent5f8ba88f1666f62c9e3bc07f17f26bbf9e5187b5 (diff)
downloaddotfiles-607ca8f9a2252f9d93e9ce1b6af792ac75d3951c.tar.bz2
gpg: add pinentry and gpg2-x11 shim scripts for zsh & gpg integration
Credit: https://blog.mrloop.com/workflow/2017/02/09/pin-entry.html
Diffstat (limited to 'bin/gpg2-x11')
-rwxr-xr-xbin/gpg2-x1118
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/gpg2-x11 b/bin/gpg2-x11
new file mode 100755
index 0000000..db0d53f
--- /dev/null
+++ b/bin/gpg2-x11
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# `gpg2` shim to support force use the graphical pinentry.
+# See also: `~/bin/pinentry-app'
+#
+# Credit: http://blog.mrloop.com/workflow/2017/02/09/pin-entry.html
+#
+# Aaron LI
+# 2018-01-13
+#
+
+
+GPG2=$(which gpg2)
+CFG=${XDG_RUNTIME_DIR}/pinentry-app
+echo "x11" > ${CFG}
+exec ${GPG2} "$@"
+
+# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=sh: #