You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
496 B
Bash
18 lines
496 B
Bash
#!/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
|