Live data from Hacker News

Dotfile madness

0x46.net

241–250 of 534 posts

Re: Dotfile madness

#241

Related pet peeve: macOs '.DS_Store' files. Can someone better-informed than me please explain how to prevent heir creation? Barring that, I'd settle for a justification.

They're a bug/feature from the early days of OS X. Apple should have done the work of storing directory metadata in something like ~/Library/Preferences/com.apple.finder.plist but they were too busy getting anything at all to work.

This is the type of low hanging fruit that Apple evidently doesn't care about anymore, but would go really far towards improving user sanity. It's like when you go to a restaurant and order the cheapest thing on the menu as a way to gauge the overall quality of the food there.

Re: Dotfile madness

#242
post #232

Earlier quoted context omitted.

This strongly reminds me of installing software on Windows, where most games and programs would use My Documents as a dumping ground.

It's fair to store documents and saved games in My Documents. Much better than storing them in C:\Windows or C:\Program Files, as was the case a decade ago, before windows introduced UAC and blocked write access to these.

It's senseless to store files that don't have user-facing meaning in My Documents. I know games that use it varyingly for web caches, shader caches, binary config files, debug logs, Lua scripts, downloaded mods, and even executables. And while arguably most gamers understand what save files are, they can't be double-clicked to open them, so I don't consider them documents (Maybe this is pedantic).

All this kind of stuff is what Appdata\Roaming and Appdata\Local are supposed to be for.

Re: Dotfile madness

#243

One thing I’ve been thinking about is that it would be nice to tag files with the program that created them. Aside from the clutter in my home directory, I have a lot of files that I have to guess as to where they originated from based on metadata like modification timestamps or permissions, but it would be nice to see something like “~/.config was created by some-tool”.

>One thing I’ve been thinking about is that it would be nice to tag files with the program that created them.

Isn't what you describe basically the file extension? Not so much what program created the file, so much as what program is meant to handle/open the file.

Re: Dotfile madness

#244
Files in the Linux ecosystem are a mess. Files scattered everywhere and each instance of Linux uses some different arbitrary directory scheme. We really need a reboot. New micro kernel based OS with clear directory logic and dedicated directories for applications to keep stuff.

Re: Dotfile madness

#245
post #94
post #48

Earlier quoted context omitted.

MacOS stores this for files I download through a browser. "Get Info" has a "Where from" property: http://osxdaily.com/2010/10/12/find-out-where-a-file-was-dow...

Windows does something similar with Alternate Data Streams [0] [0] https://textslashplain.com/2016/04/04/downloads-and-the-mark...

And Windows did it first.

Re: Dotfile madness

#246
post #209

So, what's gonna happen on Wayland when these X-variables aren't defined? Am I going to lose config and have to copy directories from XDG to .config/ because that's new default?

By "X-variables" you mean $XDG_CONFIG_DIRS, $XDG_DATA_DIRS etc.? They aren't related to the X server. The "XDG" is for the old name of the Freedesktop.org project (X Desktop Group) [1]. Freedesktop.org is the host for the XDG Base Directory Specification [2]. Apart from that they are also involved in Wayland. So I see no reason for worry.

[1] https://en.wikipedia.org/wiki/Freedesktop.org

[2] https://specifications.freedesktop.org/basedir-spec/basedir-...

Re: Dotfile madness

#247

Files in the Linux ecosystem are a mess. Files scattered everywhere and each instance of Linux uses some different arbitrary directory scheme. We really need a reboot. New micro kernel based OS with clear directory logic and dedicated directories for applications to keep stuff.

> dedicated directories for applications to keep stuff.

That's what /opt is for!

Re: Dotfile madness

#248
post #46

I think it makes a lot of sense to have all apps run in a sandbox or container by default. Everything is segregated and easy to monitor and track what its doing.

No. Apps need to be well behaved by default.

Re: Dotfile madness

#249

Earlier quoted context omitted.

That’s what the article talks about. How applications should use $XDG_DATA_HOME, $XDG_CONFIG_HOME and $XDG_CACHE_HOME and some defaults if they’re not set.

I'm not seeing it. Where does XDG define when and how an app should use: /home/user/Documents/ /home/user/Downloads/ /home/user/Pictures/ /home/user/Videos/ Let me know what I'm missing.

I can't find "official" XDG documentation of this, but the Arch Wiki describes, for instance, the XDG_DOCUMENTS_DIR and XDG_VIDEOS_DIR environment variables:

https://wiki.archlinux.org/index.php/XDG_user_directories

It looks like maybe the "official" documentation is here:

http://user-dirs.freedesktop.org/releases/xdg-user-dirs-0.17...

But I haven't gone through that carefully.

Re: Dotfile madness

#250

Files in the Linux ecosystem are a mess. Files scattered everywhere and each instance of Linux uses some different arbitrary directory scheme. We really need a reboot. New micro kernel based OS with clear directory logic and dedicated directories for applications to keep stuff.

> dedicated directories for applications to keep stuff. That's what /opt is for!

Or /var ?
Post reply on HN