Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ nix-build
make
```

5. Configure `./config.json` (it is automatically created on first launch if it does not already exist).
5. [Configure](#configuration) `~/.config/notewrapper/config.json` (it is automatically created on first launch if it does not already exist).
6. Run the program:

```shell
Expand Down Expand Up @@ -199,6 +199,7 @@ Edit `~/.config/notewrapper/config.json`. If it does not exist, it will be creat

Note:
* Directories must end with `/`.
* All directories used must exist.
* Elements of `directory` and `backup.directory` must match exactly.
* Directories set in `directory` but not in `backup.directory` won't be backed up.
* Directories set in `backup.directory` but not in `directory` will be ignored.
Expand Down
6 changes: 4 additions & 2 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void initAppFilesAndDirs(const char *home, const int shouldDebug) {
error(!w, "program", "fopen failed opening %s");
fprintf(w, //TODO CHANGE default json
"{\n"
" \"directory\": [\"~/Documents/Notes/\"],\n"
" \"directory\": [\"~/Documents/\"],\n"// I personally use ~/Documents/Notes. But the dir doesn't exist most times. So for the default user it is better to put ~/Documents
" \"render\": true,\n"
" \"jumpToEndOfFileOnLaunch\": true,\n"
" \"editor\": \"neovim\",\n"
Expand All @@ -154,7 +154,9 @@ void initAppFilesAndDirs(const char *home, const int shouldDebug) {
" \"newLineOnOpening\": true,\n"
" \"backup\": {\n"
" \"enable\": false,\n"
" \"directory\": \"/path/to/backup\",\n"
" \"directory\": {\n"
" \"~/Documents/\": \"path/to/backup/\"\n"
" },\n"
" \"interval\": \"weekly\",\n"
" \"rsyncArgs\": [\"-Lqah\", \"--update\"]\n"
" }\n"
Expand Down
Loading