Skip to content

malobre/xdot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xdot

A minimalist dotfiles manager inspired by a 2012 blog post (archived) by Brandon Invergo in which they show how to use GNU stow to manage dotfiles. I found this solution very elegant, however if you happen to use different path for, e.g, $XDG_CONFIG_HOME between your computers, this won't work. xdot is my answer to that.

Packages

A package is a directory that contains config for an application.

xdot will look for packages in ~/.xdot.

If a package subdirectory's name begins with a U+0040 AT SIGN (@), the remaining characters will be interpreted as an environment variable name (with spec compliant defaults for XDG Base Directory vars), e.g:

  • PACKAGE/@HOME/FILE will be symlinked to $HOME/FILE,
  • PACKAGE/@XDG_CONFIG_HOME/FILE will be symlinked to $XDG_CONFIG_HOME/FILE.

Otherwise, xdot will link the content of said package relative to /, e.g:

  • PACKAGE/FILE will be symlinked to /FILE,
  • PACKAGE/DIR/FILE will be symlinked to /DIR/FILE.

Usage

Usage: xdot [options] [--] [package...]
Symlink your dotfiles from `~/.xdot`.

Options:
  --all          Symlink all packages.
  --unlink       Remove symlinks.
  --dry-run      Don't modify the file system.
  -v, --verbose  Increase verbosity.
  -h, --help     Show this help message and exit.
  --version      Show version information and exit.

Running xdot is idempotent and won't overwrite existing files, if a directory already exists it will descend into it until it is able to symlink or fails.

--unlink will remove symlinks that would otherwise be created (except if the existing link points to a location outside of ~/.xdot).

About

A minimalist dotfiles manager

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages