████████ ██ ██ ███████ ██████ ███ ███ ██████ ███████
██ ██ ██ ██ ██ ██ ████ ████ ██ ██ ██
██ ███████ █████ ██████ ██ ████ ██ ██ ██ ███████
██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██████ ███████
██▄▄▄▄▄▄██
████▄▄▄▄▄▄▄▄████ █▀▄ █▀█ ▀█▀ █▀▀ ▀█▀ █ █▀▀
██ ██ █ █ █ █ █ █▀▀ █ █ █▀▀
██ █ ▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ ▀▀▀
██ █ ░
██ █ ░░░░ █▄█ █▀█ █▀█ █▀█ █▀▀ █▀▀ █▀▄
██ █ ░░░░░░ ░ █ █ █▀█ █ █ █▀█ █ █ █▀▀ █▀▄
██ █ ░░ ░░░ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ ▀ ▀
██ █ ░░░
██ █ ░░
██ █
██ █ ▄▄▄ ▄▄▄
██ █ █ ▀▀▀▀▀▀▀▀ █
██ █ █ █
██ █ █ █
██ █ ████████
██████████████████
tdm is a dotfile manager focused on ergonomics and flexibility.
- Download the
uvpackage manager. - Run
make build- Symlink the binary located in
bin/so it is in the path.
tdm uses a git repository to version your dotfiles. These dotfiles are deployed across your system via symlinks. When deploying a symlink, tdm backs up the original version of the file. When tdm vacates, it restores these locations to their previous state. tdm allows for different profiles, these enable you to maintain different versions of your dotfiles and also to deploy them differently.
First, create your dotfile repository with the command.
tdm init PATHIf you already have the git remote for your repo ready (by for example creating an empty GitHub/GitLab repository) run instead:
tdm init -g PATH You will be prompted to add the remote.
Inside this newly created directory you will see these four items.
dotfiles_repo/
├── bin
├── config.toml
├── files
└── forks
To summarize:
bin: For your scripts. When you want to run bootstrap scripts, tdm looks here to find the executable you specified.config.toml: Your configuration file.files: This is where the majority of your dotfiles are located. tdm uses the relative path fromfiles/to find where the symlink should be created.(files/relative_pathcreates a symlink$HOME/relative_path->files/relative_path)forks: For holding different versions of a dotfile. When you create a fork, the forked version will be held inside here.
To start using your new dotfiles repo run:
tdm deploy PATHWhere PATH is the location of your repository.
To add dotfiles to tdm run:
tdm add PATHHere, PATH can be a file or a directory. If it is a directory, tdm remembers this and if a new file appears here it will automatically add it, (if the directory is not symlinked itself of course) when running tdm patch.
You can specify your profiles in the config.toml. If you want to switch between them use:
tdm use PROFILEThe base profile is a default profile that you can't remove. It is the default profile that you use.
When you are not using the base profile, you can create forks of the dotfiles you added.
Fork creates a new file inside forks/PROFILE/relative_path and the target of the symlink will instead point here.
The last command I will introduce you to is tdm git. This command runs the git commands and options specified but inside the currently used repository. So, to quickly commit changes to your dotfiles you can run: tdm git add ./, tdm git commit -m "Tweaking my dotfiles." and lastly tdm git push.