|
| 1 | +# Dotfile management |
| 2 | + |
| 3 | +::: info |
| 4 | +This tool is distro agnostic, you can take `ins` and the way it manages dotfiles |
| 5 | +anywhere you like. It even works on Android and Steam Deck! |
| 6 | +::: |
| 7 | + |
| 8 | +## Quick start |
| 9 | + |
| 10 | +To get started you need a git repository with dotfiles in it. |
| 11 | + |
| 12 | +You can clone an existing repo with |
| 13 | + |
| 14 | +``` |
| 15 | +ins dot clone <repo url> |
| 16 | +``` |
| 17 | + |
| 18 | +Or create a new on with |
| 19 | + |
| 20 | +``` |
| 21 | +ins dot init |
| 22 | +``` |
| 23 | + |
| 24 | +You can now add dotfiles to that repo with |
| 25 | +``` |
| 26 | +ins dot add <file> |
| 27 | +``` |
| 28 | +This will copy them to the repository. By default, dotfile repositories are |
| 29 | +located in `~/.local/share/instant/dots/<repo name>`. You can commit, push and |
| 30 | +pull like with normal git repositories because that is hat they are. |
| 31 | + |
| 32 | +Once you push new updates to your dotfiles, |
| 33 | +``` |
| 34 | +ins dot update |
| 35 | +``` |
| 36 | +will pull them and install them to your home directory. |
| 37 | + |
| 38 | +`ins dot` will detect dotfiles modified by the user and ignore them during |
| 39 | +updates, while continuing to update untouched dotfiles. |
| 40 | + |
| 41 | +``` |
| 42 | +ins dot status |
| 43 | +``` |
| 44 | + |
| 45 | +Shows the status of current dotfiles, that being mainly which are installed, and |
| 46 | +which ones are modified by the user. |
| 47 | + |
| 48 | +A modified dotfile can be reverted to the version in the repository with |
| 49 | + |
| 50 | +``` |
| 51 | +ins dot reset <file> |
| 52 | +``` |
| 53 | + |
| 54 | +After resetting a dotfile, it will get updates again. Tracking user |
| 55 | +modifications works even when skipping or rolling back updates. Updates will |
| 56 | +only stop if the file is in a state which has never been in the repository, in |
| 57 | +which case it is assumed to contain user modifications which should be |
| 58 | +preserved. |
| 59 | + |
| 60 | + |
| 61 | +## Multiple repos |
| 62 | + |
| 63 | +You can combine dotfiles from multiple repositories. If all repositories |
| 64 | +configure different applications then this is trivial, if two of them contain |
| 65 | +dotfiles for the same application, dotfiles from the repository with the higher |
| 66 | +priority in `~/.config/instant/dots.toml` will be used. This can be used to |
| 67 | +install both third party base dotfiles as well as keeping your personal |
| 68 | +configuration tracked and synchronized between machines. |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +## Philosophy |
| 74 | + |
| 75 | +### Do not reinvent the wheel |
| 76 | + |
| 77 | +All dotfiles are kept in a Git repository. If you think there is something |
| 78 | +better then you're either wrong or have decades of time to devote to it. |
| 79 | + |
| 80 | +### Get out of the user's way without breaking |
| 81 | + |
| 82 | +The user does not even have to know the dotfiles are managed. Nothing they do |
| 83 | +will ever get overwritten without them requesting it. To the best of its |
| 84 | +ability, the program will keep working on what it can without risk of doing |
| 85 | +anything the user does not want. |
| 86 | + |
| 87 | +## Comparison with others |
| 88 | + |
| 89 | +### GNU Stow |
| 90 | + |
| 91 | +This symlinks |
| 92 | + |
| 93 | +### yadm |
| 94 | + |
| 95 | +This is a great tool which I use myself. Its genius lies in how it basically |
| 96 | +doesn't do anything. It just turns your home directory into a git repository. |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
0 commit comments