dotfiles-pm
v0.1.1
Published
Manage your dotfiles as (un)installable, (un)linkable packages
Readme
Manage your dotfiles as (un)installable, (un)linkable packages.
Installation
Simply run:
$ npm install -g dotfiles-pminstall
Install a package. Looks for a dotfile.json in PWD
uninstall <name>
Uninstall a package. If it is linked, it will be unlinked.
link <name>
Link one of your installed packages.
unlink <name>
Unlink one of your linked packages.
Installing a package
A package is a directory containing some of your files and a dotfile.json which holds your package info. It will look something like this:
{
"name": "nvim",
"linkto": "/home/ben/.config",
"withdir": "nvim",
"ignore": [ ".git/" ]
}| option | description | |:---: |:----| | name | our package name, for obvious reasons! | | linkto | the directory we want to link our files to. Defaults to $HOME if omitted | | withdir | an extra directory in which we want to place our actual links. So the link path becomes: linkto/withdir/somefile | |ignore | a list of files we don't want to copy when installing. You can use your usual glob patterns here, yippie!
Dotfiles copies all the files and dirs in the directory (minus the ignore list) to ~/.config/dotfiles/installed/<package name> and adds the package to its internal cache. Now we can (un)link the package, nice!
Linking a package
Simply run link to link a package.
$ dotfiles link <package name>Uninstalling a package
Simply run uninstall to uninstall one of your packages.
$ dotfiles uninstall <package name>Uninstalling will unlink and completely remove it from your packages directory $HOME/.config/dotfiles/installed
oh-my-zsh plugin
Place dotfiles.plugin.zsh in $HOME/.oh-my-zsh/custom/plugins/dotfiles and add it to the plugins list in your .zshrc
plugins = (dotfiles <any other stuff that was already here>)regular zsh completion script
Place _dotfiles in a directory that is included in your zsh fpath.
e.g. $HOME/.zsh/completions would be configured like this in your .zshrc
fpath=($HOME/.zsh/completions $fpath)