sayanarijit / xplr

A hackable, minimal, fast TUI file explorer
https://xplr.dev
MIT License
4.16k stars 74 forks source link

Use xdg-rust crate instead of dirs crate #631

Closed noahmayr closed 1 year ago

noahmayr commented 1 year ago

Alternative solution to #630 to solve #627.

I created a dirs.rs module wrapping xdg and also moved the env::temp_dir() fallback for the runtime dir in there as well, since it seemed like a good fit. If you want we could also move more of the config file finding logic here.

sayanarijit commented 1 year ago

Looks good. Thanks :+1:

sayanarijit commented 1 year ago

Actually, it looks like, if the XDG_CONFIG_HOME is unset, on Mac, it will break the existing config. Am I right?

sayanarijit commented 1 year ago

Ok, as per the docs, it shouldn't.

XDG_CONFIG_HOME; if not set: assumed to be $HOME/.config
sayanarijit commented 1 year ago

Merging it to dev branch for now. Will test it later.

noahmayr commented 1 year ago

Ok, as per the docs, it shouldn't.

XDG_CONFIG_HOME; if not set: assumed to be $HOME/.config

Yeah tested this as well, seems to work both with and without.