From 1faa68067ff058cae2d2a53f24952c3c5972f715 Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 23 Jun 2025 22:53:22 +0200 Subject: [PATCH] feat: update config with archive_dir & update example.conf --- example.config | 5 +++-- notes.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/example.config b/example.config index 820d54c..e9a11c4 100644 --- a/example.config +++ b/example.config @@ -1,3 +1,4 @@ -notes_dir="${HOME}/notes" -tasks_dir="${HOME}/notes/tasks" +notes_dir="${HOME}/Notes" +tasks_dir="${HOME}/Notes/Tasks" +archive_dir="${HOME}/Notes/Archive" scripts_dir="${HOME}/Projects/scripts" diff --git a/notes.sh b/notes.sh index 7b620ba..d23935a 100755 --- a/notes.sh +++ b/notes.sh @@ -132,15 +132,15 @@ elif [ "$1" = "archive" ] || [ "$1" = "a" ]; then index=($2-1) archive_file=${files[$index]} echo "Archiving $archive_file" - mv "$archive_file" "${notes_dir}/archive/" + mv "$archive_file" "${archive_dir}/" notesSync else PS3="Archive file #: " - echo "Move a note to ARCHIVE ($(ls ${notes_dir}/archive | wc -l))." + echo "Move a note to ARCHIVE ($(ls ${archive_dir} | wc -l))." select file in "${files[@]##*/}"; do { echo "Archiving $file" - mv "${notes_dir}/${file}" "${notes_dir}/archive/" + mv "${notes_dir}/${file}" "${archive_dir}/" notesSync break } ||