#!/bin/bash # yellow for in progress polybar-msg action calendar-sync hook 3 1>/dev/null OUTPUT=$(CALCURSE_CALDAV_PASSWORD=$(pass show cal.keegandeppe.com/kdeppe 2>&1) calcurse-caldav 2>&1) ERRORS=$(echo "$OUTPUT" | grep error) if [ -n "$ERRORS" ] ; then polybar-msg action calendar-sync hook 2 1>/dev/null exit 0 fi # success, show green for a few seconds and quit polybar-msg action calendar-sync hook 1 1>/dev/null sleep 3 polybar-msg action calendar-sync hook 0 1>/dev/null exit 0