agateau / nanonote

A minimalist note taking application
Other
59 stars 11 forks source link

Feature Request: Allow Specifying Note Location #64

Open BeatLink opened 1 year ago

BeatLink commented 1 year ago

Hi, Just found this app and I love the simplicity.

I wanted to set the default note location to a text file in my documents folder that is synced to my phone. I think the best way to achieve this feature would be to have an option in settings to change the default location of the text file.

agateau commented 1 year ago

Hi BeatLink!

Being able to define the note location sounds like a good idea, but I am not sure when I will have the time to tackle this.

In the mean time, you can work around this using the XDG_DATA_HOME environment variable, which defines where Nanonote (and other apps) store their data. Here is a short example:

If I start Nanonote with a custom value for XDG_DATA_HOME, like this:

XDG_DATA_HOME=$HOME/tmp/foo nanonote

After I quit, here is the content of $HOME/tmp/foo:

$ tree $HOME/tmp/foo/                 
/home/aurelien/tmp/foo/
└── agateau.com
    └── nanonote
        └── nanonote.txt

Be careful though: Nanonote does not monitor its file for changes! If you modify nanonote.txt outside of Nanonote, then Nanonote is going to overwrite the changes next time it writes to the file.

BeatLink commented 1 year ago

Ahh, thanks! that was going to be my second request, the ability to load any changes outside the file. I'll create a new issue for that though.