You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PapaTutuWawa 8a62746563 feat: Auto-detect config.scm in the CWD 3 months ago
LICENSE feat: Add a license and a shebang 6 months ago feat: Add mutators to the README 6 months ago
gdfm.scm feat: Auto-detect config.scm in the CWD 3 months ago


gdfm is a dotfile manager written in and configured with GNU Guile.


$ guile -s <path to repo>/gdfm.scm --target /home/user --config <path to config>/config.scm

The file config.scm has to return a list of dotfile instances, either made by (make dotfile) or (simple-dotfile):

`(,(simple-dotfile "dotemacs" ".emacs"))

This example will take the file dotemacs from the config's directory and copy it to <target root>/.emacs, where <target root> is either the path passed to --target or the value of the environment variable $HOME.


When installing a dotfile, there may be some changes you want to make to its content. A mutator is just a function which taks the content of the file as its input and returns the (possibly) altered content. A dotfile may have multiple mutators that are applied in order by (for-each).

(define (test-mutator content)
  (string-append content ";;; Generated by gdfm"))

(make dotfile #:src "dotemacs" #:dest ".emacs" #:mutators '(test-mutator))

A predefined mutator is a templated mutator. It replaces occurences of the string {{ variable_name }} inside the file, with variable_name being user-controlled. You can create such a mutator by using (make-template-mutator '(("variable_name" . "value"))).