Yet Another Stow-Based Dotfiles System Manager
This dotfiles
folder was bootstrapped, managed, and whipped into submission by YAS-BDSM.
YAS-BDSM is a minimal, UNIX-based, cross-platform, hierarchical dotfiles manager.
Our core principles and safewords are:
base
directory.
Then the dotfiles in either the linux
or macos
folder will be installed
too. (A tertiary hierarchy for Linux distros is planned for a future release.)yas-bdsm
executable is right next to your dotfiles.brew install stow
sudo apt-get install stow
sudo pacman -S stow
git clone https://github.com/sebastiancarlos/yas-bdsm
cd yas-bdsm
./yas-bdsm
make install
and then run yas-bdsm
.- yas-bdsm
- base/ (cross-platform dotfiles)
- linux/ (linux-only dotfiles)
- macos/ (macOS-only dotfiles)
- yas-bdsm (executable)
- Makefile
YAS-BDSM is a folder structure and a shell script on top of GNU Stow (a symlink manager). It works like this:
base
, linux
, and macos
folders as needed../yas-bdsm install
, which will detect your platform and create
symlinks in your home directory pointing to the dotfiles. This is done with
GNU Stow, which also creates folders as needed../yas-bdsm install
again to sync
the changes to your home folder.yas-bdsm
commandUsage: yas-bdsm [-h/--help] [install|restore-backup|eject]
-h/--help: Show this help message
install: Install or sync the dotfiles as symlinks in your home folder.
restore-backup: Restore the backup of your dotfiles created by install.
eject: Replace the symlinks in your home folder with hard copies.
When using YAS-BDSM, its dotfile folders are the source of truth. Your home directory contains only symlinks.
This implies the following:
Do it as usual: vim ~/.config/some-dotfile
. It will follow the symlink and edit the source file.
You will need to do it in the source folder, and then run yas-bdsm install
to sync the changes. The symlinks for the deleted file will be removed from your home folder.
You can do it. YAS-BDSM won't touch them. If you want, you can add them to YAS-BDSM later.
Yas. That way, it's easy to install your dotfiles in any new system with internet access.
We recommend a private repo. If you want to use a public repo, set up a
.gitignore
file to avoid exposing your sensitive bits.
base
and linux
?The dotfiles in linux
will override the dotfiles in base
with the same name.
The first time you run yas-bdsm install
, it will ask you to back up your current dotfiles that conflict with those to be installed. If you accept, a installation-backup
folder will be created in the yas-bdsm
folder, which can be restored to your home directory at any time by running yas-bdsm restore-backup
.
Patience, my corporate slave. That feature will be added soon. But, as this is a UNIX tool, it will only support WLS.
base
?Yas! We believe that overriding files by platform should be kept to a minimum, to ease maintainability.
Indeed, we suggest that Bash scripts within dotfiles perform platform detection by themselves at runtime and use conditional statements.
Dotfiles are lightweight, so there's no harm in installing extra dotfiles that the platform doesn't need if that eases maintainability. It is better to ask forgiveness than permission!
You can think of yas-bdsm eject
as your safeword. It will turn all your symlinked dotfiles in your home folder into full-fledged files. Then you are on your own.
Sure! For example, sudo yas-dbsm install
will install into the root user's home folder.
I don't particularly appreciate that it wraps around git. YAS-BDSM lets you handle version control as you please.
Because I'm not a gopher, I'm an old-school UNIX-head.
Honestly, chezmoi is a nice library but I wanted something minimal. Do you want to add templates, compilation, or encryption? Be my guest! You can put whatever you wish inside of YAS-BDSM as long as everyone is having a good time.
I used Stow to save a little bit of development time. Stow already comes with good verbose logging, fails with error message if conflicts are detected, and removes dead symlinks on update. Basically, it was convenient to build on top of something that I didn't have to debug. I might remove it at some point.
Yes. Just rename the "yas-bdsm" folder and everything will keep working fine - the script doesn't rely on a specific folder name.
Yes, but it's also my daily driver for dotfiles. Feel free to use it (or get used by it).