Settings

Theme

My .config Ship of Theseus

shift1w.com

34 points by jacobwiseberg 2 months ago · 39 comments

Reader

Leonard_of_Q 2 months ago

I sort of get the appeal of fine-tuning the terminal environment to perfection but after fiddling with such things for many years - decades - I ended up using mostly stock settings with a very few changes. The advantage of that approach is that I feel at home just about anywhere instead of just on my one or few customised systems. My customisations mostly consist of a local /bin directory with a few hundred scripts (wc -l now shows 263) I made over the years which I dump in a new environment plus a few additions to .bashrc (yes, bash, not one of the fancy replacements (zsh, fish, oil, ...) which are supposed to be better but in reality just end up being different) to set custom paths etc.

  • saysjonathan 2 months ago

    I landed on near the same thing. I also went too far the other way at various points: ed as editor, weirder shells (posix sh, rc, es, rush (ruby shell), pdksh), suckless everything (even on MacOS, where possible). I found my healthy balance between using more modern tools and learning the defaults to avoid too much configuration. I still have 281 lines in dotfiles (according to `git ls-files | xargs cat | wc -l`), along with my dwm.tmux[0] as window manager, but I feel like I can generally operate in most environments as long as base tools are present. If others haven't tried it, I recommend giving it a go. Try being bravely default.

    [0] https://github.com/saysjonathan/dwm.tmux

  • jamesfinlayson 2 months ago

    Agreed. I had a workmate who stored all his dotfiles in git and checked them out on new computers.

    With very few exceptions I just stick with the defaults and it works for me.

    I also had other workmates who did everything in some exotic shell, so of course none of their one-liners worked in bash.

  • jacobwisebergOP 2 months ago

    I like this approach. I feel like my end result is somewhat similar nonetheless. I prefer to stick with as many defaults as I can and try and learn those first. I try to only change what I see really adds to my workflow.

  • dietr1ch 2 months ago

    I landed on a modular home-manager config that I can setup once and update in a single command.

    It keeps my machines uniform enough without too much hassle.

threecheese 2 months ago

And then you get friends like Claude - dozens of them - which prefer to crap all over $HOME.

The app ‘Conductor’ does this, and I had to uninstall it; I just can’t crack my ‘ls ~/.co<TAB>’ habit, and “nd” is juuuuuust ahead of “nf”.

It *used to* be ‘~/c<TAB>’ before .claude crapped itself into existence..

  • flexagoon 2 months ago

    I usually treat an app putting stuff into $HOME with no reason to change that as a reason to not use the app. I've genuinely switched software multiple times because of the old one doing this.

    I also suggest you try xdg-ninja, which automatically scans your home directory and shows which of those directories you can change to a different location:

    https://github.com/b3nj5m1n/xdg-ninja

    I have a big shell config file that sets proper locations for all sort of programs I use:

    https://github.com/flexagoon/dotfiles/blob/main/dot_config/f...

  • chrisweekly 2 months ago

    I feel you. My solution is leaning into `z` ("frecency" heuristic), and selective use of "extra" zshrc aliases.

  • SAI_Peregrinus 2 months ago

    Stick all the stuff you manually care about into `~/home/` (or some other directory of your choice, e.g. `~/a/` for easy typing). Leave `~/` for the various programs to dump config files in.

  • jauntywundrkind 2 months ago

    There has to be some fix for the name-clash problem. Package-lock.json made me so so sad. And .test.ts and .ts. It's so frustrating when this goes on.

  • wpm 2 months ago

    I have given up on my home directory.

    On my Mac, there are 94 items in my home directory. 10 of them are expected, coming from either the user template or from single user installations of applications.

    Two of the additions are not hidden: go and quicklisp. I don't actually mind this. Hidden folders are stupid if I am expected to be navigating into them either in the GUI or in the CLI. Slightly annoying since there's a perfectly good Library folder they could have dumped themselves in instead but whatever. At least I can see them without unhiding hidden files.

    The rest? The other EIGHTY FUCKING TWO items in "my home"?? Hidden dot file BULLSHIT.

    11 for Zsh related bullshit. Eleven! Are you fucking serious?

    .wget-hsts? What the fuck is even that? Fuck off!

    What absolute slop! What an incredibly stupid and shitty way to create caches and configurations. Braindead. I feel like im taking crazy pills. I'm gobsmacked that every time I look into "can I move this dogshit" I find a GitHub issue where the devs seem taken aback and confused "why would you want to do that". Eat shit! What do you mean the plaintext json files we put your config into and never built a GUI for should go into a folder you can see and navigate too easily? Whaaaat?? What do you mean "$XDG_CONFIG" exists? Hmmm no, checking for that would take 5 lines of code so no. Also, assholes, macOS doesn't canonically use goddamn XDG environment variables. Just because it uses a terminal you recognize doesn't mean it's fucking Linux! Take your .config and .cache and .local shite out of here.

    And I've tried to fight it, but eventually you give up. It's a losing battle against tasteless patterns and asshole, careless developers. 150 something versions of Firefox and only recently could you move .mozilla. OpenSSH will never not pollute your home directory, they said so!

    My desktop is now my home directory. It's mine. My terminal starts up there. Folders of stuff I actually give a fuck about go there. My browsers download into ~/Desktop/Downloads. I'm done fighting. My home was trashed. Crimes occurred. So I moved.

    God I fucking hate dotfiles.

    EDIT: Oh yeah, my favorite part is that on macOS, the Desktop folder is protected by TCC, so I can easily tell if some background app or something is trying to access it and deny it right then and there. It's a far safer place to keep things like AWS keys and secrets and my SSH keys, but NNoOOoOoOOoO that goes in my home folder that has nothing but POSIX file system level permissions. But don't worry, it's hidden by default! No one will know its there! At least the AWS cli lets you point somewhere else but that comes with a bunch of extra friction.

    Apps require full disk access to read my Safari cookie jar database, but they can grab my SSH keys without any issue. Great system we got here! .stupid .bozo .bullshit

    • sudahtigabulan 2 months ago

      Given that most software hides dot files by default, where do you see them so often?

      The only place I've encountered where they are visible by default and do get in the way is bash filename completion, and you can change this via the readline config file:

        # ~/.inputrc:
        set match-hidden-files off
      • wpm 2 months ago

        > Given that most software hides dot files by default, where do you see them so often?

        I see them when I have to show unhidden files to find some massively bloated folder taking up space or go and manually modify any of the files in those hidden folders, which is quite often! Is it not unexpected to want to navigate to my configuration files? Why is .config hidden? Why not just put it in a folder called "Appropriate-Synonym-For-Stuff-You-Are-Unlikely-To-Want-To-See-Daily/config" I get you're trying to be helpful, but I know that I can hide them and they are hidden by default. The problem is not seeing them. It's that there are 94 top level items in "my" home directory and I'd rather there not be, and yet, I am doomed to suffer this, and I can't most of it because most apps do a piss-poor job of following XDG basedir standards or incorrectly apply them to platforms where they are absolutely not a valid or even sensible specification, and just lazily hardcode their code to pile shit into $HOME/.fucking_garbage.

        It is a beyond stupid convention that a . automatically hides a file or folder. It is my computer. Files should always be visible in the GUI or in the terminal. If they should not be for convenience, then that is enough of a "type" or "classification" of a file to group them all together and collapse all that clutter into a folder that is still visible, and easily browsable without switching modes in my graphical file browser or having to add extra flags to commands and what not. Otherwise, the only person who should be hiding anything on my computer is me, via a file system flag (chflags first appeared in BSD 4.4, non-existent on Linux) or manually in the file manager GUI.

    • froh 2 months ago

      most of that should live in .cache or .config and .local/share indeed

      if only people knew about, read (and followed) xdg... aka freedesktop.org

      • wpm 2 months ago

        I have a Mac, not an XDG desktop. I would only expect and want X applications I run through Xquartz (all zero of them) to follow that.

        None of that shit should live in .local. I have a "local" already, it's called ~/Library. There's a Caches folder in there. Also a Preferences folder.

        At the very least why make local a dot-folder? Why add the extra keystroke? Local? Local to what?! Of course it's "local" it's my fucking home folder, everything in it is "local" to me. It's redundant. It just further supports that the convention is stupid.

        Even when I'm on my Linux computers, where it is at least a half-assed convention, I still hate this crap. The XDG directories and hierarchy are bad and dumb. None of them should be "dot" anything. Hiding clutter under a dot is like hiding clutter in your house under a rug. It's not organization, you just have a big mess you don't have to look at but you have to step around all the time. NeXT solved this shit 30+ years ago and they cleaned it up 25 years ago. You put it in a box (~/Library) with a clean label of a proper noun (Preferences, Caches, Keychains, Extensions, etc) that identifies it, stow it somewhere out of the way but accessible, so you can find it when you need it but otherwise not have to look at it. 84 little dot folders could all be swept out of sight by moving them into the Library, one single folder in my home, but instead, they just sit under a big dot rug in the middle of it.

        Apple does commit one sin here and that is hiding the user Library folder by default, but that is part of making computers work for mere mortals as dumb users will go and delete their Library folder to save space and break shit, but that uses a proper file system flag not this crappy convention from half a century ago that breaks sorting.

        All that said, I do agree that at the very least Linux apps should be following $XDG_CONFIG and only if unset, pollute the home folder. It's a fucking if-then-else. No excuse. I shouldn't be seeing shit like ".arduinoIDE" or ".claude" Claude should be able to add this feature on its own anyways.

        • rewgs 2 months ago

          > I have a Mac, not an XDG desktop. I would only expect and want X applications I run through Xquartz (all zero of them) to follow that.

          XDG has nothing to do with X11. XDG stands for "Cross-Desktop Group," and is designed specifically for any Unix or Unix-like operating system, which includes macOS.

          • wpm 2 months ago

            XDG stands for X Desktop Group. It absolutely does not stand for Cross Desktop Group and has nothing to do with macOS or Windows, outside of aforementioned X apps on Quartz via XQuartz which as far as I know is completely dead.

            • froh 2 months ago

              the successor to xdg, freedesktop.org, however is acknowledging the need for cross platform openness. that's exactly why you indeed can configure where the three main "stores" of compliant applications, their config, their data and their caches.

              you can point them to %APPDATA%..., ~/Library or the Linux defaults.

              my point in this is: there are free and open conventions and we wouldn't need this "my HOME is cluttered" fuss, if technical teams would embrace them.

              so why don't they respect XDG_ env vars for their config and data?

              • wpm 2 months ago

                > the need for cross platform openness.

                The need for cross platform openness? Did anyone at FDO ask Apple or Microsoft if they wanted to comment or make suggestions on the basedir spec? Did FDO look at either of the platforms' existing specifications and see if there were any ideas they could copy? Or did they just do a Linux-oid thing, disregarding norms and specifications that exist already on the other platforms they didn't invite to the party, and force some weird thing onto those platforms under the assumption that it was good because its open and cross platform.

                My complaints come from two things.

                1. On my Linux computers, I am inundated by bad applications that do not follow the conventions set out by XDG for basedir. The one good thing basedir lets me do is set my own goddamn directories that aren't dot-file trash, but I still can't depend on it being followed or respected. On this, we seem to agree. But I think the defaults from basedir are terrible and dot-files in general are terrible stupid things, hence the rant.

                2. On my Windows and Mac computers, there is no reason for XDG envvars to be set because they do not purport to follow XDG basedir specifications. Thus, even though I could set an envvar for XDG_CONFIG and so on, they are more often ignored by crappy developers. However, I am still highly annoyed by now having at least two places where all of this crap might be, because even if an app developer follows XDG, it is up to me to force them to follow the platforms conventions. All of the basedir directories already have better analogue on macOS, it's ~/Library. Why shouldn't it be on the developer to do a simple `if macOS then put config data in ~/Library/Application Support/APPNAME and caches into ~/Library/Caches/APP_NAME` as is expected and typical on the Mac? Especially since there are no easy ways to set envvars for GUI applications on the Mac, what, am I supposed to make my own shortcuts for everything to set 5 XDG_BLANK envvars to launch an app instead of double-clicking an app bundle?

            • rewgs 2 months ago

              Err, nope, it is 100% Cross Desktop Group: https://www.freedesktop.org/wiki/

              That said, you are correct that it has nothing to do with Windows (and I never said that it did).

              • wpm 2 months ago

                That is a backronym[1], it absolutely meant X Desktop Group and likely changed to "Cross Desktop Group" when they switched to Wayland. D-Bus, .desktop files, MPRIS are all listed as FDO specifications alongside the Desktop basedir spec and none of them are appropriate for macOS either.

                FDO applies to Linux and "Unix-Like" Operating Systems. macOS is not "UNIX-like", Apple still bothers to get it certified under UNIX 2003 so it is technically not a Unix-like. Again, just because it has a /usr folder and a /var folder and can run a bash shell out of the box doesn't mean all the same mostly just OK standards from Linux should be copy-pasted over.

                [1] https://lwn.net/2000/0427/a/freedesktop.html

        • froh 2 months ago

          freedesktop.org standardizes unix, and it has ways to map .local, .cache, .config to os specifics.

PunchyHamster 2 months ago

Using actual configuration management (in my case Puppet, tho Ansible is lighter choice) is just all around better way

First: you can template stuff easily. Like having config that have different parameters (say a display name to display stuff on) between devices.

Second: You can do "the everything else" of the machine setup, not just configs but also installed apps and various quirks and tweaks.

  • sgarland 2 months ago

    Generally I agree, though for lighter-weight stuff like personal config management, I’ve grown fond of chezmoi [0]. It has templating support, so I can do things like auto-detect if it’s a work machine or personal, and render the appropriate files where needed.

    I think it can also do rudimentary app management via storing a lockfile, but I haven’t tried that out.

    0: https://chezmoi.io/

clircle 2 months ago

I’m moving slowly in the direction of Guix home for dotfile management, but until it covers all my bases, I’m fond of the gnu stow method

nailer 2 months ago

Never understood the point of having a dotfile for all of config when config is the point of dotfiles.

  • tuckerman 2 months ago

    Besides cleanliness which is more a preference I agree, separating config, data, and cache makes it easy to know what can/should be backed up, what can be synced across machines, etc.

    • zenoprax 2 months ago

      I find that there is a tendency to make too many things hidden. I just assume I'll have to show hidden items by default in all contexts now.

      • wpm 2 months ago

        As I said in a different comment here, I have 94 files and folders in my home, 84 of which are hidden, approximately zero of which actually needed to be hidden.

        If anything, it's the reason this is such a common issue, the dot lets everyone shit files out all over the place but oh it's hidden so no big deal.

  • PunchyHamster 2 months ago

    If all apps abode to it it would be nice because you could just backup config and skip all the other stuff. <type>/app hierarchy is much better than <app>/type because that allows for example of easily excluding ~/.cache from backups.

    ... but of course some apps must be super special flowers that need their own dir

    • tuckerman 2 months ago

      Yeah, I find it especially annoying when apps do use the XDG directories but use them incorrectly (dumping a bunch of state/data in .config is unfortunately too common). If apps want to do that I wish they would just grab $HOME/.appname rather than mess up my .config dir.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection