5 ms·
The second example is a nice start, but I'd really like to see invisible files/folders in ~/ done away with altogether. So starting with that example, I might
by kitsunesoba 4y ago
The second example is a nice start, but I'd really like to see invisible files/folders in ~/ done away with altogether.
So starting with that example, I might add a visible ~/Library/ folder, then move ~/.config/ and ~/.local/ in there as ~/Library/Config/ and ~/Library/Local/ as normal visible folders. Same for .bashrc, .profile, etc; put them in ~/Library/Config/ without the dots.
- drunkpotato 4y agoLuckily if you’re a developer on MacOS, you can have that too! In addition to ~/.config and a million .dotfiles and .dotdirectories from decades of unixy tools! Truly a cornucopia.
- kitsunesoba 4y agoIt's frustrating enough to make a person seriously consider maintaining forks of all the FOSS things they use to fix this one bit of misbehavior.
- petesergeant 4y agoDo any of the Linux distros do this? Strikes me as the kind of thing Debian would do for everything in apt
- gjvc 4y agoDo you have any examples of Debian doing this?
- petesergeant 4y agoSure. In software of mine distributed by Debian, there's usually a "debian/patches" directory, that I didn't add, that's changes the Debian project wanted to make to the system. I'm sure there's a formal name for that system. Most Debian packages seem to have one.
- spott 4y agoStart with pythons “projectdirs”, which refuses to allow mac systems to use XDG or at least have that option. https://github.com/platformdirs/platformdirs/issues/4 https://github.com/platformdirs/platformdirs/issues/4
- AnIdiotOnTheNet 4y agoIn Windows we get dotfiles from any tool badly ported from unixland, plus the myriad ways specified by various Windows standards over the past several decades, plus the innumerable ways that different entities have chosen to interpret those standards, plus whatever bullshit non-standard locations some asshole thought up and decided to ship. Where is the config for program X? It could be in the same directory as X, HKLM\Software\X, HKCU\Software\X, The HKLM\Software\XWOW6432Node\X, AppData\Local\X, AppData\Remote\X, AppData\LocalLow\X, ProgramData\X, USERPROFILE\.X, USERPROFILE\Documents\X, USERPROFILE\Saved Games\X, USERPROFILE\Documents\My Saved Games\X, USERPROFILE\.config\X...
- kitsunesoba 4y agoYep. Makes backing up configurations on Windows systems somewhat nightmarish… it's most practical to just back up the whole install and then pray that you'll never have to go digging for any specific bit of config in particular.
- pornel 4y agoYeah, it's a bit alien on macOS. There is no good mapping for some of these folders. For example, on macOS application configuration isn't even supposed to be done directly via application-specific files. macOS has its User Defaults subsystem, with `defaults read`/`defaults write` commands. And of course this isn't usable by typical command-line tools that don't have a Bundle ID.
- larusso 4y agoThe system that you mentioned is specifically for macOS Desktop apps. I think even Apple is drawing a line there. I don‘t know of any Apple commandline tool which has a configuration in plist format etc. But I might be wrong.
- pornel 4y agoApple ships some BSD and Linux tools (openssh, git) without changing how they store configuration, but anything written with macOS in mind has other methods. For example, Apple's command-line build tools for Xcode inherit GUI Xcode's settings and project files that are plists. launchctl uses XML plists in ~/Library instead of /etc. Daemons like Spotlight and Time Machine are configured via plist-editing GUIs or mdutil/tmutil commands.
- joshka 4y agoWhat does Library actually mean though? ;)
- still_grokking 4y agoApple macOS. Don't ask…
- mmphosis 4y agoLibrary is such a ridiculous name. It used to be called the Preferences Folder AKA etc AKA .config AKA .local AKA ~/\.* This is the problem with preferences: everyone's preferences are different!
- TacticalCoder 4y ago> The second example is a nice start, but I'd really like to see invisible files/folders in ~/ done away with altogether. A great many amazing tools shall, by default, skip searching in hidden files (and gain a great speedup thanks to doing that). You'd have to modify all these tools so that they'd skip Library/ by default. Also, related to that, what would you do with .git/? Move prjs/fizzbuz/.git to Library/fizzbuzz/git while keeping prjs/fizzbuzz? This is, hopefully, never going to happen.
- kitsunesoba 4y agoThings like .git are fine I think, because they’re localized one-offs and have more of a reason to be hidden. It’s the home folder’s function of a junk drawer that makes invisible files/folders a problem there.
- mmphosis 4y agoI already do this. .git/ is a visible folder name-of-project/ in another location: $(infernalpath loc)/version-control/git/path-to-project/name-of-project $(infernalpath loc)/version-control/fossil/path-to-project/name-of-project
- yjftsjthsd-h 4y agoIf everything honored this spec, including the part where it reads environment variables to see where the different directories are, you could do that by sticking the right variables in your environment. I think the one legitimate exception to the rule is profile, because you need that in order to set the variables in the first place. So that one would somehow have to be hard coded to at least have a wider search path
- clhodapp 4y agoMaybe your profile location ought to be something that you're able to set through chsh
- yjftsjthsd-h 4y agoHuh. So I was about to disagree because that felt like a kludge, but actually you're right; setting your shell and its environment are both things that have to be set before the user's normal environment is working for bootstrapping reasons, so yeah, it does make perfect sense to cover both with the same mechanism. Or maybe to make it more generic we could replace the "shell" line in passwd with a "login command" entry, which is always executed by the system /bin/sh with the system environment from /etc/profile? Then you could set it to `XDG_CONFIG_HOME=$HOME/mydotfiles /bin/shell`, or `/bin/decrypt-my-home; export XDG_CONFIG_HOME=$HOME/Library/config; exec /bin/bash --init-file $HOME/Library/bash/bashrc` or whatever you want.
- codetrotter 4y agoThere is a system-wide /etc/profile or /etc/profile.d/ Likewise, zsh will look for /etc/zshrc And zsh will actually look at $ZDOTDIR/.zshenv $ZDOTDIR/.zprofile $ZDOTDIR/.zshrc $ZDOTDIR/.zlogin $ZDOTDIR/.zlogout So perhaps you can set the value of ZDOTDIR in one of the systemwide locations to use "$HOME/foo/bar/zsh/" and this way zsh will use ~/foo/bar/zsh/ as the location for the user specific .zshrc and other mentioned files for every user https://eng.libretexts.org/Bookshelves/Computer_Science/Operating_Systems/Linux_-_The_Penguin_Marches_On_(McClanahan)/02%3A_User_Group_Administration/5.03%3A_System_Wide_User_Profiles/5.03.1%3A_System_Wide_User_Profiles%3A_etc-profile https://eng.libretexts.org/Bookshelves/Computer_Science/Oper... https://bash.cyberciti.biz/guide/Setting_system_wide_shell_options https://bash.cyberciti.biz/guide/Setting_system_wide_shell_o... https://zsh.sourceforge.io/Intro/intro_3.html https://zsh.sourceforge.io/Intro/intro_3.html