-
Notifications
You must be signed in to change notification settings - Fork 1
Dotfiles Usage Guide
Dotfiles are structured to use GNU Stow and Git. Stow is a tool that manages symlinks with care to not do any destructive actions and dry-run support.
You need to install git and stow to be able to use the dotfiles management mechanism.
Arch
pacman -S git stowMacOSX
brew install git stowClone dotfiles repository somewhere convenient. For this example, we'll use ~/.dotfiles directory:
git clone https://github.com/antoniy/dotfiles.git ~/.dotfilesWe can deploy our dotfiles automatically using make:
cd ~/.dotfiles
make # deploy default minimal configurations
make darwin # deploy all MacOSX configs
make linux # deploy all Linux configsCheck out Makefile for details of what each one of the above does.
For more control, we can use stow directly to deploy our configs.
stow --no-fold -nvRt ~ gitHere -n flag indicates that this is gonna be a dry-run. Together with -v (verbose) flag we will get all the information of what would happen without doing any changes to our system. The -R will restow (unlink and then link) the specified modules. -t <dir> indicates the target directory for stow to link our files - in this case our home directory. Final parameter is our modules (divided by space). --no-fold is useful for some modules to tell stow not to link directory containing the config files but to link each config file individually. This is useful because sometimes we link a specific config file but the software has other files in the same directory that we don't want to bring to our dotfiles repository (as it will be the case if the whole config directory is a link to our dotfiles).
To install specified modules we can do:
stow --no-fold -vRt ~ git zsh tmux batFor more information about using stow check out man stow.