summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/prepinentry10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/prepinentry b/bin/prepinentry
new file mode 100755
index 0000000..bec7c46
--- /dev/null
+++ b/bin/prepinentry
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+TARGET_PROGRAM="/home/chris/.gnupg/pinentry-dmenu"
+
+inotifywait -m -e access "$TARGET_PROGRAM" | while read; do
+ if [ -f "/home/chris/.gnupg/current_monitor" ]; then
+ rm /home/chris/.gnupg/current_monitor
+ fi
+ swaymsg -t get_outputs | jq -r '.[] | select(.focused==true).name' >> /home/chris/.gnupg/current_monitor
+done