From 3ef42c831b29294b00a31b3a3b47ad666c14c8d5 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 8 Sep 2017 15:39:21 +0200 Subject: [PATCH] update readme --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 130a8ff..8d7cffc 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Features: * Comparison between local and stored dotfiles * Handling multiple profiles with different sets of dotfiles * Easy import dotfiles in dotdrop +* associate an action to the deployment of a dotfile Check the [blog post](https://deadc0de.re/articles/dotfiles.html) for more. @@ -182,13 +183,17 @@ the following entries: it doesn't exist * `dotpath`: path to the folder containing the dotfiles to be managed by dotdrop (absolute path or relative to the config file location) + * **dotfiles** entry: a list of dotfiles in the form * When `link` is true, dotdrop will create a link instead of copying. Template generation (as in [template](#template)) is not supported when `link` is true. ``` : dst: src: - link: # Optional + # Optional + link: + actions: + - ``` * **profiles** entry: a list of profiles with a sublist @@ -201,6 +206,11 @@ the following entries: - ... ``` +* **actions** entry: a list of action available +``` + : +``` + ## Installing dotfiles Simply run @@ -259,6 +269,37 @@ f_dunstrc (file: "config/dunst/dunstrc", link: False) -> ~/.config/dunst/dunstrc ``` +## Execute an action when deploying a dotfile + +It is sometimes useful to execute some kind of action +when deploying a dotfile. For example let's consider +[Vundle](https://github.com/VundleVim/Vundle.vim) is used +to manage vim's plugins, the following action could +be set to update and install the plugins when `vimrc` is +deployed: + +``` +actions: + vundle: vim +VundleClean! +VundleInstall +VundleInstall! +qall +config: + backup: true + create: true + dotpath: dotfiles +dotfiles: + f_vimrc: + dst: ~/.vimrc + src: vimrc + actions: + - vundle +profiles: + home: + - f_vimrc +``` + +Thus when `f_vimrc` is intalled, the command +`vim +VundleClean! +VundleInstall +VundleInstall! +qall` will +be executed. + ## Update dotbot If installed through the `bootstrap.sh` script, dotdrop is