bin/prepinentry (view raw)
1 2 3 4 5 6 7 8 9 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
|