36

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!

top 21 comments
sorted by: hot top controversial new old
[-] hschen@sopuli.xyz 14 points 1 year ago* (last edited 1 year ago)

https://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

[-] devfuuu@lemmy.world 6 points 1 year ago

I've seen developers complain that xdg is not a true standard and it only works on linux, which at that point I wanna start slapping people around.

[-] OsrsNeedsF2P@lemmy.ml 7 points 1 year ago

I've seen this too, but as someone who's submitted patches to 5+ projects to fix the pathing, not once has it been rejected

[-] NuclearDolphin@lemmy.ml 1 points 1 year ago

Thank you for your service o7

[-] KindaABigDyl@programming.dev 12 points 1 year ago* (last edited 1 year ago)

No. 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

[-] dannym@lemmy.escapebigtech.info 10 points 1 year ago

$XDG_CONFIG_HOME not every application respects it, but a lot do

[-] Dirk@lemmy.ml 3 points 1 year ago
[-] SigHunter@feddit.de 2 points 1 year ago

No because Op's question is, what about those who do not confine to xdg config home?

[-] doomkernel@sopuli.xyz 9 points 1 year ago

There 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!

[-] underisk@lemmy.ml 7 points 1 year ago

From 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@lemmy.ca 7 points 1 year ago

Might 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.

[-] Klaymore@sh.itjust.works 6 points 1 year ago

Yeah, Nix(OS) with Home-Manager is great for managing dotfiles. Impermanence is also nice but a bit more complicated.

[-] Sharmat@beehaw.org 3 points 1 year ago* (last edited 1 year ago)

Adding VanillaOS as well, saw it a few days ago and it seems like a pretty decent immutable distro too.

[-] Klaymore@sh.itjust.works 6 points 1 year ago

What ended up happening with me was I just have all my stuff in a separate /stuff partition. That way I don't need to worry about dotfiles cluttering up my actual data. I also use NixOS Home-Manager to manage my dotfiles for things like git and vscodium.

[-] cyanarchy@sh.itjust.works 2 points 1 year ago

I'm a recent transplant from windows to linux and I saw this coming. My Documents is not reserved for documents that are actually mine, I had no expectation /home would be any different, and it seems I was correct. Other than some things I want quick access to (downloads, notes, scripts) I keep everything I care about organized under /data.

[-] jerrimu@lemmy.world 3 points 1 year ago

You can specify that in most setups, I’d reinstall and try that. Backing up your .config to git is super easy.

[-] pruneaue@lemmy.blahaj.zone 2 points 1 year ago

Xdg-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 concept

[-] promitheas@iusearchlinux.fyi 3 points 1 year ago

I 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

[-] stepan@lemmy.fmhy.ml 1 points 1 year ago

This tool can help you with certain programs that requires some extra steps to use .config/

load more comments
view more: next ›
this post was submitted on 24 Jun 2023
36 points (97.4% liked)

Linux

47345 readers
1147 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS