CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
I'm trying to clean my $HOME as much as possible by using the advices of a nice tool called xdg-ninja.
Currently nb is not really clean friendly, the .nbrc files need to be at the root of the user's home directory or defined by exporting NBRC_PATH. Then a few variables need to be defined in this file for the history, the main dir and main notebook.
By default there will be 3 new entries in $HOME:
.nbrc
.nb_history
nb/
I put the dotfiles in $HOME/.config/nb ($XDG_CONFIG_HOME/nb) and the main directory in $HOME/Notes/nb.
For this to work I had to:
export NBRC_PATH="$HOME/.config/nb/nbrc"
add NBRC_PATH="$HOME/.config/nb/nbrc" in the systemd unit that I user to serve nb in the browser.
add custom NB_DIR, NB_NOTEBOOK_PATH, NBRC_PATHand NB_HIST in the nbrc file.
In addition, by defining NB_HIST I think that I'm loosing some feature, because in the script NB_HIST is composed with $ME and can generate differente history files. By defining it I'm consolidating them all.
Could you add a check for $XDG_CONFIG_HOME/nb/nbrc or $HOME/.config/nb/nbrc? In presence of this file only NBRC_PATH and NB_HIST could be generated internally and make the setup more friendly.
I'm trying to clean my
$HOME
as much as possible by using the advices of a nice tool called xdg-ninja.Currently nb is not really clean friendly, the
.nbrc
files need to be at the root of the user's home directory or defined by exportingNBRC_PATH
. Then a few variables need to be defined in this file for the history, the main dir and main notebook.By default there will be 3 new entries in
$HOME
:I put the dotfiles in
$HOME/.config/nb
($XDG_CONFIG_HOME/nb
) and the main directory in$HOME/Notes/nb
.For this to work I had to:
NBRC_PATH="$HOME/.config/nb/nbrc"
NBRC_PATH="$HOME/.config/nb/nbrc"
in the systemd unit that I user to serve nb in the browser.NB_DIR
,NB_NOTEBOOK_PATH
,NBRC_PATH
andNB_HIST
in the nbrc file.In addition, by defining
NB_HIST
I think that I'm loosing some feature, because in the scriptNB_HIST
is composed with$ME
and can generate differente history files. By defining it I'm consolidating them all.Could you add a check for
$XDG_CONFIG_HOME/nb/nbrc
or$HOME/.config/nb/nbrc
? In presence of this file onlyNBRC_PATH
andNB_HIST
could be generated internally and make the setup more friendly.