Live data from Hacker News

Dotfile madness

0x46.net

211–220 of 534 posts

Re: Dotfile madness

#211
post #16

To name and shame some culprits (the one's who have shame, I won't name java because I won't expect them to care) 1) Mozilla 2) Gnome 3) Gimp 4) GPG 5) Thunderbird (Why is there a sep directory and not under .mozilla) 6) mplayer I guess one reason why this occurs is that it's easier for to be carelessly cross-platform this way. Except you'd expect better from mozilla, specially because they store Windows stuff very w…

I don't consider any of these programs shameful. The linked article is a bad take, and there's nothing wrong with the traditional unix approach.

Re: Dotfile madness

#212
I have a short, related tale.

In a long battle to be more intentional about what I keep around, I wanted ~/ to function both as my desktop and downloads directory, on both macOS and nixos. Using it like this would force me to deal with cruft quickly, and avoid crap silently piling up out of sight until its origin is forgotten (though desktops will hide the .dotfiles; those could still accumulate unnoticed).

It was easy to set this up on nixos, but I found the handful of apps dropping non-hidden files there grating. Magic folder behavior on macOS didn't work as well with this.

I ended up replacing ~/Desktop and ~/Documents with links to ~/Downloads. The naming isn't sensible, but I'm happy with how this works on both systems so far.

Re: Dotfile madness

#213

My project cihai ( http://cihai.git-pull.com/ ) and unihan-etl ( https://github.com/cihai/unihan-etl ) both use the XDG specification. The reason I like it is it provides directories to use across platforms (edit: Not sure about Windows), relative to the user. Since the applications download a file (UNIHAN database [1]) to bootstrap, we want to store it in the user's files, not the systems. The other thing I do that'…

> $HOME/.local/share

Just look at that path:

"$HOME": It's my home directory. Cool.

".local": It's in my home directory, but local to it, and not somewhere else? This doesn't make a lot of sense, but er, Okay.

"shared": For Christ's sake, what is this? It's in my home, and local within it, but also shared? With whom? How? Why? I give up.

Why would anyone want to do this? What concrete benefit does this path give us? What specific thing does it let you do that ~/.myprogram doesn't? The article is bad, and the XDG standard is bad. The traditional approach is fine.

Re: Dotfile madness

#214
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.

Was thinking about that when tinkering with docker: why are volumes created outside the user's home directory by default ?

On my fedora ec2 created with a standard ami, docker doesn't work without sudo (didn't try to reconfigure, so it may if I hack), so that behavior is understandable, though not desirable.

Re: Dotfile madness

#215

To me, the real problem is not the dotfiles, but the regular (i.e. non-hidden) files that applications surreptitiously create in my home folder. (Which the author does mention as being particularly bad.) dotfiles in the home folder are not a new thing on Linux (e.g. .bashrc, .profile, .emacs, etc.), even if it would be better if more applications used the XDG folders. And if I don't see them when I "ls", they don't b…

Suggestion. Just do: mkdir ~/real_home And use that as your real home :)

Ah, just like on Windows, where one has to create a second My Documents folder to maintain sanity.

Ew.

Re: Dotfile madness

#216
I have long deplored the sheer amount of config files that clutter the top level of any project nowadays. .gitignore, package.json, webpack.config.js, babelrc, travis.yml, it’s endless. This very short list is really the tip of the iceberg. These things need to be in a dedicated config folder.

It’s so nice to see this article at the top of HN. I had long thought I was the only one who felt this way.

Re: Dotfile madness

#217

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.

.DS_Store contains the positions of file icons, the last view mode (list, icons, etc.), and other stuff for Finder. You can avoid creating it by not using Finder, and you can probably also avoid it if you carefully avoid not dragging icons around. If it bothers you because you keep committing it into your Git repo, then you can exclude it in a global .gitignore[0].

[0]: http://egorsmirnov.me/2015/05/04/global-gitignore-file.html

Re: Dotfile madness

#219
post #139

Earlier quoted context omitted.

Sorry I do not want a directory /Documents if /docs is what i want when i want it...

It is your lucky day - there is a standard for this as well https://wiki.archlinux.org/index.php/XDG_user_directories

I've only been using Linux for around 10 years as my only desk and laptop OS and this is the first I heard of XDG user dirs! This laptop runs Arch. Thanks for the heads up.

I'll drop "/etc/papersize" in return. If you are not familiar with this and do not print to letter paper then you will find it very, very useful.

Re: Dotfile madness

#220
I prefer to use `ls -lah` which always shows the dot files. It sure would be nice if these were placed in a different folder. Maybe ~/.../ to put all the things. Sure, cat ~/.bash_history would need to be cat ~/.../.bash_history which isn't as convenient.

But, I sure do agree with the frustration. My work machine has nearly a hundred hidden things. My Chrome usually downloads things to ~/Downloads/ but Firefox often likes to store the file in ~ which then is often hard to find when I jump over to a console.

I've made an effort to clean things up. Trying to set firefox to download to the Downloads folder, deleting everything personal out of the home folder. But, of course, then that just goes to prove that I do not have control of my ~ folder. I'm doing everything I can to keep my own stuff out of it. Which is sad.

Post reply on HN