2021-03-30 21:27:43 +02:00
how to set defaults
===================
In shellnotes v.3.0 and later, there is a more dynamic and safe way of setting your default notes editors and folder.
2023-08-20 19:37:24 +02:00
Changing both default note editors and Note folder with the -sd parameter:
-For <3.0 users, the command "shellnotes -sd" or "shellnotes --set-defaults" will run ~/.shellnotes/set_defaults.sh, where the user will be able to configure the default editors and folder.
2021-03-30 21:27:43 +02:00
Step by step instructions to change defaults with sd:
1. After installing shellnotes, run "shellnotes --set-defaults" in your terminal.
2023-08-20 19:37:24 +02:00
2. Select an option:
2021-03-30 21:27:43 +02:00
1. Change default regular notes editor:
Regular notes are taken with newnote() and read with readnote().
2023-08-20 19:37:24 +02:00
Select option 1 and enter the name of the program. It should be a valid name and not a path. (i.e. "subl")
2021-03-30 21:27:43 +02:00
2. Change default quick notes editor:
Regular notes are taken with quicknote() and read with quickread().
2023-08-20 19:37:24 +02:00
Select option 2 and enter the name of the program. It should be a valid name and not a path. (i.e. "nano")
2021-03-30 21:27:43 +02:00
3. Change default notes folder:
All shellnotes' commands use the $DEFAULT_PATH variable to save, read, delete, rename notes.
This means that the Notes folder to store your notes must be a valid path.
2023-08-20 19:37:24 +02:00
The default notes folder is ~/Notes and is created at first terminal launch with shellnotes installed.
2021-03-30 21:27:43 +02:00
Select option 3 and enter the full path of the directory. It should be a valid absolute path and not a relative one.
4. View defaults:
2023-08-20 19:37:24 +02:00
-sd gives the user the option to also view current defaults.
2021-03-30 21:27:43 +02:00
Select option 4 and take a look at your defaults.
2023-08-20 19:37:24 +02:00
3. When you're done, restart your terminal and the defaults will change.
WARNING: If a name or a path is not valid in step 2, the
2021-03-30 21:27:43 +02:00
setting will fail.
2023-08-20 19:37:24 +02:00
For 3.0 and earlier:
2021-03-30 21:27:43 +02:00
Changing default editors manually:
Changing editors manually is a feature enabled in shellnotes <1.0. In case the user wants to change the
default editors, he must change the NOTES_EDITOR and QUICK_NOTES_EDITOR values from the file defaults.sh in ~/.shellnotes/def/ .
These are two variables that the rest of the code uses to check the default editor for commands
like newnote and quicknote. This means that if you change the name of the program the variables
are going to search for, the code will use your prefered editor. In case the name is incorrect,
problems may occur.
Default editors:
2023-08-20 19:37:24 +02:00
for newnote: SnE (Shellnotes Notes Editor, installed by default)
2021-03-30 21:27:43 +02:00
for quicknote: nano (in-terminal experience)
Suggested editors other than default:
2023-08-20 19:37:24 +02:00
for newnote: Sublime text, Atom, gedit
2021-03-30 21:27:43 +02:00
for quicknote: Vim
Changing default Notes Folder manually:
2023-08-20 19:37:24 +02:00
Changing default folder manually is a possible in shellnotes <2.5. In case the user wants to change the default folder to store/write/list/rename/read/delete his notes, he must change the DEFAULT_PATH value from defaults.sh in ~/.shellnotes/def/. This is a variable that the rest of the code uses to check the default folder for all the commands to make change in the right directory. This means that if you change the name of the path the variable is going to search for, the code will use your prefered folder. In case the path is incorrect, problems may occur.
2021-03-30 21:27:43 +02:00
Default path:
Home/Notes/
Suggested path other than default:
Home/Documents/
2021-04-19 17:37:15 +02:00
Tip: Your notes will be safely transfered to the new note folder.