this post was submitted on 17 Jul 2024
37 points (100.0% liked)

Linux

47969 readers
1016 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Once again I try to get a handle of my various dotfiles and configs. This time I take another stab at gnu stow as it is often recommended. I do not understand it.

Here's how I understand it: I'm supposed to manually move all my files into a new directory where the original are. So for ~ I make like this:

~
  - dotfiles
      - bash
         dot-bashrc
         dot-bash_profile
      - xdg
            - dot-config
                user-dirs.dirs
      - tealdeer
            - dot-config
                - tealdeer
                       config.toml

then cd ~/dotfiles && stow --dotfiles .

Then (if I very carefully created each directory tree) it will symlink those files back to where they came from like this:

~
  .bashrc
  .bash_profile
   - .config
        user-dirs.dirs
      - tealdeer
          config.toml

I don't really understand what this application is doing because setting up the dotfiles directory is a lot more work than making symlinks afterwards. Every instructions tells me to make up this directory structure by hand but that seems to tedious with so many configs; isn't there some kind of automation to it?

Once the symlinks are created then what?

  • Tutorials don't really mention it but the actual manual gives me the impression this is a packager manager in some way and that's confusing. Lots of stuff about compiling

  • I see about how to combine it with git. Tried git-oriented dotfile systems before and they just aren't practical for me. And again I don't see what stow contributing; git would be doing all the work there.

  • Is there anything here about sharing configs between non-identical devices? Not everything can be copy/pasted exactly. Are you supposed to be making git branches or something?

The manual is not gentle enough to learn from scratch. OTOH there are very very short tutorials which offer little information.

I feel that I'm really missing the magic that's obvious to everyone else.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 3 months ago (2 children)

There are other dotfile managers out there, personally I use yadm. It’s just a shell wrapper around a bare git repository, no symlinks or other magic needed

[–] [email protected] 3 points 3 months ago (1 children)

yadm is the one I liked the best and tried it a few times. fact is that I am unlikely to keep a repo like this even part way up to date. New files are created all the time and not added, old ones don't get updated or removed. There's not even a good way to notice in any file manager what is included and what's not as far as I know. yadm doesn't work with tools like eza which can display the git status of files in repos. (and it probably wouldn't be feasible.)

Plus I have some specific config collections already in change tracking and it makes more sense to keep it that way. Having so many unrelated files together in one project is too chaotic and distracting.

It's not realistic for me to manage merges, modules, cherry picking, branches all that for so many files that change constantly without direct intervention. Quickly enough git will tie itself into some knot and I won't be able to pick it apart.

[–] [email protected] 1 points 3 months ago

Sounds like your use case is significantly more complicated than mine, I usually just commit, push, and pull.

Yadm does have the “enter” command which lets other tools work. I have an alias I use all the time:

alias lazyadm="yadm enter lazygit --work-tree ~/"