default:
    just --list

init-arch: install-arch stow build-wayfreeze

install-arch:
    @echo "installing pkgs"
    sudo pacman -S --needed --noconfirm - < packages-arch

# optional now. Stinkers in the aur scare me!
install-aur:
    sudo pacman -S --noconfirm debugedit fakeroot go make gcc
    git clone https://aur.archlinux.org/yay.git /tmp/yay
    cd /tmp/yay && makepkg -si

install-stabs-apps:
    @echo "installing my apps"
    flatpak install -y org.vinegarhq.Sober dev.vencord.Vesktop com.valvesoftware.Steam io.gitlab.librewolf-community org.gajim.Gajim

    @echo "Permissionizing..."
    flatpak override --user --filesystem=home io.gitlab.librewolf-community
    flatpak override --user --filesystem=host com.valvesoftware.Steam
    flatpak override --user --filesystem=home dev.vencord.Vesktop
    flatpak override --user --filesystem=home org.gajim.Gajim

stow:
    stow -t ~/.config config
    @echo "Stoweed"

unstow:
    stow -D -t ~/.config config

setup-displays:
    python init/swaysetupmonitors.py
    mv mute ~/.config/

restow:
    stow -R -t ~/.config config

# builds

build-wayfreeze:
    rm -rf /tmp/wayfreeze
    git clone https://github.com/Jappie3/wayfreeze.git /tmp/wayfreeze
    cd /tmp/wayfreeze && cargo build --release
    sudo mv /tmp/wayfreeze/target/release/wayfreeze /opt/bin/wayfreeze