|
|
|
|
2
|
============
|
2
|
============
|
3
|
|
3
|
|
4
|
|
4
|
|
5
|
-Note that this will only work for dotfiles stored right in your `$HOME`.
|
|
|
6
|
-Support for configuration stored in folders like ~/.config/application or
|
|
|
7
|
-~/.local/application is planned.
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
To install, you need to perform following steps:
|
5
|
To install, you need to perform following steps:
|
11
|
|
6
|
|
12
|
1. Clone repository to a stable place on your box
|
7
|
1. Clone repository to a stable place on your box
|
|
|
|
|
18
|
|
13
|
|
19
|
$ mv ~/.gnucash ~/local/mydots/dotfiles/gnucash
|
14
|
$ mv ~/.gnucash ~/local/mydots/dotfiles/gnucash
|
20
|
|
15
|
|
21
|
- This works for directories as well as files, although e.g. for bash, vim
|
|
|
22
|
- or git, I recommend different solutions--see below.
|
|
|
|
|
16
|
+ If your configs live under `~/.config` folder, put them under a folder
|
|
|
17
|
+ similar to the dotfiles:
|
23
|
|
18
|
|
24
|
- Also note that you can name the dotfiles folder whatever you want;
|
|
|
25
|
- there's no real connection with the repository.
|
|
|
|
|
19
|
+ $ mv ~/.config/dunst ~/local/mydots/dotfiles.config/dunst
|
|
|
20
|
+
|
|
|
21
|
+ Note that for bash, vim and git, I recommend different solutions--see
|
|
|
22
|
+ below.
|
26
|
|
23
|
|
27
|
3. Run mklinks script with single argument: path to dotfiles folder (or how
|
24
|
3. Run mklinks script with single argument: path to dotfiles folder (or how
|
28
|
you named it), e.g.:
|
25
|
you named it), e.g.:
|
|
|
|
|
34
|
makes it easy to exclude some of your applications from some of your
|
31
|
makes it easy to exclude some of your applications from some of your
|
35
|
machines: just skip step 2 for them.
|
32
|
machines: just skip step 2 for them.
|
36
|
|
33
|
|
|
|
34
|
+ Pro tip: Notice how the mklinks script discovers your `.config/`-bound
|
|
|
35
|
+ files such as dunst.
|
|
|
36
|
+
|
|
|
37
|
+ 1. The path you pointed to is "path/to/dotfiles", so this will be
|
|
|
38
|
+ regarded as "base path" of your config pool.
|
|
|
39
|
+
|
|
|
40
|
+ 2. Any members of the *base* directory will be prefixed with single
|
|
|
41
|
+ dot and symlinked *directly* to your home--just as the ancient
|
|
|
42
|
+ tradition dictates.
|
|
|
43
|
+
|
|
|
44
|
+ 3. If the "base path" has neighbor called the same but with suffix
|
|
|
45
|
+ `.config`, i.e. `path/to/dotfiles.config`, it will symlink all
|
|
|
46
|
+ present members to `~/.config` path--just as XDG convention
|
|
|
47
|
+ uses in its most common version.
|
|
|
48
|
+
|
|
|
49
|
+ 4. The case is similar for `.local/share` files; here you'll just need
|
|
|
50
|
+ to go one step deeper: files that should be linked to `~/.local/share`
|
|
|
51
|
+ should be in `dotfiles.local/share`.
|
|
|
52
|
+
|
37
|
|
53
|
|
38
|
Instructions for bash
|
54
|
Instructions for bash
|
39
|
---------------------
|
55
|
---------------------
|
40
|
|
56
|
|
41
|
-Although similar technique could be used for bash, I prefer toi have defaults
|
|
|
|
|
57
|
+Although similar technique could be used for bash, I prefer to have defaults
|
42
|
specified by distro. Therefore I use other technique:
|
58
|
specified by distro. Therefore I use other technique:
|
43
|
|
59
|
|
44
|
Instead of step 2 above, move/merge your specific ~/.bashrc changes to either
|
60
|
Instead of step 2 above, move/merge your specific ~/.bashrc changes to either
|
45
|
one of these, or preferably, split them as needed:
|
61
|
one of these, or preferably, split them as needed:
|
46
|
|
62
|
|
47
|
- dotfiles/bash/global-before.bashrc
|
|
|
|
|
63
|
+ dotfiles/bash/main.bashrc
|
48
|
dotfiles/bash/user/<your-username>.bashrc
|
64
|
dotfiles/bash/user/<your-username>.bashrc
|
49
|
dotfiles/bash/host/<your-hostname>.bashrc
|
65
|
dotfiles/bash/host/<your-hostname>.bashrc
|
50
|
- dotfiles/bash/global-after.bashrc
|
|
|
|
|
66
|
+ dotfiles/bash/post.bashrc
|
51
|
|
67
|
|
52
|
Then, replace your ~/.bashrc with your default distro's one, commonly found
|
68
|
Then, replace your ~/.bashrc with your default distro's one, commonly found
|
53
|
-in /etc/skel/.bashrc, and patch it with dotfiles/bash/setup/bashrc.diff:
|
|
|
|
|
69
|
+in /etc/skel/.bashrc, and use `dotfiles/bash/setup` to patch it:
|
54
|
|
70
|
|
55
|
$ cp /etc/skel/.bashrc ~/
|
71
|
$ cp /etc/skel/.bashrc ~/
|
56
|
- $ patch -u ~/.bashrc local/mydots/dotfiles/bash/setup/bashrc.diff
|
|
|
|
|
72
|
+ $ local/mydots/dotfiles/bash/setup
|
57
|
|
73
|
|
58
|
-From that point on, .bashrc will source appropriate fies for you, so do not
|
|
|
59
|
-make any changes to your local .bashrc, unless you really want them to be
|
|
|
|
|
74
|
+From that point on, `.bashrc` will source appropriate fies for you, so do not
|
|
|
75
|
+make any changes to your local `.bashrc`, unless you really want them to be
|
60
|
local, i.e. private only.
|
76
|
local, i.e. private only.
|
61
|
|
77
|
|
62
|
|
78
|
|
|
|
|
|
100
|
local config is split into parts per user/host or global one, and original
|
116
|
local config is split into parts per user/host or global one, and original
|
101
|
file becomes just a crossroads into these.
|
117
|
file becomes just a crossroads into these.
|
102
|
|
118
|
|
103
|
-Except that since git does not support expansion in config paths, the fil
|
|
|
|
|
119
|
+Except that since git does not support expansion in config paths, the file
|
104
|
must be created by a script. So what you want to do is the same as for bash
|
120
|
must be created by a script. So what you want to do is the same as for bash
|
105
|
above, except that instead of applying patch to your .gitconfig, you simply
|
121
|
above, except that instead of applying patch to your .gitconfig, you simply
|
106
|
delete it and run dotfiles/git/setup.
|
122
|
delete it and run dotfiles/git/setup.
|