Hey guys! Is there a way for me to force apps to treat e.g. $HOME/.config/ as their default directory to look for settings? I want to clear up my home directory because its getting quite messy and I don’t even have that many packages installed yet.
Also, any way that would be easy and efficient for use with git for the purpose of backing up my dotfiles.
Thanks!
hschen ( @hschen@sopuli.xyz ) 11•2 years agohttps://wiki.archlinux.org/title/XDG_Base_Directory#Support, the situation is crap tbh and alot of devs refuse to even give you the option of switching to XDG standards for some reason. I started using flatpaks for most of my programs just to escape this.
I do know XDG standards are messy for devs to implement but at least have everything in .config or .local instead of spewing it across my home folder
KindaABigDyl ( @KindaABigDyl@programming.dev ) 11•2 years agoNo. Some applications won’t change even if you’d make the PR for them, simply because they don’t want to change legacy features.
For instance, the bash maintainers have refused to put .bashrc into .config/ and to even allow the option to move it.
xdg ninja can help move some stuff out of your home dir tho
doomkernel ( @doomkernel@sopuli.xyz ) 9•2 years agoThere this program call xdg-ninja which tells you how to change the settings of various packages that live in $HOME.
Is not a perfect though because you’ll have to do all changes manually but its the best I can think about. Hope its helps!
Danny M ( @dannym@lemmy.escapebigtech.info ) 8•2 years ago$XDG_CONFIG_HOME not every application respects it, but a lot do
𝘋𝘪𝘳𝘬 ( @Dirk@lemmy.ml ) 3•2 years agoOnly valid answer.
SigHunter ( @SigHunter@feddit.de ) 2•2 years agoNo because Op’s question is, what about those who do not confine to xdg config home?
underisk ( @underisk@lemmy.ml ) 7•2 years agoFrom my experience there’s no simple way to do it. It’s something you’ll have to handle on a per-app basis as there’s no standard that is followed universally. Here’s a website with links to resources on various methods people use.
sqraw ( @sqraw@lemmy.ca ) 6•2 years agoMight be worth looking into immutable distros (nix, guix) and their home management systems, or containerised apps (flatpak, where you can inject config). A lot of tools are hardcoded to non standard locations so it’s kind of a losing battle by default. A similar strategy would be to use permissions or mount certain folders as read only.
Sharmat ( @Sharmat@beehaw.org ) English4•2 years agoAdding VanillaOS as well, saw it a few days ago and it seems like a pretty decent immutable distro too.
yingleheimerschitz ( @yingleheimerschitz@lemmy.ml ) 4•2 years agothe existing comments point out excellent solutions, but no one has mentioned boxxy (https://github.com/queer/boxxy) yet
TootSweet ( @TootSweet@latte.isnot.coffee ) 4•2 years agoOne option might be to run certain of your apps in Docker. There are ways to go about running even graphical apps in Docker. And with Docker, you can tell it to mount /home/<username>/.config/someapp on the host to /home/<username>/.someapp in the container.
stepan ( @stepan@lemmy.fmhy.ml ) 1•2 years agoThis tool can help you with certain programs that requires some extra steps to use .config/
pruneaue ( @pruneaue@lemmy.blahaj.zone ) 1•2 years agoXdg-ninja that was mentioned by other people is probably the best for the main issue.
For the git stuff, look into bare git repos. Iirc distrotube has a good video explaining the conceptI decided to go with chezmoi because of its simplicity and multi-machine design from the get-go. It seems the best option for me atm
- bOt ( @bOt@zerobytes.monster ) 1•2 years ago
Couldn’t determine subreddit. Try requesting with both the
url
(https://old.reddit.com/r/whatever) andtitle
(/r/whatever).