all: 
	@echo "run: make clone build install"

clone: dwm st

build: build-dwm build-st build-lupan-clock

install: install-dwm install-st install-lupan-clock install-other

~/.local/share/zap:
	mkdir -p ~/.local/share
	cd ~/.local/share && \
		git clone https://github.com/zap-zsh/zap.git --branch=release-v1

dwm:
	git clone https://git.suckless.org/dwm 
	cd dwm && \
		git remote add lupan.pl https://gitea.lupan.pl/lupan/dwm.git && \
		git fetch lupan.pl && \
		git checkout -b wip --track lupan.pl/wip

build-dwm:
	make -C dwm

install-dwm:
	make -C dwm install PREFIX="${HOME}/.local/stow/dwm"
	stow -d ~/.local/stow dwm

st:
	git clone https://git.suckless.org/st
	cd st && \
		git remote add lupan.pl https://gitea.lupan.pl/lupan/st.git && \
		git fetch lupan.pl && \
		git checkout -b patched-5 --track lupan.pl/patched-5

build-st:
	make -C st

install-st:
	make -C st install PREFIX="${HOME}/.local/stow/st"
	stow -d ~/.local/stow st

build-lupan-clock:
	make -C lupan-clock

install-lupan-clock:
	make -C lupan-clock install PREFIX="${HOME}/.local/stow/lupan-clock"
	stow -d ~/.local/stow lupan-clock

install-other:
	stow -Rv lazygit shell tmux nvim vis xsession
