Part of the philosophy of the slightly odd suckless people is their projects are mostly configured by changing the source code and recompiling. This is I suppose a similar approach in a modern open source vein. Although their general asceticism makes their projects a bit of an acquired taste I suspect.
Ohh acquired taste it is.. I had two stints with suckless software. First, when i was in early twenties when I had a lot of time in the world, and thought the manliest way to talk to a machine is all through low level C code. Had a whole flow to patch it and heck the code is so well written and commented, i was able to understand it. Then, i guess life happened and i discovered more interesting stuff to spend time on.
And now in my late twenties, suckless terminal is the only one that would work reliably on a shitty old enterprise linux system at work. Yeah, we got xterm and konsole (the older one). I am seeing them in a whole different light now. I did not read the source code now and it is effectively a foreign language to me, but just being able to have modern features in it without too many dependencies is a different level of bliss. This time, I am glad I have the flexi patch to the rescue since, i passed on suckless terminal as a real alternative since I don’t want to patch it manually or solve merge conflicts!
Even though I don’t like the elitist attitude of the project, can’t deny they got a point. Why does a terminal emulator need to be so complicated!
> I don’t want to patch it manually or solve merge conflicts
I wonder, is this really such a big problem? How often do people add patches or change their config?
I've configured my st once and haven't touched that build for years. I use only few patches like scrollback, custom colortheme and a "plumb" for few scripts.
I've also had an opportunity recently, to try a "modern" and trendy terminal and I can't see myself switching to something slower (in terms of lag) and using 10x more memory and cpu even when idle for literally zero gain.
Not frequently, however in experimental phase where you need to debug if any specific combination of patch is causing issues, it helps a lot. For instance, I had issues with my delete key not working even with delkey patch and then after trying to enable patches incrementally I zeroed in on the fixkeyboardinput patch. Sure I can do this in a VCS flow but, it feels magical what a bunch of ifdef’s simplify the process to. And I feel it is still suckless philosophy since the code still compiles to exactly what you need.
Additionally, it helps lower the barrier to entry for a lot of people, who would have shied away from the manual patching flow. You’d be surprised how often i have seen people squint with default xterm on our servers, not knowing how to configure it and messing around with xrdb. (Which takes a while to propagate across LSF clusters).
With flexipatch it feels easier to introduce it to them since I just say run make after any config changes to apply the setting and restart the terminal emulator.
Ohh i tried wezterm and ghostty. Couldn’t get them working using just software rendering. And once st worked, I realized I don’t need it tbh.
the general asceticism, frign (on the board of suckless.org e.v.) setting his mailserver hostname to a nazi bunker, them picking a torch march through the german countryside as a bonding activity instead of literally anything else... yeah. at that point why would one want to bother trying to acquire the taste?
If people just followed the XDG Base Directory Specification, config file littering would be a non-issue. More and more projects adopt it, even holdouts like Firefox.
I wonder how many apps actually read the correct XDG environment variables and obey them, versus just hardcoding paths that match their machine’s config paths (typically ~/.config/*)
I almost want to set up a VM that sets up XDG_CONFIG_HOME as ~/.foobar and see how many apps actually respect it, and how many still write to ~/.config.
A few years ago I had a Windows box where I pointed XDG_CONFIG_HOME et al to the corresponding-ish Windows paths (AppData subdirectories, mostly) so that the many Linux-derived CLI programs I was using wouldn't clutter up my userdir, and it worked pretty well, though there were a few programs that didn't get the memo. Unfortunately I don't remember which ones they were. Most programs get it right, though!
I don’t mind ~/.* for config, especially when the config is just one or two files. What I don’t like is programs like go and cargo treating my $HOME as a dumping ground for every file they want to download and/or cache.
At least cargo places everything in a .cargo directory, so it doesn’t display by default. Go will instead write to $HOME/go, without even the decency to use a hidden directory, unless you first define the GOPATH environment variable.
And if you install more than one version of go, they get placed in $HOME/sdk [0]. Last I checked, this path is hard-coded with no override, despite this being a known issue for 8 years.
In general, I find it unacceptable for programs to use (anywhere in) my file system, besides /tmp, as a dumping ground for their caches and downloads, without cleaning it up.
> In general, I find it unacceptable for programs to use (anywhere in) my file system, besides /tmp, as a dumping ground for their caches and downloads, without cleaning it up.
/tmp must be world-writable and for multi-user or multi-tenant systems it becomes a security hole. Storing temporary files in the current user's home directory (or a subdirectory thereof) makes sense.
What doesn't make sense is this blog post about TMP and TEMP, and ending with "I don't know why" (in different words).
The reason is simple: different programmers thought the other name was bad. They were under no obligation to come to a consensus.
Don't forget about TEMPDIR and TMPDIR! Also Windows has its own environment variables for this. But generally, Linux software ported to Windows still use TMP or TEMP.
> /tmp must be world-writable and for multi-user or multi-tenant systems it becomes a security hole. Storing temporary files in the current user's home directory (or a subdirectory thereof) makes sense.
It makes sense when it's a user option. If /tmp isn't an option due to security concerns, then use $CWD by default. I can always alter the config to some other location if I do not like it. With the amount of programs that litter $HOME, especially with caches, you have to whitelist directories when backing it up. With a naive rsync, you'll find half your transfer is junk.
I don't see much difference between a program littering in ~/.app versus littering in ~/.config/app, ~/.local/share/app , ~/.local/state/app and ~/.cache/app
I don't have strong feelings one way or the other, the files are hidden so out of sight out of mind for me.
I don't disagree that it would be cleaner if things were more organized, but I definitely prefer something more like that the person you replied to said, ie "~/.xdg/foo/{config,share,state,cache}"
The only XDG folders that seem reasonable to me are .local/share/fonts and .local/share/applications, and I think both of those are still just conventions, not actually described in any spec.
It all sounds so easy, until you learn about the XDG Base Directory Specification[1]. You're actually supposed to do a whole song and dance around a hierarchical set of environment variables, associated defaults, and resolution orders.
Most modern software uses .config, and I suspect the holdouts are due to cross-platform support issues. Windows may have it's own equivalents, but they are radically different from Unix. Developers may not want to deal with those differences, or don't want to deal with the support issues related to those differences.
The remaining holdouts tend to be very old applications. (The XDG standards are less than 25 years old, then you have to give time for them to be adopted.) For some of those applications, it would create support issues even if it would be trivial to implement. For others, it would create issues since other software would have to be modified to reflect the changes. For others, the software did not have a distinct configuration directory so untangling it would be a major effort.
In the case of the latter, just look at Firefox. Yes, it recently moved the .mozilla directory to .config. It is in no way reflective of the XDG standards. Among other things, there are log files, cache files, and add-ons in there. In my mind, that is worse than having ~/.mozilla. Instead of having a directory that can be cleanly backed up, with the exceptions being elsewhere, I am left having to sort through everything. I don't blame Firefox for taking that approach though: users were demanding a clean home directory and the developers had legacy code to deal with. They simply took the path of least resistance. (That said, Firefox isn't the only culprit here.)
I don't know if anyone is actually using roaming profiles, but config should go into the %APPDATA% folder to support that. %LOCALAPPDATA% is for things that shouldn't be synced to different machines, such as caches.
I'll take dotfiles I can grep and mange with a text editor over settings littered all over a central binary registry. But maybe that's just what I'm used to.
Every single program has to write logic to parse/store/query/validate those values. A common API with a single store can be type-enforced, backed up, and likely easier to work with from an internationalization perspective.
I do like dotfiles for portable apps where everything the program needs is in one folder. Personally, my need for portable apps has gone down year on year.
Yea this is something I'd love to see standardised, a distro that was able to enforce a .config folder somehow would be a winner for me. Think weve probably missed the boat though.
As these things go, there obviously is a standard for this called the XDG Base Directory Specification[0], which elegantly solves almost all configuration path needs—and has been ignored, violated, or only partially implemented, since forever.