Shameless plug: I am the author.

  • dinckel
    link
    1144 months ago

    Golang puts shit specifically in $HOME/go. Not even .go. Just plain go.

    Why is it so difficult to follow industry standards

        • @[email protected]
          link
          fedilink
          104 months ago

          It makes it insofar better to me that you have the option to change it. You can’t change Mozilla programs to use anything but .mozilla (apart from modifying the source code of course) so for me seeing the folder is at least a way of telling me that the variable is unset.

          The better question is which folder is suited the best to store the stuff that goes into $GOPATH

          • fmstrat
            link
            fedilink
            English
            74 months ago

            Just because something is worse, doesn’t make the other thing good. A sane and standard default, as others have mentioned, is a small bar to meet.

      • dinckel
        link
        204 months ago

        Of course, but that’s not the point. There should be a sane default, and there isn’t one

    • @[email protected]
      link
      fedilink
      English
      11
      edit-2
      4 months ago

      Go pisses me off with that. I separate projects the way I want but go wants every project written in go in one big directory?

      • dinckel
        link
        24 months ago

        I really didn’t like this either. It’s quite surprising, because the rest of Go tooling is quite nice. Not having a venv, or at least something like pnpm-style node_modules is weird

        • @[email protected]
          link
          fedilink
          14 months ago

          Why would go have a virtual environment or dep tree like node_modules equivalent, it’s not interpreted or dynamically linked.

          With modules, dependencies can be vendored.

          • dinckel
            link
            14 months ago

            Obviously it’s not, but you have to download all this shit somewhere before compilation. That’s the whole point

      • @mcepl
        link
        14 months ago

        This post literally links to the leading one.

    • Eager Eagle
      link
      English
      54 months ago

      off the shelf go was too annoying for me

      Nowadays I set GOENV_ROOT to an XDG location and use goenv instead.

      • @[email protected]
        link
        fedilink
        154 months ago

        What I want in $HOME are the following directories:

        If I’m on a GUI-based environment:

        • Desktop
        • Documents
        • Downloads

        In general:

        • .local
        • my_junk_folder_i_made

        I’d like everything else to live within something like ~/.local thanks

        • @[email protected]
          link
          fedilink
          8
          edit-2
          4 months ago

          Maybe Linux should have .local and .roaming folders like Windows. local = only useful on this system, roaming = good to sync across systems. Config would be in .roaming if it’s not machine-specific.

          • @[email protected]
            link
            fedilink
            English
            64 months ago

            The only practical difference between Local and Roaming and LocalLow is that developers randomly pick one and dump your game saves in there.

            • @[email protected]
              link
              fedilink
              6
              edit-2
              4 months ago

              There’s some stuff in~/.config that’s specific to the computer. KDE is a good example - a lot of KDE apps mix config and state in the same file. There’s some solutions for syncing these files, like https://github.com/VorpalBlade/chezmoi_modify_manager which is an addon to Chezmoi that can exclude particular keys when storing an INI-style config file in Git.

              I’m sure there’s some config files in there that are entirely specific to the computer. Things like the Wayland per-monitor scaling settings are in there somewhere I think.

              There’s also things like data files that you may want to keep in sync across machines. They’re not really configs.

          • @[email protected]
            link
            fedilink
            14 months ago

            There is a .local folder these days.

            Profile roaming hasn’t been solved aside from NFS mounts. I guess Syncthing might work.

            • @[email protected]
              link
              fedilink
              1
              edit-2
              4 months ago

              I know .local exists - My comment was more about .roaming which would be nice to exist, but doesn’t currently exist.

              Profile roaming hasn’t been solved aside from NFS mounts. I guess Syncthing might work.

              I’m using Chezmoi to sync some dotfiles, scripts, etc. to a Git repo and that seems to work well enough for me. I’m not syncing much yet, though.

    • PureTryOut
      link
      fedilink
      114 months ago

      Strange that some apps allow configuring it rather than just doing it automatically…

      • @[email protected]
        link
        fedilink
        14 months ago

        That’s the usual open source way. The config probably came later so they just added the option without changing the default because that would break backward compatibility.

        And there would be too much boring work to build a migration.

    • @sparr
      link
      English
      24 months ago

      Thanks, I hadn’t heard of that. Time to add a few hundred lines to my dotfiles :)

    • @[email protected]
      link
      fedilink
      English
      14 months ago

      After running it and properly configure the paths I once again came to the conclusion: I fucking hate Google.

  • @Wispy2891
    link
    37
    edit-2
    4 months ago

    100% agree and I also despise devs who do this on windows, instead of using %appdata% they’re using c:\users\username\.myappisimportantandtotallydeservesthisdir

    • @[email protected]
      link
      fedilink
      34 months ago

      Not to mention - this isn’t necessarily the correct place for Windows anyway. That is exactly why they standardized stuff around Vista.

      Plus - what about apps that store an ungodly amount data in there? Personally, I only keep the OS and basic app data (such as configs and cache) on the partition and nothing else.

      Then something like Minecraft comes along and it’s like “humpty dumpty I’m crapping a lumpty” and stores all its data in “.minecraft” right there in your user directory.

      Then you gotta symlink stuff around and it becomes a mess…

    • @[email protected]
      link
      fedilink
      34 months ago

      I think that also causes issues for roaming profiles and folder redirection. If roaming is turned on then everything in the %appdata%\roaming folder is synced to a server. %AppData%\Local is not. So if your app is using %AppData%\Roaming for temporary data then you are causing a whole bunch on unnecessary IO. Same for using Documents since that if often synced.

    • Tlaloc_Temporal
      link
      fedilink
      14 months ago

      To be fair here, appdata is technically a hidden folder and there are lots of reasons an app would want it’s data accessable by the user.

      • @Wispy2891
        link
        84 months ago

        Yes but then just spam the documents folder like anyone else, don’t hoard the home root for no reason except that is a lazy cross platform port

  • @[email protected]
    link
    fedilink
    264 months ago

    I didn’t know about this (and thankfully, haven’t written anything public). I’ve been trying to fix an install script for an OSS project that doesn’t work on immutable distros, and using the XDG Base Directory specs might just be the panacea I was looking for!

  • @[email protected]
    link
    fedilink
    21
    edit-2
    4 months ago

    Where did i read this… basically, the .file being hidden being a bug in the early unix filesystem, which got misused to hide configuration files.

    Offenders despite XDG-variables set and with no workaround:

    • .android: hardcoded in adb and i guess something in mtp too
    • .pki: some tool/library Firefox and Chromium sometimes use.
    • .steam: yes, that

    Btw, https://wiki.archlinux.org/title/XDG_Base_Directory

    • @[email protected]
      link
      fedilink
      44 months ago

      Whoa I’m a stickler for getting as much as I can out but even I have .zshenv and some other too hard to figure out things in there. How’d you manage a total wipeout?

      • @[email protected]
        link
        fedilink
        3
        edit-2
        4 months ago

        zsh is actually easy and it is detailed in the archwiki

        You have to set $ZDOTDIR in /etc/zsh/zshenv and iirc that was the only location that required root to edit.

        For the rest of stuff, here is how I fix steam for example and you can check the rest of my dotfiles for how I configured zsh and all of that.

        Although I haven’t updated them, I still had a .local directory back then, it was 1 week ago that I changed .local for Local and that let to an issue with distrobox which I made a PR fixing it that’s still open though.

        • @njordomir
          link
          14 months ago

          Lol, the minimalist window decoration had me thinking you were running a terminal inside of the home directory of your file manager. :D

          I’ve seen weirder things.

    • @tabular
      link
      English
      1
      edit-2
      4 months ago

      ls Volatile

      • @[email protected]
        link
        fedilink
        14 months ago

        It’s empty lol, it’s a directory on tmpfs that i use to build programs and similar stuff to not be hammering my ssd with unnecessary writes.

        I have $XDG_CACHE_HOME in tmp as well and I moved the mesa sharer caches to $XDG_STATE_HOME as that’s really the only thing so far I’ve needed to preserve.

        • @tabular
          link
          English
          1
          edit-2
          4 months ago

          tmpfs (…) to build programs (…) to not be hammering my ssd with unnecessary writes

          Sounds useful. How did you setup the directory?

          Running df tells me “tmpfs” is mounted on /run. If I build in that that directory then would it be stored in RAM, or do I need to do something else?

          • @[email protected]
            link
            fedilink
            34 months ago

            I have /tmp in my fstab with these mount options.

            tmpfs /tmp tmpfs rw,noatime,size=20G 0 0

            And the rest of the setup is done in my zprofile

            • @tabular
              link
              English
              2
              edit-2
              4 months ago

              I think I should be able to get this working following your zprofile file. Thanks!

  • @dohpaz42
    link
    English
    144 months ago

    Here is a more concise way to achieve the same thing:

    ls -ACd ~/.??*/ | sed -e "s#$HOME/##g"
    
    • palordrolap
      link
      fedilink
      5
      edit-2
      4 months ago

      I think that can be boiled down to only cd; echo .*/

      Maybe throw a ;cd - on the end if the change of directory is unwanted.

    • @[email protected]
      link
      fedilink
      24 months ago

      ls -A | grep "^\."

      I had to make a dummy .dotfile to test because I don’t have hidden files in my home.

  • Mactan
    link
    fedilink
    94 months ago

    there’s no place like 127.0.0.1

    there’s no place like XDG_CONFIG_HOME.

  • THCDenton
    link
    54 months ago

    YOU’RE NOT MY MOM I’LL DO WHAT I WANT

  • wvstolzing
    link
    fedilink
    44 months ago

    vim now has an option to put the .vim folder in ~/.config; though I’m not sure if the default plugin/package & syntax folders can be set under ~/.local/share.

    • @[email protected]
      link
      fedilink
      14 months ago

      You can also just use neovim instead, among other improvements, it’s configs are in the xdg dirs