I have a very dumb question: why does the article use `find` with `printf` and depth specification, as opposed to the simpler `ls -a`? I'm assuming it has something to do with portability, but `ls -a` is already in POSIX. I'm a bit confused.
Use the XDG Base Directory Specification
71–80 of 214 posts
Re: Use the XDG Base Directory Specification
#72Overall I don't think xdg dirs on Linux are really as amazing as some people think. For example it is said that one can just back up the config dir to carry all the configuration over to the next install, but apps often dump the default configuration into the config dir, which you don't want to carry to the next install (which will have different versions, so probably a different default config) because that might break stuff. In the end you have to carefully look over all the configuration to see what's worthwhile to take with you, and it doesn't really matter if that's in ~/.appname or ~/.config/appname
Re: Use the XDG Base Directory Specification
#73Oh I‘m fighting the battle for a clean home directory for years. I even use a setup on macOS to set specific environment variables via systemd during login so I can link them into the .config directory. Only issue with my setup in general is that I can‘t just replicate it for other people. I moved .aws directory in .config/aws and I sometimes forget what the default for most tools is or where I helped the tool out to…
Re: Use the XDG Base Directory Specification
#74Re: Use the XDG Base Directory Specification
#75XDG specs are crap. Sure one single ~/.config folder is a very good idea. But I want it clearly visible such as ~/config. But I don't want an additional and confusing ~/.local. Plus I don't want ~/Videos or ~/Pictures folders. I am not dumb. Let me organize my folders according to my needs and my will. The first thing I do when I setup a user account is removing those useless XDG folders. XDG pretend to remove folder…
> I want it clearly visible such as ~/config. No problems: define the $XDG_CONFIG_HOME to be like so. > I don't want an additional and confusing ~/.local. The idea is that data and config are different. Anyway, if you have different taste, that's ok, define $XDG_DATA_HOME to be the same as config. > I don't want ~/Videos or ~/Pictures folders That's not in the XDG spec.
But it is. In the XDG user dir spec.
Re: Use the XDG Base Directory Specification
#76If you are using Rust, you can easily conform to this by using `directories` crate: https://docs.rs/directories/latest/directories/struct.BaseDi...
Re: Use the XDG Base Directory Specification
#77I'd say for windows, you'd probably want to define them as well since a lot of ports will use HOME, XDG_* and other non-windowsy environment variables anyhow.
Re: Use the XDG Base Directory Specification
#78I have a very dumb question: why does the article use `find` with `printf` and depth specification, as opposed to the simpler `ls -a`? I'm assuming it has something to do with portability, but `ls -a` is already in POSIX. I'm a bit confused.
Or they are a show-off.
Re: Use the XDG Base Directory Specification
#79Earlier quoted context omitted.
Luckily 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.
It'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.