You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both config.json and history.sqlite3 are currently saved inside the same .nhentai directory, which is created directly under the user's home directory.
To many users, me included, this isn't ideal. We try to keep our $HOME clean, for as many reasons as there are people doing it. Developers can help us a lot in this regard by following the XDG Base Directory Specification.
I'm asking that the developers of this repository consider following it as well.
I'd like to help make this change, be it by sending a PR or answering any questions to the best of my ability.
Here's some information that might be useful, from my understanding of the software and the spec:
config.json should go to $XDG_CONFIG_HOME/nhentai/ OR $XDG_DATA_HOME/nhentai/
I say or, because its behavior is strange for a configuration file. Some properties are changed frequently using the command line. Maybe it should be split into separate files? But that's a different discussion.
history.sqlite3 should go to $XDG_DATA_HOME/nhentai/
This shouldn't be a disruptive change to most users if we try locations in order of priority:
Is $XDG_(CONFIG/DATA)_HOME environment set and nhentai/filename exists inside it? If so, use that.
Does $HOME/.nhentai/filename exist? If so, use that.
When no file is found, create it under the appropriate location, depending on whether XDG vars are set.
Users who care about XDG spec can manually move the files if needed.
I don't see how this could affect Windows users, but it should be possible to enable this behavior only on Linux, if that's a concern. I'd argue these files don't belong in User\.nhentai\ on Windows either, if that's what's currently happening, but I don't know if it makes sense to increase the scope of this issue to include another OS.
Both
config.json
andhistory.sqlite3
are currently saved inside the same.nhentai
directory, which is created directly under the user's home directory.To many users, me included, this isn't ideal. We try to keep our $HOME clean, for as many reasons as there are people doing it. Developers can help us a lot in this regard by following the XDG Base Directory Specification.
I'm asking that the developers of this repository consider following it as well.
I'd like to help make this change, be it by sending a PR or answering any questions to the best of my ability.
Here's some information that might be useful, from my understanding of the software and the spec:
config.json
should go to$XDG_CONFIG_HOME/nhentai/
OR$XDG_DATA_HOME/nhentai/
history.sqlite3
should go to$XDG_DATA_HOME/nhentai/
$XDG_(CONFIG/DATA)_HOME
environment set andnhentai/filename
exists inside it? If so, use that.$HOME/.nhentai/filename
exist? If so, use that.I don't see how this could affect Windows users, but it should be possible to enable this behavior only on Linux, if that's a concern. I'd argue these files don't belong in
User\.nhentai\
on Windows either, if that's what's currently happening, but I don't know if it makes sense to increase the scope of this issue to include another OS.See Arch wiki - XDG Base Directory for a list of how different software handle this issue. I also like how Wezterm does it.
The text was updated successfully, but these errors were encountered: