Documentation
¶
Overview ¶
Package dotfiles manages the user's dotfiles repository: cloning it, running its install script, and reporting on its health (uncommitted or unsynchronised changes, and files not symlinked into $HOME).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultModularDotfiles = []string{
".zshrc",
".profile",
".aliases",
".gitconfig",
".tmux.conf",
".vimrc",
".ideavimrc",
".bashrc",
".git-shellrc",
".node-shellrc",
".go-shellrc",
}
DefaultModularDotfiles lists the dotfiles that, if present in the dotfiles repo, are expected to be symlinked into $HOME by the install script. Entries not present in the repo are silently skipped — this list is forward-looking and will grow as the dotfiles repo adds modules.
Functions ¶
This section is empty.
Types ¶
type Setup ¶ added in v0.0.41
type Setup struct {
RepoURL string
LocalPath string
// InstallScript is the script to run after cloning, relative to
// LocalPath. Empty means there is nothing to run.
InstallScript string
// ModularFiles are the dotfiles expected to be symlinked from LocalPath
// into $HOME. Defaults to DefaultModularDotfiles; override in tests.
ModularFiles []string
// contains filtered or unexported fields
}
Setup is the machine configuration for a dotfiles repository cloned to a local path and applied by an install script inside it.
func NewSetup ¶ added in v0.0.41
NewSetup returns a Setup that expects DefaultModularDotfiles to be symlinked into $HOME.
func (Setup) Install ¶ added in v0.0.41
Install clones the repository if needed, then runs its install script. The script is run every time: it is expected to be idempotent.