From 6999bd4ac586c3c47157c900d83c4a561dde5325 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 2 Dec 2023 13:17:26 -0600 Subject: [PATCH] Remove unlock ntfy message I've moved the bank website credentials to a shared collection in Bitwarden and made them accessible to an account dedicated to `xactfetch`. Using the `pinentry-stub` script, `rbw` can now auto-unlock the vault, using the password in the file referred to by the `PINENTRY_PASSWORD_FILE` environment variable. This means that `xactfetch` can now run completely automatically, without any input from me. --- pinentry-stub.sh | 19 +++++++++++++++++++ xactfetch.py | 5 ----- 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100755 pinentry-stub.sh diff --git a/pinentry-stub.sh b/pinentry-stub.sh new file mode 100755 index 0000000..3694b62 --- /dev/null +++ b/pinentry-stub.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# vim: set sw=4 ts=4 sts=4 et : + +while IFS=' ' read -r cmd args; do + case "${cmd}" in + GETPIN) + printf 'D %s\n' "$(cat "${PINENTRY_PASSWORD_FILE}")" + ;; + SETPROMPT|SETTITLE|SETDESC) + echo OK + ;; + BYE) + exit 0 + ;; + *) + printf 'ERR Unknonw command\n' + ;; + esac +done diff --git a/xactfetch.py b/xactfetch.py index b270fdd..531ee5f 100644 --- a/xactfetch.py +++ b/xactfetch.py @@ -668,11 +668,6 @@ class Chase: def main() -> None: logging.basicConfig(level=logging.DEBUG) - if not rbw_unlocked(): - ntfy( - 'xactfetch needs you to unlock the rbw vault', - tags='closed_lock_with_key', - ) log.debug('Getting Firefly III access token from rbw vault') token = rbw_get('xactfetch') import_secret = secret_from_file(