feat: update config with archive_dir & update example.conf
This commit is contained in:
parent
99b657d15a
commit
1faa68067f
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
||||||
notes_dir="${HOME}/notes"
|
notes_dir="${HOME}/Notes"
|
||||||
tasks_dir="${HOME}/notes/tasks"
|
tasks_dir="${HOME}/Notes/Tasks"
|
||||||
|
archive_dir="${HOME}/Notes/Archive"
|
||||||
scripts_dir="${HOME}/Projects/scripts"
|
scripts_dir="${HOME}/Projects/scripts"
|
||||||
|
|
6
notes.sh
6
notes.sh
|
@ -132,15 +132,15 @@ elif [ "$1" = "archive" ] || [ "$1" = "a" ]; then
|
||||||
index=($2-1)
|
index=($2-1)
|
||||||
archive_file=${files[$index]}
|
archive_file=${files[$index]}
|
||||||
echo "Archiving $archive_file"
|
echo "Archiving $archive_file"
|
||||||
mv "$archive_file" "${notes_dir}/archive/"
|
mv "$archive_file" "${archive_dir}/"
|
||||||
notesSync
|
notesSync
|
||||||
else
|
else
|
||||||
PS3="Archive file #: "
|
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
|
select file in "${files[@]##*/}"; do
|
||||||
{
|
{
|
||||||
echo "Archiving $file"
|
echo "Archiving $file"
|
||||||
mv "${notes_dir}/${file}" "${notes_dir}/archive/"
|
mv "${notes_dir}/${file}" "${archive_dir}/"
|
||||||
notesSync
|
notesSync
|
||||||
break
|
break
|
||||||
} ||
|
} ||
|
||||||
|
|
Loading…
Reference in a new issue