Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Automatic alternative NBRC_PATH #277

Open
tkapias opened this issue Oct 3, 2023 · 0 comments
Open

[Feature request] Automatic alternative NBRC_PATH #277

tkapias opened this issue Oct 3, 2023 · 0 comments

Comments

@tkapias
Copy link

tkapias commented Oct 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant