aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnupg/.gnupg/gpg-agent.conf2
-rw-r--r--gnupg/.gnupg/gpg.conf1
-rw-r--r--i3/.config/i3/config2
-rwxr-xr-xscripts/.scripts/launch_rofi-pass.sh1
-rwxr-xr-xscripts/.scripts/my-pinentry16
5 files changed, 21 insertions, 1 deletions
diff --git a/gnupg/.gnupg/gpg-agent.conf b/gnupg/.gnupg/gpg-agent.conf
new file mode 100644
index 0000000..83b82fb
--- /dev/null
+++ b/gnupg/.gnupg/gpg-agent.conf
@@ -0,0 +1,2 @@
+pinentry-program /home/neodarz/.scripts/my-pinentry
+allow-loopback-pinentry
diff --git a/gnupg/.gnupg/gpg.conf b/gnupg/.gnupg/gpg.conf
new file mode 100644
index 0000000..d8017a9
--- /dev/null
+++ b/gnupg/.gnupg/gpg.conf
@@ -0,0 +1 @@
+pinentry-mode default
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
index c9ce53c..24941cd 100644
--- a/i3/.config/i3/config
+++ b/i3/.config/i3/config
@@ -116,7 +116,7 @@ bindsym $WinKey+Shift+F8 exec alacritty -e qutebrowser
#bindsym $AltKey+a exec urxvt -name floatme --background "#000000" -cursorColor "#31363B" -font 7x13 -geometry 88x33 -e "pygmentize ~/.zsh/aliases.zsh | less"
#bindsym $WinKey+Shift+v move morkspace to output right
bindsym $WinKey+control+l exec i3lock-fancy -p -n
-bindsym $WinKey+p exec rofi-pass
+bindsym $WinKey+p exec ~/.scripts/launch_rofi-pass.sh
#bindsym $WinKey+Shift+$AltKey+0 exec ~/.config/i3/switch-workspace.py 6
bindsym XF86AudioPlay exec ~/.config/i3/switch_audio.sh 8
bindsym $WinKey+g exec ~/.scripts/cycle-workspace.py
diff --git a/scripts/.scripts/launch_rofi-pass.sh b/scripts/.scripts/launch_rofi-pass.sh
new file mode 100755
index 0000000..87654ce
--- /dev/null
+++ b/scripts/.scripts/launch_rofi-pass.sh
@@ -0,0 +1 @@
+PINENTRY_USER_DATA="gtk" exec rofi-pass
diff --git a/scripts/.scripts/my-pinentry b/scripts/.scripts/my-pinentry
new file mode 100755
index 0000000..b46687e
--- /dev/null
+++ b/scripts/.scripts/my-pinentry
@@ -0,0 +1,16 @@
+#!/bin/bash
+# choose pinentry depending on PINENTRY_USER_DATA
+# requires pinentry-curses and pinentry-gtk2
+# this *only works* with gpg 2
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802020
+
+case $PINENTRY_USER_DATA in
+gtk)
+ exec /usr/bin/pinentry-gtk-2 "$@"
+ ;;
+none)
+ exit 1 # do not ask for passphrase
+ ;;
+*)
+ exec /usr/bin/pinentry-curses "$@"
+esac