Giter Club home page Giter Club logo

homemaker's Introduction

Have a dotfiles directory with all your stuff in it? Have homemaker put everything in its right place.

homemaker in action

hm in action

installation

  • from crates.io: cargo install hm
  • from github (may be in some state of flux): cargo install --git https://github.com/hlmtre/homemaker
  • cloned locally: cargo install --path .
  1. create a config.toml file either anywhere (and specify it when you run hm) or in ~/.config/homemaker/.
  2. enter things to do things to in the file. example:
## config.toml

[[obj]]
file = 'tmux.conf'
source = '~/dotfiles/.tmux.conf'
destination = '~/.tmux.conf'
method = 'symlink'

[[obj]]
task = 'zt'
solution = 'cd ~/dotfiles/zt && git pull'
dependencies = 'maim, slop'

[[obj]]
task = 'maim_dependencies'
solution = 'sudo apt install -y libxfixes-dev libglm-dev libxrandr-dev libglew-dev libegl1-mesa-dev libxcomposite-dev'

[[obj]]
task = 'maim'
source = '~/dotfiles/zt/maim'
solution = 'cd ~/dotfiles/zt/maim; make clean; cmake -DCMAKE_INSTALL_PREFIX="/usr" ./ && make && sudo make install'
method = 'execute'
dependencies = 'maim_dependencies'

[[obj]]
task = 'slop'
source = '~/dotfiles/zt/slop'
solution = 'cd ~/dotfiles/zt/slop; make clean; cmake -DCMAKE_INSTALL_PREFIX="/usr" ./ && make && sudo make install'
method = 'execute'

[[obj]]
task = 'slop'
source = '~/dotfiles/zt/slop'
solution = 'cd ~/dotfiles/zt/slop; make clean; cmake -DCMAKE_INSTALL_PREFIX="/usr" ./ && make && sudo make install'
method = 'execute'
  1. hm ~/path/to/your/config.toml

why homemaker?

  • compared to say, gnu stow, homemaker supports more than just creating a mirrored symlinked filesystem.
  • dependency resolution:
    • specify a set of tasks to complete, each with their own dependencies, and watch as it completes them in some order that satisfies each task's dependencies.
    • for example, in the sample config.toml (the one i use, actually), maim depends on having some graphics libraries installed. i created a task called maim_dependencies, and hm will complete maim_dependencies before attempting to complete maim.
    • zt has two dependencies: maim and slop. hm will complete the entire dependency tree below zt before atttempting zt.
    • homemaker complains if the dependency tree cannot be solved, and hopefully shows you a handy explanation why. dep graph

built with spacemacs

thanks to actual good code:
serde
toml
symlink
solvent
indicatif
console

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.