Use the XDG Base Directory Specification
131–140 of 214 posts
Re: Use the XDG Base Directory Specification
#132Earlier quoted context omitted.
If 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 pat…
Honestly, when your xdg list gets huge, apps should just use xdg out of the box... my /etc/profile is 35 lines of just xdg junk.
Re: Use the XDG Base Directory Specification
#133Back in the old days I could delete `. ` and reset a program to its defaults. Now I have to navigate through `.config` and try to find where stuff is. How is this better?
Re: Use the XDG Base Directory Specification
#134One of the things that changed my life recently, that I hadn't seen before: NeoVim has a NVIM_APPNAME variable that lets you change the app name. So when I wanted to try AstroVim, I just set NVIM_APPNAME=astrovim, and dropped the files in ~/.config/astrovim instead of blowing up my existing (shitty) ~/.config/nvim. I really wish the idea of configurable appnames was a part of the spec! (or a well-known extension!)
Re: Use the XDG Base Directory Specification
#135Does it really help that much in practice? > Easier to share configuration settings I want to share my nvim config between both my home Linux machine and my Mac at work, but I don’t want to share my config for gnome and its apps. So now I’ve got to maintain a script to go one more subdirectory deep to pick which dotfiles to sync and which to ignore... > Easier to temporarily ignore the config > It is easiest to set X…
> Easier to create backups i want to mess up with wine, now I just backup ~/.wine, do whatever, restore. With split folders, i'd have to backup a bunch of folders (.config/wine, .local/share/wine, .local/lib/wine or wherever the files, registry, dosdevices and other stuff would be put).
find ~ -type d -name "?wine" -exec cp -r "{}" /path/to/my/wine/backup/ \;Re: Use the XDG Base Directory Specification
#136It's important on any system, not just XDG. The OS will assume you do, and offer features based on it, such as cleaning cache dirs, emptying temp dirs, etc. It's not just about being tidy, although it's important. But remembering all that stuff is annoying. If you use Python, the wonderful "appdirs" package will make using the best dir for the job on Windows, Mac and Linux, easy and transparent: https://pypi.org/proj…
Its successor is https://pypi.org/project/platformdirs/
Re: Use the XDG Base Directory Specification
#137Back in the old days I could delete `. ` and reset a program to its defaults. Now I have to navigate through `.config` and try to find where stuff is. How is this better?
Re: Use the XDG Base Directory Specification
#138I actually just make my personal home directory in the root of the filesystem. So /me. If /root can have it, why can't I? It is my machine after all.
Beware that any directory other than one under /home might not enjoy the same protections by default by other programs, like systemd’s ProtectHome setting. You’ll also probably want to adjust some settings, like AppArmor’s @{HOMEDIRS} setting.
Re: Use the XDG Base Directory Specification
#139Earlier quoted context omitted.
Do any of the Linux distros do this? Strikes me as the kind of thing Debian would do for everything in apt
Do you have any examples of Debian doing this?
Re: Use the XDG Base Directory Specification
#140It's important on any system, not just XDG. The OS will assume you do, and offer features based on it, such as cleaning cache dirs, emptying temp dirs, etc. It's not just about being tidy, although it's important. But remembering all that stuff is annoying. If you use Python, the wonderful "appdirs" package will make using the best dir for the job on Windows, Mac and Linux, easy and transparent: https://pypi.org/proj…
Which makes this less than ideal.