Drop #197 (2023-02-10): Weekend Project Edition
Dancing With Dotfiles
NOTE: if you already religiously use a dotfile management system, skip to the middle section.
In other news: there are still some charges left in this week’s Arc browser invite battery.
In Defense of Dotfiles
We've discussed dotfiles before. They're the pseudo-invisible configuration files that can help level up computing environments. For folks who tend to be “GUI-first”, sitting down (or standing, I guess, if you're a standing-desk aficionado) and carving out time to actually manage dotfiles can be an afterthought. It's easy to convince one's self that you're “just making (yet-another) quick edit” and will totally go back and ensure you've made a backup copy, plus re-create those edits on
n other systems they'd be helpful on.
Even folks who live and breathe on the command line may be in such haste these days that they too neglect to ensure their dotfiles are truly managed. Worse, still, are pseudo-managed dotfiles (i.e., you set up a dotfile management practice but fail to keep up to date with changes you make on each disparate system).
I've also found that deliberate focus on dotfiles, also helps identify new ways to use various CLI tools. Very often, the default options of any given tool aren't suitable for the way one might use them. Relying on shell aliases to account for that is fine, but it's not always possible to (easily) shove everything necessary into an alias. CLI makers know this, and many CLI tools support the use of configuration files. I say “files” (plural) since some really solid CLI tools will let you have directory-specific configuration files (e.g.,
.gitignore). By taking time to deliberately read through a CLI's detailed manual page or README (et al.) for what options are config-file-able, you will likely learn about some new, cool, useful feature you hadn't before.
If 👆🏽 has convinced you to start managing your dotfiles 😊, please head on down to the next section. If not 😔, def at least hit the “FIN” for one more resource Drop before going about the rest of your day.
Dotfile Management Resources
I am not going to say “use X to manage your dotfiles”, since the process you create to manage dotfiles is as personal a choice as what you put in said files.
If you're already in a dotfile management routine, the resources in this section may inspire you to tweak your setup to further perfection.
Sebastien Rousseau has dedicated a website to the entire topic of dotfiles. The guide is designed to work for folks who use either bash or zsh. It covers both app-specific config file management, and the concept of “aliases” management (which means you'll also get into the habit of relying on personalized CLI aliased commands for common app + options routines you have).
Tom Payne created the chezmoi utility and guide, which is now a vast community-maintained resource for top-notch dotfile management practices. The guide also has some specific security best practices. And, it covers how to use it with Watchman, a tool that watches files and records, or triggers actions, when they change (chezmoi + Watchman == no longer having to remember to manually sync your dotfile changes across systems). Not to put the thumb on the scale, or anything, but this is what I use.
Brandon Invergo has an old, but solid guide on how to use GNU Stow to manage your dotfiles. Stow is a “symlink farm manager” which takes distinct packages of software and data located in separate directories on the filesystem, and makes them appear to be installed in the same place.
If none of those catches your eye, then perhaps you can choose from one of the many “awesome” dotfile resources in the list that Lars Kappert maintains. Lars also has some personal advice on dotfile management (apologies to all for a Medium link). The “awesome” repo has enough resources to keep you occupied for as much time as you're willing to give it.
Windows purists (may the Great Maker forgive you for your bad life choices) also have some OS-specific options, though most of the better methodologies work even on that woefully flawed operating system.
Now that you're armed with some choices, head on down to section three.
If you've never adopted a dotfile management process, your mission is to adopt one! Make sure to back up all the things before diving into this. It is quite possible you may end up trying a few different methodologies before settling on one, and you really don't want to lose anything you rely on to get stuff done.
If you are already a dotfile management wizard, perhaps double check that you're syncing the way you think you are. Hitting up some of the linked resources may also inspire you to add or change your routine a bit.
Regardless of your present dotfile management status, take some time out to peruse the documentation for the CLI utilities you rely on and see if they support config files. For any that do, consider setting one up, even if it's blank. Just the fact that one is in place will be a helpful reminder that a given tool supports a config file. This seriously incomplete list can help get you started:
As you're milling about, cleaning up your shell, perhaps keep a copy of The Art Of The Command Line up in a browser tab and see if there are some things from it you can put to use. I have a somewhat prettier version of it that is re-generated weekly.
If you have some resource or configuration suggestions for maintaining dotfile sanity, please share them in the comments, so others can take a 👀. ☮
#dotfile #aria2 #bat #curl #git #ripgrep #screen #vim #vi #wget #rc #chezmoi #watchman #stop