summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2021-11-05 22:20:47 +0100
committerTom Barrett <tom@tombarrett.xyz>2021-11-05 22:57:17 +0100
commit507d06d9d5f1df6f0db90d81c167177981b08e96 (patch)
tree59b95a078d863efce5f9edcde67fe3fbf14525f4 /scripts
parent9345d2e524f2c40e8ec25134d0c2daa7dd2e324d (diff)
better way to do pinentry
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pinentry-auto8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/pinentry-auto b/scripts/pinentry-auto
new file mode 100755
index 0000000..4b90cc1
--- /dev/null
+++ b/scripts/pinentry-auto
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -Ceu
+
+if ps -e | grep -q X; then
+ /home/"$USER"/bin/pinentry-dmenu "$@"
+else
+ pinentry-curses "$@"
+fi