From 12ce8bdd65d3b5fcd6e8227eaecd5f772a90f8da Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 11 Jun 2023 08:00:24 -0400 Subject: Configuration file updates and additions. --- .config/calcurse/hooks/pre-load | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .config/calcurse/hooks/pre-load (limited to '.config/calcurse/hooks/pre-load') diff --git a/.config/calcurse/hooks/pre-load b/.config/calcurse/hooks/pre-load new file mode 100755 index 0000000..dc25771 --- /dev/null +++ b/.config/calcurse/hooks/pre-load @@ -0,0 +1,17 @@ +#!/bin/sh +[ -d "$HOME/.calcurse" ] && data_dir="$HOME/.calcurse" || data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse" + +cd "$data_dir" || exit + +# Do not do anything when synchronizing with a CalDAV server. +[ -f caldav/lock ] && exit + +# Run the CalDAV synchronization script in the background. +if [ -d caldav ] && command -v calcurse-caldav >/dev/null; then + ( + date="$(date +'%b %d %H:%M:%S')" + echo "$date Running calcurse-caldav from the pre-load hook..." + CALCURSE_CALDAV_PASSWORD=$(pass web/radicale.chudnick.com | head -1) calcurse-caldav + echo + ) >>caldav/log 2>&1 & +fi -- cgit v1.2.3