Skip to content

Personal configuration files managed with GNU Stow.

Notifications You must be signed in to change notification settings

packerdl/dotfiles

Repository files navigation

Introduction

Like many, I manage my dotfiles using GNU Stow. I opted for stow over alternatives because it is light-weight, available on most package managers, and gives the freedom to organize your dotfile packages however you like (by software, environment, machine, etc.).

Using Stow

TL;DR for Stow

The basic idea behind stow is that each folder in the stow directory is a package containing the tree structure that should be mirrored in the target directory. In the case of this repository, the stow directory is the root of the repository, and the target directory is your home folder.

When you stow (install) a package, the software tries to add the tree structure to the target directory using as few symlinks as possible. If stow comes across a file in the target directory that is not a symlink, it assumes a conflict and refuses to proceed. See the Stow man page for more information about how to resolve such conflicts.

When you unstow (uninstall) a package, the software will remove the the symlinks, effectively removing the dotfiles from your home folder.

Usage

By default the target directory will be the parent of the stow directory. This can be changed via the -t flag as shown in the examples below, allowing you to clone the dotfiles repository wherever convenient.

Installing Packages

# Make sure stow is installed.
sudo apt -y install stow

# Clone the repository, preferably to your home directory.
git clone https://github.com/DevinPacker/dotfiles.git
cd dotfiles

# Installing a package.
# You may omit the target folder argument if you've cloned
# the repository to your home directory (~/dotfiles).
stow <package-name> -t ~

Uninstalling Packages

# Navigate to the repository.
cd dotfiles

# Uninstalling a package.
# You may omit the target folder argument if you've cloned
# the repository to your home directory (~/dotfiles).
stow -d <package-name> -t ~

Dry-Run Operations

If you are worried about what stow will do to your file system, you can test operations by using a combination of the simulate and verbosity flags.

# Simulate Stowing Package
stow <package-name> -t ~ --simulate -v

# Simulate Unstowing Packages
stow -d <package-name> -t ~ --simulate -v

Additional Resources

About

Personal configuration files managed with GNU Stow.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published