Preferences

that's great!

The ~/.mozilla folder is one of the last remaining dotfiles in my home directory

    $ ls -a ~
    . .. .bashrc .mozilla .profile .ssh bak config local pro src
You can also be an xdg ninja if you want: https://github.com/b3nj5m1n/xdg-ninja

Annoyingly, many programs hardcode ~/.config and ~/.local (instead of using XDG_CONFIG_HOME etc) and try to recreate them every time they run. This is a good indication to stop using these careless programs!


(hard) links to the rescue.

I like environment variables, but developers/operating systems have trouble using them well.

I could almost see XDG_CONFIG_HOME being a setting read by a driver that provides access to a "virtual" path (on *nix, all paths are virtual anyways).

> I could almost see XDG_CONFIG_HOME being a setting read by a driver that provides access to a "virtual" path

Now you have even more complexity. Programs will have to know where this "virtual" path is unless you're suggesting it should be hard-coded.

> on *nix, all paths are virtual anyways

What does this mean?

> Programs will have to know where this "virtual" path

Not at all. You can read `XDG_CONFIG_HOME` to know where the config path actually is.

Or, if you're lazy, just hard code to `.config`.

I think maybe you are unfamiliar with how paths work on *nix.

All paths are virtual, meaning they are provided by something. Part of the "everything is a file" nix thing. Normally, files are provided by your file system, which (usually) examines stuff like inodes and partition bits, but they are also provided by processes, sockets, pipes, etc.

Everything is a file. So .config is just another "file", if you move the whole disk directory aside, it still exists, provided by the driver.

So your program has to do exactly nothing, other that use either a path, or maybe the env var (maybe useful if you move the physical location of the folder, e.g.)

I think you are overcomplicating things and contradicting yourself. Maybe you are unfamiliar with how paths work on *nix.

> I like environment variables, but developers/operating systems have trouble using them well.

So then read `XDG_CONFIG_HOME` to find the "virtual" path where the driver will mount the config "virtual" path that could have just been referenced directly in `XDG_CONFIG_HOME`?

> All paths are virtual, meaning they are provided by something.

As opposed to not being provided by something? That's nonsense and even if it did make sense, if ALL paths are virtual, the distinction is meaningless.

Also, you're taking "everything is a file" too literally.

Sorry, I'm not sure if there is a language barrier, or you are not arguing in good faith.

> that could have just been referenced directly in `XDG_CONFIG_HOME`?

It is referenced directly though...

> That's nonsense

What exactly are you asserting to be nonsense? Exactly nothing I said about paths on unix is nonsense, please provide a specific example of what you think is nonsense.

TIL about xdg-ninja, thanks for sharing.

I despise programs that think they can just run a goddamn train on my home directory. I'm sick of hidden files I'm expected to edit by hand for configuration. I sick of ugly dotfiles everywhere.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal