Allow XDG_CONFIG_HOME on macOS
See original GitHub issueFor many tools, especially those designed for use across Linux/Unix/Mac, it makes sense to use XDG as a common standard. This especially applies to command line tools, for which ~/Library/*
breaks inherited convention (and thus breaks interop).
I have previously submitted PRs to resolve this in several applications on macOS, but it would be easier to establish good defaults here instead of sending PRs to patch around it downstream. (This also makes this a blocker for personal usage – at least without vendoring and modifying the module, which isn’t ideal.)
Appdirs issue: https://github.com/ActiveState/appdirs/issues/78
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:33 (16 by maintainers)
Top Results From Across the Web
macos - Equivalents of XDG_CONFIG_HOME and ...
Comparing Apple's documentation for the various paths to the XDG Base Directory specifications approximates to the following locations:.
Read more >What are the step to move all your dotfiles into XDG directories?
gitconfig to XDG_CONFIG_HOME on OSX. Per the git-config documentation (link omitted due to reputation). Second user-specific configuration file.
Read more >Location of personal init file (XDG_CONFIG_HOME)
In the case of macOS, the /Users/username/Library/Preferences directory seems to be mainly used for native GUI applications. For command-line ...
Read more >XDG Base Directory - ArchWiki
Application Legacy Path Supported Since
ALSA ~/.asoundrc 577df36 · 1.2.3
Android Studio ~/.AndroidStudioX.X Android Studio 4.1
Anki ~/Anki , ~/Documents/Anki
Read more >12. Follow XDG-spec I'm so glad to see this included. I don't ...
I don't like $HOME being cluttered with .<app> config directories, but worse than that, far too many when releasing on macOS say Oh...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a contentious topic seems and given there’s no agreement here I’ll need to decline the request to add XDG support on Windows for now.
I am in complete support of using XDG directories on all platforms if defined. I have been working with the XDG spec and trying to adapt it to all platforms in order to make multi-platform development easier.
One of my primary areas of concern is finding a way to determine which python packages can be shared across platforms (pure python) and which need to have distinct directories. XDG talks about using a shared directory structure for a user across multiple platforms and how some directories need to be distinct and some can be shared.
In my case I have a $HOME directory that I am sharing across all platforms and my dot files and .config directory are used for all platforms. In contrast, $HOME/.local/bin is for Linux and $HOME/.local/bin_win is for Windows and set using SDG dirs (Not really because the define the executable directory but don’t provide the variable for it yet. I’m working on it. However for other dirs it works great.)