Add XDG Base Directory Support

* Use "$XDG_DATA_HOME/calcurse" for data files
* Use "$XDG_CONFIG_HOME/calcurse" for config files
* "$XDG_DATA_HOME" defaults to "$HOME/.local/share"
* "$XDG_CONFIG_HOME" defaults to "$HOME/.config"
* If "$HOME/.calcurse" exists, then it will be used instead for backward
compatibility.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Nitroretro
2019-12-17 02:34:42 +02:00
committed by Lukas Fleischer
parent 250a233ff7
commit 04162de6dd
2 changed files with 37 additions and 9 deletions

View File

@@ -84,7 +84,8 @@
#endif /* ENABLE_NLS */
/* Paths configuration. */
#define DIR_NAME ".calcurse/"
#define DIR_NAME "calcurse/"
#define DIR_NAME_LEGACY ".calcurse/"
#define TODO_PATH_NAME "todo"
#define APTS_PATH_NAME "apts"
#define CONF_PATH_NAME "conf"