diff options
| author | diogo464 <[email protected]> | 2021-07-09 04:54:44 -0400 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2021-07-09 04:54:44 -0400 |
| commit | 56c87da0183590a39a938a171c5cb80a3e702edd (patch) | |
| tree | 1128bd97c43518a424bc0c68e5b2efee1f84fefc /README.md | |
| parent | f13a60805df476649e908842f78785ccf47834ed (diff) | |
Added README.md
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..d1b51bc --- /dev/null +++ b/README.md | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | # dotup | ||
| 2 | A CLI tool to help symlink your dotfiles into place. | ||
| 3 | |||
| 4 | ## Usage | ||
| 5 | Example file hierarchy with dotfiles. | ||
| 6 | ``` | ||
| 7 | configs | ||
| 8 | nvim/ | ||
| 9 | init.vim | ||
| 10 | lua/ | ||
| 11 | setup.lua | ||
| 12 | alacritty/ | ||
| 13 | alacritty.yml | ||
| 14 | bash/ | ||
| 15 | .bashrc | ||
| 16 | scripts/ | ||
| 17 | script1.sh | ||
| 18 | script2.sh | ||
| 19 | script3.sh | ||
| 20 | ``` | ||
| 21 | |||
| 22 | ### dotup init | ||
| 23 | Running `dotup init` will create an empty depot file in the current directory(by default). | ||
| 24 | ``` | ||
| 25 | $ dotup init | ||
| 26 | ``` | ||
| 27 | A new file, `depot.toml`, should have been created in the current directory. | ||
| 28 | |||
| 29 | ### dotup link | ||
| 30 | The `link` subcommand can be used to tell where a file should be linked when installed. | ||
| 31 | Running `dotup link nvim .config/nvim` will create two new links: | ||
| 32 | + `nvim/init.vim` -> `.config/nvim/init.vim` | ||
| 33 | + `nvim/lua/setup.lua` -> `.config/nvim/lua/setup.lua` | ||
| 34 | This subcommand will, by default, only link files. If a directory is passed as argument then it will recursively link all files under that directory. | ||
| 35 | |||
| 36 | To link a directory use the flag `--directory`. | ||
| 37 | ``` | ||
| 38 | $ dotup link --directory scripts .scripts | ||
| 39 | ``` | ||
| 40 | This will create a new link | ||
| 41 | + `scripts` -> `.scripts` | ||
| 42 | |||
| 43 | ### dotup unlink | ||
| 44 | The `unlink` subcommand unlinks files. | ||
| 45 | ``` | ||
| 46 | $ dotup unlink nvim/lua/setup.lua | ||
| 47 | ``` | ||
| 48 | will remove the link `nvim/lua/setup.lua` -> `.config/nvim/lua/setup.lua`. | ||
| 49 | |||
| 50 | ### dotup install | ||
| 51 | The `install` subcommand creates symlinks. | ||
| 52 | Like the `link` subcommand passing a directory as argument will recursively install anything under it, files and directories. | ||
| 53 | |||
| 54 | By default install will use the home directory as the install-base but this can be changed with the `--install-base <path>` parameter. | ||
| 55 | ``` | ||
| 56 | $ dotup install nvim | ||
| 57 | ``` | ||
| 58 | will create two symlinks | ||
| 59 | + `nvim/init.vim` -> `$HOME/.config/nvim/init.vim` | ||
| 60 | + `nvim/lua/setup.lua` -> `$HOME/.config/nvim/lua/setup.lua` | ||
| 61 | |||
| 62 | ``` | ||
| 63 | $ dotup install scripts | ||
| 64 | ``` | ||
| 65 | will create one symlink | ||
| 66 | + `scripts` -> `$HOME/.scripts` | ||
| 67 | Any new scripts added to `$HOME/.scripts` will be created at `configs/scripts`. | ||
| 68 | |||
| 69 | ### dotup uninstall | ||
| 70 | The `uninstall` subcommand removes the symlinks. | ||
| 71 | This will only remove symlinks if they were pointing to the correct file. | ||
| 72 | |||
