aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/vdir
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/vdir')
-rw-r--r--contrib/vdir/README.md3
-rwxr-xr-xcontrib/vdir/calcurse-vdirsyncer2
2 files changed, 3 insertions, 2 deletions
diff --git a/contrib/vdir/README.md b/contrib/vdir/README.md
index b040d04..676b94c 100644
--- a/contrib/vdir/README.md
+++ b/contrib/vdir/README.md
@@ -39,7 +39,8 @@ destination, potentially deleting events in the destination that are no longer
present in the origin.
You can optionally specify an alternative directory for local calcurse data
-using the `-D` flag if it differs from the default `~/.calcurse`.
+using the `-D` flag if it differs from the default `$XDG_DATA_HOME/calcurse`
+(`~/.local/share/calcurse`) or `~/.calcurse`.
Integration with vdirsyncer
---------------------------
diff --git a/contrib/vdir/calcurse-vdirsyncer b/contrib/vdir/calcurse-vdirsyncer
index c5371b5..2ac849a 100755
--- a/contrib/vdir/calcurse-vdirsyncer
+++ b/contrib/vdir/calcurse-vdirsyncer
@@ -34,7 +34,7 @@ if [ "$#" -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
usage
fi
-DATADIR="$HOME/.calcurse"
+[ -d "$HOME/.calcurse" ] && DATADIR="$HOME/.calcurse" || DATADIR="${XDG_DATA_HOME:-$HOME/.local/share}/calcurse"
VERBOSE=""
FORCE=""