hm 0.7.5

homemaker. Slightly more than yet another dotfile manager.
Documentation
# simple managed object
# [[obj]]
# task = 'zt' <-- like 'name' but for, uh, tasks
# solution = 'cd ~/dotfiles/zt && git pull' <-- shell to execute
# dependencies = ['maim', 'slop'] <-- dependencies - do them first. Valid values: any other tasks, need not be specified before this one.

# complex managed object
# [[obj]]  <-- required `obj` header for each managed object
# file = '.Xresources' <-- name
# source = '~/dotfiles/.Xresources' <-- for symlink/copy, source file location
# destination = '~/.Xresources' <-- for symlink/copy, destination
# method = 'symlink' <-- symlink or copy?. Valid values: symlink, copy.
# post = "xrdb ~/.Xresources" <-- a wee shell script to execute upon SUCCESSFUL symlink/copy
# force = 'true' <-- overwrite if file already exists. Valid values: true, false; unspecified defaults to false


[[obj]]
file = 'alacritty'
source = '~/dotfiles/.config/alacritty'
destination = '~/.config/alacritty'
method = 'symlink'

[[obj]]
file = 'kitty'
source = '~/dotfiles/.config/kitty'
destination = '~/.config/kitty'
method = 'symlink'

[[obj]]
file = '.neomuttrc'
source = '~/dotfiles/.neomuttrc'
destination = '~/.neomuttrc'
method = 'symlink'
force = 'true'

[[obj]]
file = 'starship.toml'
source = '~/dotfiles/.config/starship.toml'
destination = '~/.config/starship.toml'
method = 'symlink'

[[obj]]
file = 'waybar'
source = '~/dotfiles/.config/waybar'
destination = '~/.config/waybar'
method = 'symlink'

[[obj]]
file = '.Xresources'
source = '~/dotfiles/.Xresources'
destination = '~/.Xresources'
method = 'symlink'
post = "xrdb ~/.Xresources"
force = 'true'

[[obj]]
file = 'sway'
source = '~/dotfiles/.config/sway'
destination = '~/.config/sway'
method = 'symlink'

[[obj]]
file = 'rofi'
source = '~/dotfiles/.config/rofi'
destination = '~/.config/rofi'
method = 'symlink'

[[obj]]
file = 'tmux.conf'
source = '~/dotfiles/.tmux.conf'
destination = '~/.tmux.conf'
method = 'symlink'
post = 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'

[[obj]]
file = 'gtk2'
source = '~/dotfiles/.config/gtk-2.0'
destination = '~/.config/gtk-2.0'
method = 'symlink'
force = 'true'

[[obj]]
file = 'gtk3'
source = '~/dotfiles/.config/gtk-3.0'
destination = '~/.config/gtk-3.0'
method = 'symlink'
force = 'true'

[[obj]]
file = 'nvim_config'
source = '~/dotfiles/.config/nvim'
destination = '~/.config/nvim'
method = 'symlink'
force = 'true'

[[obj]]
task = 'nvim'
method = 'execute'
solution = "test -x /usr/local/bin/nvim || (git clone https://github.com/neovim/neovim.git ~/src/neovim && cd ~/src/neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/usr/local/ && sudo make install)"
dependencies = ['packer', 'nvim_deps', 'ninja-cmake']

[[obj]]
task = 'nvim_deps'
method = 'execute'
solution = 'sudo apt install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl gettext'
os = 'linux::debian'

[[obj]]
task = 'nvim_deps'
method = 'execute'
solution = 'sudo yum -y install ninja-build libtool autoconf automake cmake gcc gcc-c++ make pkgconfig unzip patch gettext curl'
os = 'linux::fedora'

[[obj]]
task = 'ninja-cmake'
method = 'execute'
solution = 'pip3 install --user ninja cmake'

[[obj]]
task = 'packer'
method = 'execute'
solution = "git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim"

[[obj]]
file = 'fish'
source = '~/dotfiles/.config/fish'
destination = '~/.config/fish'
method = 'symlink'
force = 'true'

[[obj]]
task = 'zt-fedora-wayland'
solution = 'cd ~/dotfiles/zt && git pull'
dependencies = ['grim', 'slurp']
os = 'linux::fedora'

[[obj]]
task = 'grim'
solution = 'test -d ~/src/grim/ || (git clone https://github.com/emersion/grim.git ~/src/grim && cd ~/src/grim && meson build && sudo ninja -C build install)'
method = 'execute'
os = 'linux::fedora'

[[obj]]
task = 'slurp'
method = 'execute'
solution = 'test -d ~/src/slurp/ || (git clone https://github.com/emersion/slurp.git ~/src/slurp && cd ~/src/slurp && meson build && sudo ninja -C build install)'
os = 'linux::fedora'

[[obj]]
task = 'wofi'
method = 'execute'
solution = 'test -d ~/src/wofi/ || (hg clone https://hg.sr.ht/~scoopta/wofi ~/src/wofi && cd ~/src/wofi && meson build && sudo ninja -C build install)'
os = 'linux::fedora'

[[obj]]
task = 'zt'
solution = 'cd ~/dotfiles/zt && git pull'
dependencies = ['maim', 'slop']
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 = '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', '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 should be of the format either `windows` or `linux::<distro>`
os = "linux::debian"

[[obj]]
task = 'windows only'
solution = 'rustup update'
os = 'windows'

[[obj]]
task = 'rustup update'
solution = 'rustup update'
method = 'execute'

[[obj]]
task = 'loop_detection'
solution = 'echo HI'
#dependencies = 'maim_dependencies'

[[obj]]
task = 'playerctl dependencies'
solution = 'sudo pip3 install meson'
os = "linux::fedora"

[[obj]]
task = 'playerctl install'
solution = 'test -e ~/src/playerctl || mkdir -p ~/src; cd ~/src/; git clone https://github.com/altdesktop/playerctl.git ; cd playerctl; meson -Dgtk-doc=false -Dintrospection=false mesonbuild && sudo ninja -C mesonbuild install'
dependencies = ['playerctl dependencies']
os = "linux::fedora"


# BUILDING SWAY
# build libdrm ~/src/drm
# build wlroots ~/src/sway/subprojects/wlroots
# build sway ~/src/sway

[[obj]]
task = 'libdrm'
solution = '(test -d ~/src/drm || git clone --recursive https://gitlab.freedesktop.org/mesa/drm.git ~/src/drm) && cd ~/src/drm && meson build && ninja -C build'
os = "linux::fedora"

[[obj]]
task = 'clone wlroots'
solution = 'test -d ~/src/sway/subprojects/wlroots || git clone https://gitlab.freedesktop.org/wlroots/wlroots.git ~/src/sway/subprojects/wlroots'
dependencies = ['clone swaywm']
os = "linux::fedora"

[[obj]]
task = 'build wlroots'
solution = 'cd ~/src/sway/subprojects/wlroots/ ; meson build && ninja -C build'
dependencies = ['clone wlroots', 'clone swaywm']
os = "linux::fedora"

[[obj]]
task = 'clone swaywm'
solution = '((test -d ~/src/sway && cd ~/src/sway && git -C ~/src/sway rev-parse 2>/dev/null && git pull) || echo "cloning sway..." ; git clone --recursive https://github.com/swaywm/sway.git ~/src/sway) && (test -d ~/src/sway/subprojects || mkdir ~/src/sway/subprojects)'
os = "linux::fedora"

[[obj]]
task = 'clone wayland-protocols'
solution = 'test -d ~/src/sway/subprojects/wayland-protocols || git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git ~/src/sway/subprojects/wayland-protocols' 
dependencies = ['clone swaywm']

[[obj]]
task = 'clone seatd'
solution='test -d ~/src/sway/subprojects/seatd || git clone https://git.sr.ht/~kennylevinsen/seatd ~/src/sway/subprojects/seatd'
dependencies = ['clone swaywm']

[[obj]]
task = 'clone and build wlsunset'
solution = 'test -e /usr/local/bin/wlsunset || (mkdir -p ~/src; git clone --recursive https://git.sr.ht/~kennylevinsen/wlsunset ~/src/wlsunset ; cd ~/src/wlsunset ; meson build && ninja -C build)'
os = "linux::fedora"

[[obj]]
task = 'rpmfusion'
solution = 'sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm && sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
os = "linux::fedora"

[[obj]]
task = 'swaywm'
solution = 'cd ~/src/sway && meson build && sudo ninja -C build/ install'
dependencies = ['swaywm_dependencies_fedora', 'clone swaywm', 'clone wlroots', 'clone wayland-protocols', 'clone seatd']
os = "linux::fedora"

[[obj]]
task = 'waybar deps'
solution = 'sudo dnf install -y pulseaudio-libs-devel libappindicator-devel libappindicator-gtk3-devel pulseaudio-libs-devel libdbusmenu libdbusmenu-devel libdbusmenu-gtk3-devel'
os = "linux::fedora"

[[obj]]
task = 'fedora deps'
solution = "sudo dnf install -y light network-manager-applet"
os = "linux::fedora"

[[obj]]
task = 'sleep kill ssh'
solution = 'sudo cp ~/dotfiles/sleep.service && sudo systemctl enable sleep'
os = "linux::fedora"

[[obj]]
task = 'swaywm_dependencies_fedora'
solution = 'sudo dnf install -y libxkbcommon-devel cmake mesa-libgbm-devel libdrm-devel wayland-devel systemd-devel pixman-devel wayland-protocols-devel libxcb-devel xcb-util-devel ffmpeg-devel libxkbcommon-devel mesa-libgbm-devel libdrm-devel wayland-devel ffmpeg-devel json-c-devel pango-devel libdevdev-devel libglvnd-devel libinput-devel xorg-x11-server-Xwayland-devel xcb-util-wm-devel pulseaudio-utils libnl-devel'
dependencies = ["rpmfusion"]
os = "linux::fedora"

[[obj]]
task = 'redshift deps'
solution = 'sudo dnf install -y gettext-devel libtool autoconf automake'
os = "linux::fedora"