mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 23:04:15 +00:00
refactoring README
This commit is contained in:
60
README.md
60
README.md
@@ -31,7 +31,7 @@ Features:
|
|||||||
Check the [blog post](https://deadc0de.re/articles/dotfiles.html) for more.
|
Check the [blog post](https://deadc0de.re/articles/dotfiles.html) for more.
|
||||||
|
|
||||||
Quick start:
|
Quick start:
|
||||||
```
|
```bash
|
||||||
mkdir dotfiles && cd dotfiles
|
mkdir dotfiles && cd dotfiles
|
||||||
git init
|
git init
|
||||||
git submodule add https://github.com/deadc0de6/dotdrop.git
|
git submodule add https://github.com/deadc0de6/dotdrop.git
|
||||||
@@ -53,7 +53,7 @@ git submodule add https://github.com/deadc0de6/dotdrop.git
|
|||||||
* [List configured dotfiles](#list-configured-dotfiles)
|
* [List configured dotfiles](#list-configured-dotfiles)
|
||||||
* [Execute an action when deploying a dotfile](#execute-an-action-when-deploying-a-dotfile)
|
* [Execute an action when deploying a dotfile](#execute-an-action-when-deploying-a-dotfile)
|
||||||
* [All dotfiles for a profile](#all-dotfiles-for-a-profile)
|
* [All dotfiles for a profile](#all-dotfiles-for-a-profile)
|
||||||
* [Include all dotfiles from another profile](#include-all-dotfiles-from-another-profile)
|
* [Include dotfiles from another profile](#include-dotfiles-from-another-profile)
|
||||||
* [Update dotbot](#update-dotbot)
|
* [Update dotbot](#update-dotbot)
|
||||||
|
|
||||||
* [Template](#template)
|
* [Template](#template)
|
||||||
@@ -72,8 +72,8 @@ why dotdrop rocks.
|
|||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
The following will create a repository for your dotfiles and
|
The following will create a repository for your dotfiles and
|
||||||
keep dotdrop as a submodules
|
keep dotdrop as a submodules:
|
||||||
```
|
```bash
|
||||||
mkdir dotfiles; cd dotfiles
|
mkdir dotfiles; cd dotfiles
|
||||||
git init
|
git init
|
||||||
git submodule add https://github.com/deadc0de6/dotdrop.git
|
git submodule add https://github.com/deadc0de6/dotdrop.git
|
||||||
@@ -81,7 +81,7 @@ git submodule add https://github.com/deadc0de6/dotdrop.git
|
|||||||
```
|
```
|
||||||
|
|
||||||
Then install the requirements:
|
Then install the requirements:
|
||||||
```
|
```bash
|
||||||
sudo pip3 install -r dotdrop/requirements.txt
|
sudo pip3 install -r dotdrop/requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -96,8 +96,8 @@ If starting fresh, the import function of dotdrop
|
|||||||
allows to easily and quickly get a running setup.
|
allows to easily and quickly get a running setup.
|
||||||
|
|
||||||
Install dotdrop on one of your host and then import any dotfiles you want dotdrop to
|
Install dotdrop on one of your host and then import any dotfiles you want dotdrop to
|
||||||
manage (be it a file or a folder)
|
manage (be it a file or a folder):
|
||||||
```
|
```bash
|
||||||
$ ./dotdrop.sh import ~/.vimrc ~/.xinitrc
|
$ ./dotdrop.sh import ~/.vimrc ~/.xinitrc
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -110,8 +110,8 @@ Commit and push your changes.
|
|||||||
|
|
||||||
Then go to another host where your dotfiles need to be managed as well,
|
Then go to another host where your dotfiles need to be managed as well,
|
||||||
clone the previously setup git tree
|
clone the previously setup git tree
|
||||||
and compare local dotfiles with the ones stored by dotdrop
|
and compare local dotfiles with the ones stored by dotdrop:
|
||||||
```
|
```bash
|
||||||
$ ./dotdrop.sh list
|
$ ./dotdrop.sh list
|
||||||
$ ./dotdrop.sh compare --profile=<other-host-profile>
|
$ ./dotdrop.sh compare --profile=<other-host-profile>
|
||||||
```
|
```
|
||||||
@@ -120,7 +120,7 @@ Then adapt any dotfile using the [template](#template) feature
|
|||||||
and set a new profile for the current host by simply adding lines in
|
and set a new profile for the current host by simply adding lines in
|
||||||
the config files, for example:
|
the config files, for example:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
...
|
...
|
||||||
profiles:
|
profiles:
|
||||||
host1:
|
host1:
|
||||||
@@ -135,7 +135,7 @@ profiles:
|
|||||||
|
|
||||||
When done, you can install your dotfiles using
|
When done, you can install your dotfiles using
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ ./dotdrop.sh install
|
$ ./dotdrop.sh install
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ the following entries:
|
|||||||
## Installing dotfiles
|
## Installing dotfiles
|
||||||
|
|
||||||
Simply run
|
Simply run
|
||||||
```
|
```bash
|
||||||
./dotdrop.sh install
|
./dotdrop.sh install
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ the host's hostname.
|
|||||||
## Diffing your local dotfiles with dotdrop
|
## Diffing your local dotfiles with dotdrop
|
||||||
|
|
||||||
Compare local dotfiles with dotdrop's defined ones:
|
Compare local dotfiles with dotdrop's defined ones:
|
||||||
```
|
```bash
|
||||||
./dotdrop.sh compare
|
./dotdrop.sh compare
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -249,14 +249,14 @@ filesystem. It will copy the dotfile and update the
|
|||||||
config file automatically.
|
config file automatically.
|
||||||
|
|
||||||
For example to import *$HOME/.xinitrc*
|
For example to import *$HOME/.xinitrc*
|
||||||
```
|
```bash
|
||||||
$ ./dotdrop.sh import $HOME/.xinitrc
|
$ ./dotdrop.sh import $HOME/.xinitrc
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## List the available profiles
|
## List the available profiles
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ ./dotdrop.sh list
|
$ ./dotdrop.sh list
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ else than the default (the hostname).
|
|||||||
The following command lists the different dotfiles
|
The following command lists the different dotfiles
|
||||||
configured for a specific profile:
|
configured for a specific profile:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ ./dotdrop.sh listfiles --profile=<some-profile>
|
$ ./dotdrop.sh listfiles --profile=<some-profile>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ to manage vim's plugins, the following action could
|
|||||||
be set to update and install the plugins when `vimrc` is
|
be set to update and install the plugins when `vimrc` is
|
||||||
deployed:
|
deployed:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
actions:
|
actions:
|
||||||
vundle: vim +VundleClean! +VundleInstall +VundleInstall! +qall
|
vundle: vim +VundleClean! +VundleInstall +VundleInstall! +qall
|
||||||
config:
|
config:
|
||||||
@@ -322,8 +322,8 @@ installed as a submodule within your git tree.
|
|||||||
You can thus simply run the following command
|
You can thus simply run the following command
|
||||||
to update the submodule:
|
to update the submodule:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git submodule update --recursive --remote
|
$ git submodule update --recursive --remote
|
||||||
```
|
```
|
||||||
|
|
||||||
## All dotfiles for a profile
|
## All dotfiles for a profile
|
||||||
@@ -332,7 +332,7 @@ To use all defined dotfiles for a profile, simply use
|
|||||||
the keyword `ALL`.
|
the keyword `ALL`.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
```
|
```yaml
|
||||||
dotfiles:
|
dotfiles:
|
||||||
f_xinitrc:
|
f_xinitrc:
|
||||||
dst: ~/.xinitrc
|
dst: ~/.xinitrc
|
||||||
@@ -349,13 +349,13 @@ profiles:
|
|||||||
- f_vimrc
|
- f_vimrc
|
||||||
```
|
```
|
||||||
|
|
||||||
## Include all dotfiles from another profile
|
## Include dotfiles from another profile
|
||||||
|
|
||||||
If one profile is using the entire set of another profile, one can use
|
If one profile is using the entire set of another profile, one can use
|
||||||
the `include` entry to avoid redundancy.
|
the `include` entry to avoid redundancy.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
```
|
```yaml
|
||||||
profiles:
|
profiles:
|
||||||
host1:
|
host1:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
@@ -401,7 +401,7 @@ The following file is the dotfile stored in dotdrop containing
|
|||||||
jinja2 directives for the deployment based on the profile used.
|
jinja2 directives for the deployment based on the profile used.
|
||||||
|
|
||||||
Dotfile `<dotpath>/xinitrc`:
|
Dotfile `<dotpath>/xinitrc`:
|
||||||
```
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# load Xresources
|
# load Xresources
|
||||||
@@ -423,7 +423,7 @@ Of course any combination of the dotfiles (different sets)
|
|||||||
can be done once you have more dotfiles to deploy.
|
can be done once you have more dotfiles to deploy.
|
||||||
|
|
||||||
`config.yaml` file:
|
`config.yaml` file:
|
||||||
```
|
```yaml
|
||||||
config:
|
config:
|
||||||
backup: true
|
backup: true
|
||||||
create: true
|
create: true
|
||||||
@@ -443,19 +443,19 @@ profiles:
|
|||||||
|
|
||||||
Installing the dotfiles (the `--profile` switch is not needed if
|
Installing the dotfiles (the `--profile` switch is not needed if
|
||||||
the hostname matches the entry in the config file):
|
the hostname matches the entry in the config file):
|
||||||
```
|
```bash
|
||||||
# on home computer
|
# on home computer
|
||||||
./dotdrop.sh install --profile=home
|
$ ./dotdrop.sh install --profile=home
|
||||||
# on office computer
|
# on office computer
|
||||||
./dotdrop.sh install --profile=office
|
$ ./dotdrop.sh install --profile=office
|
||||||
```
|
```
|
||||||
|
|
||||||
Comparing the dotfiles:
|
Comparing the dotfiles:
|
||||||
```
|
```bash
|
||||||
# on home computer
|
# on home computer
|
||||||
./dotdrop.sh compare
|
$ ./dotdrop.sh compare
|
||||||
# on office computer
|
# on office computer
|
||||||
./dotdrop.sh compare
|
$ ./dotdrop.sh compare
|
||||||
```
|
```
|
||||||
|
|
||||||
# Related projects
|
# Related projects
|
||||||
|
|||||||
Reference in New Issue
Block a user