-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Tuckr is a dotfile manager as well as a symlink farm. It aims to reduce the amount of work necessary to get up and running on a new machine. It takes inspiration from other existing dotfile managers such as chezmoi and yadm and borrows all of its ideas from GNU Stow's simplicity.
Since simplicity is at the core of GNU Stow and one of the goals of this project's goal, the tool tries as much as possible to avoid any sort of configuration file and instead is opinionated on how dotfile repos should be structured.
All dotfiles are stored inside a Configs
directory where each directory in it is related to a certain group or program. Tuckr uses this to group the dotfiles and examine the state of these groups in the host machine. It achieves this by going through the file system and checking where symlinks point to:
- if it points to the related dotfile in the repo it's deemed as
symlinked
- if it's not a symlinked it's deemed as
unsymlinked
- if it's a symlink but points to somewhere else it's put on
not_owned
to indicated it's in conflict
All these checks are done right after the program's execution starts. Once the entire repo's state is mapped to either of the following states: symlinked
, not_symlinked
or not_owned
. The actual command execution starts.
Some commands work only on dotfiles with certain statuses, such as:
- add: works on
not_symlinked
andnot_owned
if conflicts are being resolved - rm: works on
symlinked
only
Hooks are just a basic finite state machine that decides when to symlink dotfiles along with running some scripts. It runs in 3 phases: Prehook -> Symlink -> Posthook
Both the prehook and posthook phases are script running phases, you can run anything in those phases as long as you have a script prefixed with either post_
or pre_
. This is useful when you have to run a setup, then symlink the program and then run some sort of final configuration on said program.