#!/bin/sh # # This is an example hook. It synchronizes calcurse with a CalDAV server before # loading the data files. # # In order to install this hook, copy this file to data_dir="$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 show cal.keegandeppe.com/kdeppe) calcurse-caldav echo ) >>caldav/log 2>&1 & fi