Crates.io | hm |
lib.rs | hm |
version | 0.7.5 |
source | src |
created_at | 2020-10-04 20:43:33.940704 |
updated_at | 2022-11-05 15:17:08.562637 |
description | homemaker. Slightly more than yet another dotfile manager. |
homepage | |
repository | https://github.com/hlmtre/homemaker |
max_upload_size | |
id | 296132 |
size | 85,648 |
Have a dotfiles directory with all your stuff in it? Have homemaker put everything in its right place.
homemaker in action
cargo install hm
cargo install --git https://github.com/hlmtre/homemaker
cargo install --path .
config.toml
file either anywhere (and specify -c
when you run hm
) or in ~/.config/homemaker/
.## config.toml
[[obj]]
file = 'tmux.conf' # simple things - symlink or copy a file somewhere
source = '~/dotfiles/.tmux.conf'
destination = '~/.tmux.conf'
method = 'symlink'
[[obj]]
task = 'zt' # more complicated - a task.
solution = 'cd ~/dotfiles/zt && git pull'
dependencies = ['maim, slop']
os = 'linux::debian'
[[obj]]
task = 'maim_dependencies'
solution = 'sudo apt install -y libxfixes-dev libglm-dev libxrandr-dev libglew-dev libegl1-mesa-dev libxcomposite-dev'
os = 'linux::debian' # only if the platform matches.
# valid OS values we differentiate between are:
# linux::fedora
# linux::debian
# linux::ubuntu
# windows
[[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'
os = 'linux::debian'
[[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'
os = 'linux::debian'
[[obj]]
task = 'nvim'
method = 'execute'
solution = "test -x /usr/local/bin/nvim || (git clone https://github.com/neovim/nevim.git ~/src/ && cd ~/src/neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/usr/local/ && sudo make install)" # if nvim is not there and executable, run our solution.
dependencies = ['vim-plug']
[[obj]]
task = 'vim-plug'
method = 'execute'
solution = "sh -c 'curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'"
hm -c /path/to/your/config.toml
file
entries either symlink or copy a file somewhere - usually a config file.maim_dependencies
task).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 shows you a hopefully-handy explanation why.
-t <taskname>
Could not be made without rust-analyzer.