notesrc - NDC's notes configuration file.
notes uses a directory and its subdirectories to store the user's notes in files.
See notebook bellow.
The files can be plain text, markdown or anything else that
can configured by rule statements in the configuration file.
During startup notes reads the configuration file
$XDG\_CONFIG\_HOME/notes/noterc or ~/.config/notes/noterc or ~/.notesrc;
whichever is encountered first.
The directory where the files are located. If the directory is not specified then, if ~/Nextcloud/Notes found, it will be used, otherwise the ~/.notes will be used.
The notes stores backup files of the notes before edited or deleted. If backupdir is omitted then environment variable $BACKUPDIR will be used if set; otherwise no backup will be used.
This is the default extension file name when the user does not specify one in a new note - name.
deftype=txt
Command to execute at startup of TUI or by option --onstart.
Command to execute at exit of TUI or by option --onexit.
Protection of unintentionally overwrite (same as shell). Default is true.
Display file information on preview window. Default is true.
The variable %f contains the list of relative path names of selected notes or the
current one. Use %% to get a single percent sign. Also, the application pass
this list to environment variable $NOTESFILES and the notes root directory to
$NOTESDIR. The working directory is always the $NOTESDIR and files are
relative to this.
Rules defines how the program will act of each file type. There are two actions for now, view and edit.
rule view *.[0-9] man %f
rule view *.man man %f
rule view *.md bat %f
rule view *.txt less %f
rule view *.pdf zathura %f
rule edit * $EDITOR %f
File match patterns of files and/or directories to ignore.
exclude .git trash *.sqlite
Specifies user-defined menu item to deal with current or tagged files. The command will get the full path files as parameters. Use the 'm' key to invoke the user-defined menu.
umenu print the files ; echo %f
umenu print the contents ; cat %f
umenu copy to clipbard ; xclip -i %f
The label can be:
normaldefault screen colorstatusstatus line colorselectselected item / textkeyshort-keys in status bartextmarkdown text colorcodemarkdown codeboldmarkdown bold / titlehidemarkdown useless text
The Attribute is encoded as VGA text mode character attributes, that means VGA-background-color << 4 | VGA-forground-color
Assign or remove a key. If you don't specify the command parameter then
removes the key from the map. There are two maps, the nav which works
on browsing and the input which works on data input (string, menus and
anything wants normal characters as data).
There are some limitations of ncurses, for example, function keys cannot have modifier as Shift, Alt or Control.
map nav ^R rename
map nav A-r rename
map nav C-A-R rename
Copyright © 2020-2021 Nicholas Christopoulos.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Nicholas Christopoulos mailto:nereus@freemail.gr.