Skip to content

Commit bc6f0f8

Browse files
committed
Actualize README.md
1 parent 2493e15 commit bc6f0f8

2 files changed

Lines changed: 56 additions & 92 deletions

File tree

README.md

Lines changed: 56 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -3,125 +3,109 @@
33
[![CI](https://github.com/hypnoglow/dotbro/actions/workflows/ci.yaml/badge.svg)](https://github.com/hypnoglow/dotbro/actions/workflows/ci.yaml)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/hypnoglow/dotbro)](https://goreportcard.com/report/github.com/hypnoglow/dotbro)
55

6-
Dotbro is a tool which helps you install and keep your dotfiles up to date.
6+
*Dotbro* is a tool which helps you install and keep your dotfiles up to date.
77

88
## tl;dr
99

10-
Create simple [config](#configuration). Run dotbro first time:
10+
1. Create simple [profile](#profiles).
11+
12+
2. Run dotbro first time:
1113

12-
dotbro --config path/to/your/config.toml
14+
dotbro --config path/to/your/dotbro.toml
1315

14-
Next time just execute:
16+
3. Next time just execute:
1517

1618
dotbro
1719

18-
# Dotfiles? What?
20+
## Dotfiles? What?
1921

2022
Read about dotfiles on [GitHub page](https://dotfiles.github.io/).
21-
I think [this article](https://medium.com/@webprolific/getting-started-with-dotfiles-43c3602fd789#.h8k6sagzb) by Lars Kappert will give you enough understanding.
23+
I think [this article](https://webpro.nl/articles/getting-started-with-dotfiles) by *Lars Kappert* will give you enough understanding.
2224
So, if you don't have your dotfiles repository yet, it's time to create it. Next, read further to explore an easy way to manage your dotfiles.
2325

24-
# Motivation
26+
## Motivation
2527

2628
Dotfiles are generally stored in VCS and symlinked from repo directory to your `$HOME` - this is one of the best patterns because you can track changes easily and commit them to your dotfiles repo. However, this pattern does not offer you any way to install your dotfiles, so often people end up writing their own script e.g. in bash, which is not good for long-term purposes (I know that because I had one).
2729

2830
This tool was made to deal with dotfiles installation, so you don't waste your time writing your install scripts and focus only on your dotfiles themselves.
2931

30-
Dotbro takes on the routine. The main task - installing your dotfiles in one command on any of your machines.
32+
*Dotbro* takes on the routine. The main task - installing your dotfiles in one command on any of your machines.
3133

32-
# Features
34+
## Features
3335

34-
#### Simple configuration file
36+
### Simple Configuration
3537

36-
All you need is simple [configuration file](#configuration) in JSON or TOML format.
38+
All you need is simple [profile](#profiles) in JSON or TOML format.
3739

38-
The other benefit is you do not need any special tooling if you use multiple different operation systems, e.g Linux and OS X.
39-
You can use one single dotfiles repository with multiple dotbro's configuration files inside - one for each OS.
40+
The extra benefit is that you do not need any special tooling if you use multiple different operation systems, e.g Linux and macOS.
41+
You can use one single dotfiles repository with multiple dotbro profiles inside - one for each OS.
4042
What can be easier?
4143

42-
#### Clear mapping
44+
### Explicit Mapping
4345

4446
You may want to (or you do already) store your dotfiles in a neat way using named directories like `bash/bashrc`.
4547
Obviously, you want to symlink it to proper place `$HOME/.bashrc`.
4648
This is easily done by writing such string in `[mapping]` section:
47-
```
49+
50+
```toml
4851
"bash/bashrc" = ".bashrc"
4952
```
5053

51-
#### Specify the configuration file only once
54+
### Smart Profiles
5255

53-
First time you run dotbro, specify the config file.
56+
First time you run dotbro, specify the profile (`dotbro.toml` file you created).
5457
Dotbro remembers path to this file and use it in further runs.
5558

56-
#### Cleans dead symlinks
59+
### Automatic Cleanup
5760

58-
Dotbro cleans broken symlinks in your `$HOME` (or your another destination path).
61+
Dotbro cleans broken symlinks in your destination path (`$HOME` by default).
5962

60-
#### Add command
63+
### `add` command
6164

6265
Dotbro can automate routine of adding files to your dotfiles repo with one single
6366
command. It does a backup copy, moves the file and creates a symlink to your file.
64-
After that you only need to add this file to your dotbro config (*I'm working on automation of this*) and commit that file to your repo.
67+
After that you only need to add this file to your dotbro profile (*I'm working on automation of this*) and commit that file to your repo.
6568

66-
# Configuration
69+
## Installation
6770

68-
Configuration can be either TOML or JSON file.
69-
TOML is peferred, because it's a bit clearer and allows comments.
70-
However, JSON is good option for configs without mapping, it's short and simple.
71+
### [Go](https://go.dev/doc/install) toolchain
7172

72-
Example of a simple configuration file in TOML format:
73+
go install github.com/hypnoglow/dotbro@latest
7374

74-
https://github.com/hypnoglow/dotbro/blob/da5995c05e9ff228f46f8a9eff18b6c8c9e502b9/profile.toml
75+
This downloads the source code, builds and installs the latest version of dotbro.
76+
Then you can use `dotbro` command right away.
7577

76-
```toml
77-
# Dotbro configuration file.
78-
#
79-
# Some points:
80-
# - Almost all options have default value.
81-
# - You can use $ENV_VARIABLE in paths.
78+
### Arch Linux
8279

83-
[directories]
80+
`dotbro` package is available in AUR:
8481

85-
# Directory of your dotfiles repository.
86-
# Default: directory of this config.
87-
dotfiles = "$HOME/dotfiles"
82+
https://aur.archlinux.org/packages/dotbro/
8883

89-
# Destination directory - your dotfiles will be linked there.
90-
# Default: $HOME
91-
destination = "$HOME"
84+
### Precompiled binary
9285

93-
# Backup directory - your original files will be backuped there.
94-
# Default: $HOME/.dotfiles~
95-
backup = "$HOME/.dotfiles~"
86+
Coming soon ...
9687

97-
[mapping]
88+
## Configuration
9889

99-
# Binaries
100-
"bin" = "bin"
90+
### Profiles
10191

102-
# ZSH
103-
"zsh/zprofile" = ".zprofile"
104-
"zsh/zshrc" = ".zshrc"
105-
"zsh/zshrc.d" = ".zshrc.d"
106-
"zsh/zlogin" = ".zlogin"
92+
*Profile* is a typical [dotbro.toml](dotbro.toml) (or `dotbro.json`) file. It defines directories and mappings.
10793

108-
# Vim
109-
"vim/vimrc" = ".vimrc"
94+
You can have multiple profiles for different purposes. For example, you can have a profile for your work environment and another for your personal environment.
11095

111-
"git/commit_template" = ".gitcommit"
112-
"git/config" = ".gitconfig"
113-
"git/excludes" = ".gitexcludes"
96+
Profile can be either TOML or JSON file.
97+
TOML is peferred, because it's a bit clearer and allows comments.
98+
However, JSON is good option for profiles without explicit mapping, it's short and simple.
11499

115-
"i3" = ".i3"
116-
".keynavrc" = ".keynavrc"
117-
".screenrc" = ".screenrc"
118-
```
100+
Example of a simple profile in TOML format:
101+
102+
https://github.com/hypnoglow/dotbro/blob/2493e151a4ed08b60ab7d1266a36dde23349b258/profile.toml#L1-L75
119103

120104
See more examples in [config_examples](https://github.com/hypnoglow/dotbro/tree/master/config_examples) directory of this repo.
121105

122-
### Options
106+
#### Options
123107

124-
Config has 3 sections:
108+
Profile has 3 sections:
125109
- directories
126110
- mapping
127111
- files
@@ -130,7 +114,7 @@ Config has 3 sections:
130114

131115
Option | Description | Example | Default
132116
--- | --- | --- | ---
133-
dotfiles | Directory of your dotfiles repository. | `$HOME/dotfiles` | Directory of your config file.
117+
dotfiles | Directory of your dotfiles repository. | `$HOME/dotfiles` | Directory of your profile file.
134118
sources | Directory relative to `dotfiles` where dotfiles are stored. You want to set this option if you keep your dotfiles in a subdirectory of your repo. By default this is empty, assuming your dotfiles are on the first level of `dotfiles` directory. | `src` | none
135119
destination | Your dotfiles will be linked there. | `$HOME` | `$HOME`
136120
backup | Your original files will be backuped there. | `$HOME/backups/dotfiles` | `$HOME/.dotfiles~`
@@ -154,10 +138,9 @@ Option | Description | Example | Default
154138
--- | --- | --- | ---
155139
excludes | Files to exclude from being installed | `excludes = ["README.md", "dotbro.toml"]` | none
156140

157-
Summing up, your config without mapping will look like this:
158-
```toml
159-
# Dotbro configuration file.
141+
Summing up, your profile without mapping will look like this:
160142

143+
```toml
161144
[directories]
162145

163146
dotfiles = "$HOME/dotfiles"
@@ -170,39 +153,20 @@ excludes = [
170153
]
171154
```
172155

173-
# Install dotbro
174-
175-
### Using [Go](https://go.dev/doc/install) tools:
176-
177-
go install github.com/hypnoglow/dotbro@latest
178-
179-
This downloads the source code, builds and installs the latest version of dotbro.
180-
Then you can use `dotbro` command right away.
181-
182-
### Arch Linux
183-
184-
`dotbro` package is available in AUR:
185-
186-
https://aur.archlinux.org/packages/dotbro/
187-
188-
### Precompiled binary
189-
190-
Coming soon ...
191-
192-
# Usage
156+
## Usage
193157

194158
Take a look at usage info running:
195159

196160
dotbro --help
197161

198-
If you haven't prepared your config file yet, it's time to do it.
199-
When your config is ready, run:
162+
If you haven't prepared your `dotbro.toml` yet, it's time to do it.
163+
When your profile is ready, run:
200164

201-
dotbro -c <config-path>
165+
dotbro -c <path/to/dotbro.toml>
202166

203167
This installs your dotfiles.
204168

205-
Further runs you can omit config path parameter - dotbro have remembered it for you.
169+
Further runs you can omit profile - dotbro have remembered it for you.
206170
So just run:
207171

208172
dotbro
@@ -211,11 +175,11 @@ To move a file to your dotfiles, perform an `add` command:
211175

212176
dotbro add ./path-to-file
213177

214-
# Issues
178+
## Issues
215179

216180
If you experience any problems, please submit an issue and attach dotbro log file,
217181
which can be found at `$HOME/.dotbro/dotbro.log`.
218182

219-
# License
183+
## License
220184

221185
[MIT](https://github.com/hypnoglow/dotbro/blob/master/LICENSE.md)
File renamed without changes.

0 commit comments

Comments
 (0)