1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Dotfiles
Personal collection of (public) dotfiles, managed with
[GNU Stow](https://www.gnu.org/software/stow/).

Each top-level folder is a set of dotfiles you can deploy with
```{.bash}
stow --verbose <folder>
```
On top of this I'm using my own fork of [st](https://st.suckless.org/).
You can find it [here](https://git.dyamon.me/st/).
Some packages depend on others and should be deployed together.
Use the [deployment script](#piping-hot) if you want to avoid any problem.
In particular:
- `nvim` depends on `bash`, `ripgrep`, and `nnn`
- `tmux` depends on `bash`
`git` and `stow` are assumed to be installed on the machine.
**N.B.** I'm currently transitioning from Vim to NeoVim.
NeoVim configs have now reached a usable state and the dotfiles under `vim` will be remove soon™.
## Installation
Some of the *packages* need extra work to be fully deployed.
For this reason a deployment script is provided to automate this.
The script deploys everything locally and installs new executables under `~/.local/bin/` (if needed).
If you want to know what are the additional steps for a specific package check the [script](https://git.dyamon.me/dotfiles/tree/setup.sh) and in particular the corresponding function `setup_<package>()`.
### The risky way
If you like the risk, you can
[pipe directly into `bash`](https://pi-hole.net/2016/07/25/curling-and-piping-to-bash).
Please [read the script](https://git.dyamon.me/dotfiles/tree/setup.sh) first!
```
curl -sSL https://git.dyamon.me/dotfiles/plain/setup.sh | bash -s -- [<folder> ...]
```
This will clone the repository and deploy the dotfiles for the requested packages.
The script will take care of dependency between packages and notify the user of missing external dependences for which is able to perform a *simple*, *distribution agnostic*, *local* install.
### Good ol' method
If you want to be a bit more careful, use the following:
```
curl -L https://git.dyamon.me/dotfiles/plain/setup.sh > dyamon.bash
${EDITOR:-vi} dyamon.bash
chmod u+x dyamon.sh
./dyamon.sh [<option> ...] [<folder> ...]
```
### Updating
Updating through the deployment script is still **work-in-progress**.
If the update is restricted to config files in the repository you can *restow* a folder.
To unstow a package use
```
stow --restow <folder>
```
To remove config files for a folder, run
```
stow --delete <folder>
```
## Private configuration
I personally keep a separate repository with all my private configuration files, and you might want to do the same (some public config file might loosely depend on private configs).
This is organized with `stow` as well.
Keep in mind that when using `stow` from multiple locations you might need the `--no-folding` flag to avoid clashes.
## Note on Stow
In Stow 2.3.0, a new feature was introduced to better handle dotfiles.
In particular any file or directory in the package tree that starts with the prefix `dot-` is substituted, during symlink creation, with an actual dot.
This is to avoid having a package with a bunch of *hidden* files.
Unfortunately the feature [doesn't work properly](https://github.com/aspiers/stow/issues/33).
|