like make, but for symlinks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hazel Levine 9654e23b98 create nonexistent directories 7 hours ago
src create nonexistent directories 7 hours ago
.gitignore modify program spec to be "saner" 2 weeks ago
Cargo.toml refactor using parser combinators 1 week ago
LICENSE init linkfile parser w/ glob 3 weeks ago
README.org cleanup readme, make some things private 1 week ago

README.org

Description

Like GNU stow, and also like make for dotfiles. In short, another symlink manager, because I'm not satisfied with any of the other ones.

Usage

In your main folder, have subdirectories:

 λ ~ ls etc
bin  bspwm  doom  Linkfile  zsh  README.md

Under each subdirectory:

 λ ~ ls etc/doom/
blog.org  config.org  init.el  nice.png

The Linkfile defines where you put your stuff. It follows the following (tentative) syntax, with the file on the left and the target directory on the right, and defaults to $HOME:

doom/config.org => .config/doom/

You can specify what filename you'd like to use, if they aren't the same:

zsh/zshrc => .zshrc

If you aren't using $HOME, you can specify a path:

udev/95-monitor-hotplug.rules => /etc/udev/rules.d/

You can also use glob syntax to grab all files:

bin/* => bin/

You can add empty lines anywhere, and comments with #.

Furthermore, the location of the Linkfile can depend on how you want to structure your dots. Just want to lake .? Put it in the root. Want to keep stuff program-specific? Put a Linkfile in each directory.

Building

cargo build --release

Installation

Put the binary somewhere, I guess.

Tasks

STRT Code sanity check (first real Rust project, after all)

  • "looks fine" - luna

TODO Support alternative stow locations via CLI

TODO Make directories if they don't exist already

TODO More verbose parse errors

This one's hard on the merit that anyhow::Error ensures that the resultant error has static lifetime, but due to the nature of nom::IResult, this would make the input static, which is decidedly undesired behavior.

TODO Tests