I got tired of pinentry popping up and interrupting whatever I was doing; I didn’t find a solution elsewhere, so I wrote a little bash script to address this. This is designed for (poly|i3|way|…)bar users. The blog entry (no ads, no tracking) linked has the script verbatim, plus some rambling about the why and wherefore.

It’s 22 lines of does-stuff; the rest is whitespace, comments, and instructions – including a little blob example of using it with polybar.

A known issue is that it does occasionally pop up pinentry twice in a row when unlocking. I’m not surprised, and it has happened to me only once since I’ve been using it – not enough for me to need to bother trying to address it. But I wanted to call it out.

It’s not rocket science, but it took a bit of time to make sure it functioned correctly (enough), and hopefully it’ll help someone else.

  • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍OP
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I have some timed services using gopass to get credentials for, among other things, mbsync and vdirsyncer. These run on a user cron job, and they need a password to decrypt the credentials. The credentials are cached, but the cache is cleared every couple of hours, and if the screen locks.