1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00

update example with more content

This commit is contained in:
deadc0de6
2021-09-22 20:37:15 +02:00
parent 5dfbf5d044
commit eb2a3c7120

View File

@@ -85,7 +85,7 @@ to your dotfiles git tree. Having dotdrop as a submodule guarantees that anywher
you are cloning your dotfiles git tree from you'll have dotdrop shipped with it. you are cloning your dotfiles git tree from you'll have dotdrop shipped with it.
Below instructions show how to install dotdrop as a submodule. For alternative Below instructions show how to install dotdrop as a submodule. For alternative
installation instructions (with virtualenv, pypi, aur, snap, etc) see the installation instructions see the
[installation documentation](https://dotdrop.readthedocs.io/en/latest/installation/). [installation documentation](https://dotdrop.readthedocs.io/en/latest/installation/).
Dotdrop is also available on Dotdrop is also available on
@@ -211,8 +211,7 @@ profiles:
``` ```
Then adapt any dotfile using the [templating](https://dotdrop.readthedocs.io/en/latest/templating/) Then adapt any dotfile using the [templating](https://dotdrop.readthedocs.io/en/latest/templating/)
feature (if needed). For example you might want different fonts sizes on polybar for the different feature (if needed). For example you might want different fonts sizes on polybar for each host.
hosts:
edit `<dotpath>/config/polybar/config` edit `<dotpath>/config/polybar/config`
```bash ```bash
@@ -227,6 +226,39 @@ font2 = "unifont:size=6;0"
``` ```
You also want to have the correct interface set on the wireless network in
the polybar config.
Add a [variable](https://dotdrop.readthedocs.io/en/latest/config/#variables)
to the config file (with below example *home* gets the default `wlan0` value for
the variable `wifi` while *office* gets `wlp2s0`):
```yaml
variables:
wifi: "wlan0"
profiles:
home:
dotfiles:
- f_vimrc
- f_xinitrc
- d_polybar
office:
dotfiles:
- f_xinitrc
- d_polybar
variables:
wifi: "wlp2s0"
```
Then you can adapt the polybar config file so that the
variable `wifi` gets correctly replaced during installation
```bash
[module/wireless-network]
type = internal/network
interface = {{@@ wifi @@}}
```
Also the home computer is running [awesomeWM](https://awesomewm.org/) Also the home computer is running [awesomeWM](https://awesomewm.org/)
and the office computer [bspwm](https://github.com/baskerville/bspwm). and the office computer [bspwm](https://github.com/baskerville/bspwm).
The `~/.xinitrc` file will therefore be different while still sharing some lines. The `~/.xinitrc` file will therefore be different while still sharing some lines.
@@ -249,22 +281,41 @@ exec bspwm
{%@@ endif @@%} {%@@ endif @@%}
``` ```
The *if branch* on above template examples will define Finally you want everything installed with the *office* profile
which part is deployed based on the to be logged, you thus add an action to the config file:
hostname of the host on which dotdrop is run from ```yaml
(or the selected profile).
actions:
loginstall: "echo {{@@ _dotfile_abs_src @@}} installed to {{@@ _dotfile_abs_dst @@}} >> {0}"
profiles:
home:
dotfiles:
- f_vimrc
- f_xinitrc
- d_polybar
office:
dotfiles:
- f_xinitrc
- d_polybar
variables:
wifi: "wlp2s0"
actions:
- loginstall "/tmp/dotdrop-installation.log"
```
When done, you can install your dotfiles using When done, you can install your dotfiles using
```bash ```bash
$ dotdrop install $ dotdrop install
``` ```
If you are unsure, you can always run `dotdrop compare` to see If you are unsure, you can always run `dotdrop compare` to see
how your local dotfiles would be updated by dotdrop before running how your local dotfiles would be updated by dotdrop before running
`install` or run install with `--dry`. `install` or you could run install with `--dry`.
That's it, a single repository with all your dotfiles for your different hosts. That's it, a single repository with all your dotfiles for your different hosts.
You can then For more see the [doc](https://dotdrop.readthedocs.io)
* [create actions](https://dotdrop.readthedocs.io/en/latest/config-details/#entry-actions) * [create actions](https://dotdrop.readthedocs.io/en/latest/config-details/#entry-actions)
* [use transformations](https://dotdrop.readthedocs.io/en/latest/config-details/#entry-transformations) * [use transformations](https://dotdrop.readthedocs.io/en/latest/config-details/#entry-transformations)
@@ -272,8 +323,6 @@ You can then
* [symlink dotfiles](https://dotdrop.readthedocs.io/en/latest/config/#symlink-dotfiles) * [symlink dotfiles](https://dotdrop.readthedocs.io/en/latest/config/#symlink-dotfiles)
* [and more](https://dotdrop.readthedocs.io/en/latest/howto/howto/) * [and more](https://dotdrop.readthedocs.io/en/latest/howto/howto/)
For more options see `dotdrop --help` and the [documentation](https://dotdrop.readthedocs.io).
# Documentation # Documentation
Dotdrop's documentation is hosted on [readthedocs](https://dotdrop.readthedocs.io/en/latest/). Dotdrop's documentation is hosted on [readthedocs](https://dotdrop.readthedocs.io/en/latest/).