darylhjd/mangadesk

[Feature Request] Use a /home/$USER/.config/mangadesk directory instead of usr/ in Linux

AmaanHUB opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
The current behaviour is that when mangadesk is run from any directory, it creates a usr/ directory with the settings inside. This isn't particularly a problem when running the binary from the same directory, though it becomes one when one moves the binary to /usr/bin/ so it can be accessed anywhere (like when it is installed through AUR).

Describe the solution you'd like
I would like there to be a way automated behaviour to create a directory in /home/$USER/.config called mangadesk with the configuration file inside (path potentially being /home/$USER/.config/mangadesk/config). This would be read whenever mangadesk is run, rather than creating a usr/ directory in a new place every time.

Describe alternatives you've considered
One could possibly call the usr directory something else such as .mangadesk so that when one is running it from home directory it reads it from there, and it makes a bit more sense what this directory is at a glance.


I don't use this software much, but I'm happy to learn Go and sink my teeth into it if you point me in the right direction, if you are interested.

Very much agree with this. I would love to guide you, but I'm busy with university rn, and probably won't be available until December (fortunately Go is pretty easy to pick up).

I believe this is the line you might be looking for:

confPath := filepath.Join(UsrDir, ConfigFileName)

Based on what I can tell, a simple fix would just be to add the required directory at the front of the parameter list.

Thanks for pointing me in the right direction.

I'll have a look at it at some point (hopefully before December :D).

I've given it a go at #44.