printfn / fend

Arbitrary-precision unit-aware calculator

Home Page:https://printfn.github.io/fend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows: config file location

VladimirMarkelov opened this issue · comments

Thanks for a good calculator: very useful to quickly convert between units.

Question: why it uses for Linux a standard recommended location for its config file($XDG_CONFIG_HOME/fend) but for Windows it does not? The directory {user}/.config is not a standard one - I even does not have such directory in my home directory. For Windows it is better to use AppData/Roaming or AppData/Local. Some libraries make it easy to support paths to standard config directories, e.g. https://docs.rs/dirs/latest/dirs/fn.config_dir.htm. I'd like to see an application following OS rules.

Yeah, I don't usually use Windows and when I do I quite like having it in the same place as on Linux, but you're right that it doesn't follow standard Windows rules.

As a workaround, fend will actually respect XDG_CONFIG_HOME even on Windows, so if you set that variable to AppData/Roaming or something like that fend will use it. Alternatively you can set the FEND_CONFIG_DIR environment variable. And of course you can always run fend help to print the current location.