summaryrefslogtreecommitdiff
path: root/scripts/pinentry-auto
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/pinentry-auto')
-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