feat!: use XDG_DATA_HOME as AGENDA_DIR fallback

I first decided against this, but the old `~/.app-trash` is no more
fitting than the XDG_DATA_HOME location.

The xdg-user-dir DOCUMENTS fallback is too presumptuous and removing it
makes things even simpler.
This commit is contained in:
2023-11-16 21:14:32 +01:00
parent 8b1ac934b1
commit 406ffb7c19
3 changed files with 3 additions and 18 deletions

View File

@@ -5,11 +5,7 @@
# TODO: Maybe its easier to add an api to the agenda script to query for the
# available -t option values?
if [ -z "$AGENDA_DIR" ]; then
if type xdg-user-dir >/dev/null 2>&1; then
AGENDA_DIR="$(xdg-user-dir DOCUMENTS)/agenda"
else
AGENDA_DIR="$HOME/.agenda"
fi
AGENDA_DIR="${XDG_DATA_HOME:-"$HOME/.local/share"}/agenda"
fi
AGENDA_COMP_DATE_MOD=("next" "last")