LibreTechni.ca
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
0x4E4F@lemmy.dbzer0.com to linuxmemes@lemmy.world · 1 年前

Please use .config 😭

lemmy.dbzer0.com

message-square
65
fedilink
703

Please use .config 😭

lemmy.dbzer0.com

0x4E4F@lemmy.dbzer0.com to linuxmemes@lemmy.world · 1 年前
message-square
65
fedilink
alert-triangle
You must log in or register to comment.
  • Ahrotahntee@lemmy.ca
    link
    fedilink
    arrow-up
    247
    ·
    1 年前

    Attention electron developers: under no circumstances do I want your entire app in .config.

    • mke@programming.dev
      link
      fedilink
      arrow-up
      134
      ·
      1 年前

      You feel the curling of the monkey’s paw; the entire app is now in ~/.local/AppName

      • dx1@lemmy.world
        link
        fedilink
        arrow-up
        28
        ·
        edit-2
        1 年前

        Even better, ~/.local/share/

      • lengau@midwest.social
        link
        fedilink
        arrow-up
        4
        ·
        1 年前

        I mean… At least that’s more correct… If the monkey’s paw is giving us things that are better but not ideal i’m gonna use the fuck out of it.

    • Artyom@lemm.ee
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      1 年前

      As an alternative, how about my entire cache in .config?

      Looking at you VSCode, with 3 unique cache folders.

  • dan@upvote.au
    link
    fedilink
    arrow-up
    136
    ·
    edit-2
    1 年前

    but please don’t hard-code ~/.config or $HOME/.config. Use the XDG_CONFIG_HOME environment variable, with $HOME/.config as a fallback if it’s not set.

    Many programming languages have a cross-platform implementation of this built in to their standard library. C# has Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) which uses XDG_CONFIG_HOME on Linux, local AppData on Windows, and whatever is the correct thing on MacOS (not very familiar with how things work on MacOS)

    • dblsaiko@discuss.tchncs.de
      link
      fedilink
      arrow-up
      11
      ·
      1 年前

      On macOS, the correct thing to use is usually NSUserDefaults API, or - [NSFileManager URLsForDirectory:inDomains:] with NSApplicationSupportDirectory (gives a list of paths to find your config file in, like XDG_CONFIG_DIRS)

      • dan@upvote.au
        link
        fedilink
        arrow-up
        5
        ·
        1 年前

        Thanks for the info. It looks like that’s what .NET / C# uses: https://github.com/dotnet/runtime/blob/2b60d82ef3e87876128b7f71922a1b72908b6fcf/src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs#L103

    • houseofleft@slrpnk.net
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 年前

      Never new about this! That’s very handy

    • lengau@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      1 年前

      In Python the equivalent library is platformdirs

  • Nicht BurningTurtle@feddit.org
    link
    fedilink
    arrow-up
    82
    ·
    1 年前

    It’s still a lot better that creating random .folders per application in your home.

    • LainTrain@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      40
      ·
      edit-2
      1 年前

      Nah just put it in ~/.thing-config.d/01-0x45- 110100100-main.options-extra2cache.swp along with three godzillion other files like it’s normal and very sane for users who edit such files to have the big picture of the default configuration dreamed up by some utterly deranged lunatic be spread across enough files to represent all known stars in the galaxy, standards are for losers amirite /s

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      18
      ·
      1 年前

      1000042326

      • death_to_carrots@feddit.org
        link
        fedilink
        arrow-up
        69
        ·
        1 年前

        The font in the screenshot makes me angry.

        • Lucy :3@feddit.org
          link
          fedilink
          arrow-up
          11
          ·
          1 年前

          Idk what happened there either. After updating from Android 12 to 13, this is how it was ever since. And now I’m used to it.

          • irelephant [he/him]🍭@lemm.ee
            link
            fedilink
            arrow-up
            4
            ·
            1 年前

            Konsole once did that to me, and started inserting random tabs.

        • Kusimulkku@lemm.ee
          link
          fedilink
          arrow-up
          4
          ·
          1 年前

          I like it. Makes me think of teletext

          • Hupf@feddit.org
            link
            fedilink
            arrow-up
            3
            ·
            1 年前

            https://youtu.be/j0m4rcx0of4?t=55s

            • groknull@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              1 年前

              Haha thank you!

      • Poplar?@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        1 年前

        KeePass user 🫡

        • Lucy :3@feddit.org
          link
          fedilink
          arrow-up
          2
          ·
          1 年前

          Of course. Everything else is hosted on other’s servers, and here I have the choice between dozens of storages, mainly selfhosted ones. The only exception being KeePassXC - but that’s what rclone/rsync are for. So the DB resides on a WebDAV share on my Nextcloud now.

          • DefederateLemmyMl@feddit.nl
            link
            fedilink
            arrow-up
            5
            ·
            1 年前

            Everything else is hosted on other’s servers

            You can self-host bitwarden with vaultwarden.

      • The_Terrible_Humbaba@slrpnk.net
        link
        fedilink
        arrow-up
        4
        ·
        1 年前

        Hey! Would you mind guiding me as to what is going on in this picture? Is this an APP that allowed to SSH into your server? You got my attention with this picture, and I’m curious to hear more.

        • Lucy :3@feddit.org
          link
          fedilink
          arrow-up
          8
          ·
          1 年前

          It’s Termux, basically a fully fletched terminal for Android. So you can install various tools via apt, and use them, for example yt-dlp, ffmpeg, gcc, python etc. And yes, you can also use SSH, both as server and client. I use it very often to connect to my servers on the go.

          You can even use chroot to basically run a distro of your choice.

          • The_Terrible_Humbaba@slrpnk.net
            link
            fedilink
            arrow-up
            5
            ·
            1 年前

            Damn, that sound pretty cool, thanks for the info!

            • Magnetic_dud@discuss.tchncs.de
              link
              fedilink
              arrow-up
              3
              ·
              1 年前

              It’s also incredibly useful to backup /sdcard via rsync or Borg every night automatically

              Or access the contents of your phone via SFTP

              • tritonium@midwest.social
                link
                fedilink
                arrow-up
                2
                ·
                edit-2
                1 年前

                I like using syncthing. It syncs all my apps that are backed up with neobackup, my pictures, files etc. to my NAS. Then my NAS runs borg on that directory as well as all the other important NAS directories to make the legit backups.

                I have termux installed but I honestly rarely use it. Hate typing on the phone in the terminal… if I need to do it then I’ll just adb connect from my computer and do it from there on a real keyboard.

                • Magnetic_dud@discuss.tchncs.de
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 年前

                  I also did the same as you but because they discontinued the official syncthing app on Android I skipped the "sync to PC first step. Now I directly go to Borg from phone night time only when charging, the automate app is able to invoke termux and run the backup script

                  Many times it happened the syncthing app crashed in background and I didn’t notice before after several days, now if the Borg repository server (borgwarehouse, it’s a must have) doesn’t see activity after some user specified time sends me a warning email

      • dx1@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 年前

        deleted by creator

        • Lucy :3@feddit.org
          link
          fedilink
          arrow-up
          2
          ·
          1 年前

          Oof

  • Natanox@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    80
    ·
    1 年前

    XDG? OpenDesktop? Dunno what that is, time to dump everything into ~/.myawesomeapp

    • ikidd@lemmy.world
      link
      fedilink
      English
      arrow-up
      62
      ·
      1 年前

      Oh, no. Don’t even make it a hidden folder, it needs to be right there, front and center. And make sure you use a bunch of capital letters in the name, because you’re so fucking important.

      • irelephant [he/him]🍭@lemm.ee
        link
        fedilink
        arrow-up
        26
        ·
        1 年前

        Android Studio

        • ikidd@lemmy.world
          link
          fedilink
          English
          arrow-up
          9
          ·
          1 年前

          And Arduino.

        • Fisch@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 年前

          At least it gives you the option to change it

    • luciferofastora@lemmy.zip
      link
      fedilink
      arrow-up
      22
      ·
      1 年前

      Just dump it in ~

  • Jeena@piefed.jeena.net
    link
    fedilink
    English
    arrow-up
    38
    ·
    1 年前

    It really depends for what. I don’t think nginx config should be in $HOME/.conf/

    • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      74
      ·
      1 年前

      Right? It goes into ~/Documents/

      SMH my head

      • UndulyUnruly@lemmy.world
        link
        fedilink
        arrow-up
        51
        ·
        1 年前

        Everything into ~/Downloads/ until the partition is full.

        • ikidd@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 年前

          First thing I do on a new install is purge the home folder of every default folder, and symlink Downloads to another partition.

          Whoever standardized that shit in there like Templates needs to be shot with a ball of their own feces.

          • SavvyWolf@pawb.social
            link
            fedilink
            English
            arrow-up
            10
            ·
            1 年前

            https://wiki.archlinux.org/title/XDG_user_directories

            You can actually change those locations rather than using symlinks. I have them as subfolders in ~/xdg/ on my system.

    • Max-P@lemmy.max-p.me
      link
      fedilink
      arrow-up
      26
      ·
      edit-2
      1 年前

      Unless it’s running as your own user as part of your session. /etc for system-wide and ~/.config for your own user makes a lot of sense.

      • PoolloverNathan@programming.dev
        link
        fedilink
        arrow-up
        6
        ·
        1 年前

        They want ~/etc/ in their home, which just seems like a renamed ~/.config/.

  • Andromxda 🇺🇦🇵🇸🇹🇼@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    36
    ·
    edit-2
    1 年前

    Please use $XDG_CONFIG_HOME (and other XDG base dirs)

  • kautau@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    1 年前

    I’ve been forcing myself to learn to use NixOS with home-manager just to avoid this. Not to worry, it’s just my home.nix that’s a dumpster fire now

    • rumba@lemmy.zip
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 年前

      I’ve been using Nix for a little more than a year, I don’t think I’ve touched my configs in better than 6 months. I’m honestly not entirely certain what would constitute a dumpster fire in a Nix config

      I’ve probably only modified 50 or 60 lines of the default configs.

      I do have a folder full of shell.nix files when I need to do a special workflow, like I have one that kicks up wine and sets up mp3tag, another that sets up rust, another sets up Python, and one that sets up for yt-dlp. But I don’t carry anything in my base configs that I don’t use in a given week

      • silasmariner@programming.dev
        link
        fedilink
        arrow-up
        4
        ·
        1 年前

        I set up a nix os for a friend once. Forgot the master password. It’s been 5 years. Oh well.

  • Hobbes_Dent@lemmy.world
    link
    fedilink
    arrow-up
    20
    ·
    1 年前

    Just give me ~/etc/

    • Kusimulkku@lemm.ee
      link
      fedilink
      arrow-up
      6
      ·
      1 年前

      Isn’t that just .config?

  • Xylight@lemm.ee
    link
    fedilink
    arrow-up
    19
    ·
    1 年前

    Use xdg-ninja to help clear out unwanted files not in your home folder, and give tips to move them into a normal folder like .config

  • voodooattack@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    1 年前

    laughs in home-manager

  • DeaDvey@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    1 年前

    I keep my home directory nice and tidy in terms of visible files/folders, but as soon as you ls -a there’s so much random shit

  • horse_battery_staple@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    1 年前

    I’m in this picture and I don’t like it

    • collapse_already@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 年前

      I think this picture would be an upgrade from my current situation. It is perfectly normal to have to use sudo find from root to locate anything, isn’t it? It’s especially fun when you don’t remember what the thing you are looking for is called and are trying to guess the name to find.

      • horse_battery_staple@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 年前

        You’re using sudo when logged in as root?

        • tritonium@midwest.social
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 年前

          sudo find from /

          • horse_battery_staple@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 年前

            Oh jeez. I see now.

  • daggermoon@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 年前

    I just throw lots of dumb shit in my home directory. I actually have the Windows Entertainment Pack for Windows 3.1 in a folder in there. Runs great in WINE. Home directory is great for storing random files.

  • HStone32@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 年前

    Is that the Stanley cup in the first image?

  • LainTrain@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    2
    ·
    1 年前

    deleted by creator

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don’t come looking for advice, this is not the right community.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.4K users / day
  • 5.08K users / week
  • 9.05K users / month
  • 17.1K users / 6 months
  • 2 local subscribers
  • 30.7K subscribers
  • 1.88K Posts
  • 75.5K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org