694
Please use .config 😭 (lemmy.dbzer0.com)
submitted 5 months ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top new old
[-] [email protected] 248 points 5 months ago

Attention electron developers: under no circumstances do I want your entire app in .config.

[-] [email protected] 133 points 5 months ago

You feel the curling of the monkey's paw; the entire app is now in ~/.local/AppName

[-] [email protected] 28 points 5 months ago* (last edited 5 months ago)

Even better, ~/.local/share/

[-] [email protected] 4 points 4 months ago

I mean... At least that's more correct... If the monkey's paw is giving us things that are better but not ideal i'm gonna use the fuck out of it.

[-] [email protected] 4 points 5 months ago* (last edited 5 months ago)

As an alternative, how about my entire cache in .config?

Looking at you VSCode, with 3 unique cache folders.

[-] [email protected] 135 points 5 months ago* (last edited 5 months ago)

but please don't hard-code ~/.config or $HOME/.config. Use the XDG_CONFIG_HOME environment variable, with $HOME/.config as a fallback if it's not set.

Many programming languages have a cross-platform implementation of this built in to their standard library. C# has Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) which uses XDG_CONFIG_HOME on Linux, local AppData on Windows, and whatever is the correct thing on MacOS (not very familiar with how things work on MacOS)

[-] [email protected] 11 points 5 months ago

On macOS, the correct thing to use is usually NSUserDefaults API, or - [NSFileManager URLsForDirectory:inDomains:] with NSApplicationSupportDirectory (gives a list of paths to find your config file in, like XDG_CONFIG_DIRS)

[-] [email protected] 7 points 5 months ago

Never new about this! That's very handy

load more comments (1 replies)
[-] [email protected] 83 points 5 months ago

It's still a lot better that creating random .folders per application in your home.

[-] [email protected] 38 points 5 months ago* (last edited 5 months ago)

Nah just put it in ~/.thing-config.d/01-0x45- 110100100-main.options-extra2cache.swp along with three godzillion other files like it's normal and very sane for users who edit such files to have the big picture of the default configuration dreamed up by some utterly deranged lunatic be spread across enough files to represent all known stars in the galaxy, standards are for losers amirite ^/s^

[-] [email protected] 18 points 5 months ago
[-] [email protected] 69 points 5 months ago

The font in the screenshot makes me angry.

[-] [email protected] 11 points 5 months ago

Idk what happened there either. After updating from Android 12 to 13, this is how it was ever since. And now I'm used to it.

[-] [email protected] 4 points 5 months ago

Konsole once did that to me, and started inserting random tabs.

[-] [email protected] 6 points 5 months ago
load more comments (2 replies)
[-] [email protected] 4 points 5 months ago

Hey! Would you mind guiding me as to what is going on in this picture? Is this an APP that allowed to SSH into your server? You got my attention with this picture, and I'm curious to hear more.

[-] [email protected] 8 points 5 months ago

It's Termux, basically a fully fletched terminal for Android. So you can install various tools via apt, and use them, for example yt-dlp, ffmpeg, gcc, python etc. And yes, you can also use SSH, both as server and client. I use it very often to connect to my servers on the go.

You can even use chroot to basically run a distro of your choice.

[-] [email protected] 5 points 5 months ago

Damn, that sound pretty cool, thanks for the info!

[-] [email protected] 3 points 5 months ago

It's also incredibly useful to backup /sdcard via rsync or Borg every night automatically

Or access the contents of your phone via SFTP

load more comments (3 replies)
[-] [email protected] 80 points 5 months ago

XDG? OpenDesktop? Dunno what that is, time to dump everything into ~/.myawesomeapp

[-] [email protected] 62 points 5 months ago

Oh, no. Don't even make it a hidden folder, it needs to be right there, front and center. And make sure you use a bunch of capital letters in the name, because you're so fucking important.

[-] [email protected] 26 points 5 months ago
[-] [email protected] 9 points 5 months ago

And Arduino.

[-] [email protected] 4 points 5 months ago

At least it gives you the option to change it

[-] [email protected] 22 points 5 months ago

Just dump it in ~

[-] [email protected] 38 points 5 months ago

It really depends for what. I don't think nginx config should be in $HOME/.conf/

[-] [email protected] 74 points 5 months ago

Right? It goes into ~/Documents/

SMH my head

[-] [email protected] 51 points 5 months ago

Everything into ~/Downloads/ until the partition is full.

load more comments (2 replies)
[-] [email protected] 26 points 5 months ago* (last edited 5 months ago)

Unless it's running as your own user as part of your session. /etc for system-wide and ~/.config for your own user makes a lot of sense.

[-] [email protected] 6 points 5 months ago

They want ~/etc/ in their home, which just seems like a renamed ~/.config/.

[-] [email protected] 36 points 5 months ago* (last edited 5 months ago)

Please use $XDG_CONFIG_HOME (and other XDG base dirs)

[-] [email protected] 22 points 5 months ago

I’ve been forcing myself to learn to use NixOS with home-manager just to avoid this. Not to worry, it’s just my home.nix that’s a dumpster fire now

[-] [email protected] 5 points 5 months ago

I've been using Nix for a little more than a year, I don't think I've touched my configs in better than 6 months. I'm honestly not entirely certain what would constitute a dumpster fire in a Nix config

I've probably only modified 50 or 60 lines of the default configs.

I do have a folder full of shell.nix files when I need to do a special workflow, like I have one that kicks up wine and sets up mp3tag, another that sets up rust, another sets up Python, and one that sets up for yt-dlp. But I don't carry anything in my base configs that I don't use in a given week

[-] [email protected] 4 points 5 months ago

I set up a nix os for a friend once. Forgot the master password. It's been 5 years. Oh well.

[-] [email protected] 19 points 5 months ago

Use xdg-ninja to help clear out unwanted files not in your home folder, and give tips to move them into a normal folder like .config

[-] [email protected] 19 points 5 months ago
[-] [email protected] 6 points 5 months ago

Isn't that just .config?

[-] [email protected] 13 points 5 months ago

laughs in home-manager

[-] [email protected] 8 points 5 months ago

I keep my home directory nice and tidy in terms of visible files/folders, but as soon as you ls -a there's so much random shit

[-] [email protected] 5 points 5 months ago

I'm in this picture and I don't like it

[-] [email protected] 2 points 5 months ago

I think this picture would be an upgrade from my current situation. It is perfectly normal to have to use sudo find from root to locate anything, isn't it? It's especially fun when you don't remember what the thing you are looking for is called and are trying to guess the name to find.

load more comments (3 replies)
[-] [email protected] 3 points 5 months ago

I just throw lots of dumb shit in my home directory. I actually have the Windows Entertainment Pack for Windows 3.1 in a folder in there. Runs great in WINE. Home directory is great for storing random files.

load more comments
view more: next ›
this post was submitted on 25 Dec 2024
694 points (98.6% liked)

linuxmemes

25154 readers
694 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS