Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change XDG defaults on Windows to use Windows spec #18

Closed
kirawi opened this issue Jun 5, 2023 · 6 comments
Closed

Change XDG defaults on Windows to use Windows spec #18

kirawi opened this issue Jun 5, 2023 · 6 comments

Comments

@kirawi
Copy link

kirawi commented Jun 5, 2023

Ref helix-editor/helix#6747

When the environment variables aren't set, they should use the Windows location instead. This is how most XDG implementations handle fallback on Windows, such as glib.

@utkarshgupta137
Copy link
Collaborator

I don't think it's a good idea to change the existing Xdg struct for Windows, because some tools might want to use the proper XDG definitions. The question is do we want to add a new struct to this crate for Mac & Windows or would the fallback from dev end suffice?
Maybe we could make the following function public: https://github.com/lunacookies/etcetera/blob/master/src/base_strategy/xdg.rs#L160?
WDYT?

@kirawi
Copy link
Author

kirawi commented Jun 5, 2023

I'm not sure what would be the preferred solution, so I'll ask the other Helix maintainers.

@utkarshgupta137
Copy link
Collaborator

I think I would prefer making that function public so it is easier for all devs to mix & match strategies as they require. XdgWindows or XdgApple would just be a special case of that function.
In case you weren't aware, you could also implement the traits for your own struct & use that everywhere. It is especially helpful if you're changing the default paths & want a fallback solution in a single place in your workspace.
I'm also interested in using Helix, so let me know in case you need any help with helix-editor/helix#2135 or similar functionality.

@kirawi
Copy link
Author

kirawi commented Jun 6, 2023

After speaking with one of the maintainers, your suggestion would work for Helix.

@utkarshgupta137
Copy link
Collaborator

Would you be fine with copying this function or do you really really want it to be in this library? From my perspective, this function actually doesn't have anything to do with this crate & one could pass any unrelated variables to it.

@kirawi
Copy link
Author

kirawi commented Jun 15, 2023

Yep we can copy this function.

@kirawi kirawi closed this as completed Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants