#!/bin/bash

set -e

mkdir -p "$HOME/.config"
mkdir -p "$HOME/wallpapers"

sudo pacman -Syu --noconfirm \
    code \
    ghostty \
    thunar \
    ttf-jetbrains-mono-nerd \
    ttf-font-awesome \
    stow \
    nwg-look \
    nwg-displays \
    cmake \
    meson \
    cpio \
    network-manager-applet \
    nm-connection-editor \
    pavucontrol \
    orchis-theme \
    brightnessctl \
    mako \
    slurp \
    grim \
    wl-clipboard \
    rofi

if ! command -v yay 2>&1 >/dev/null
then
    sudo pacman -S --needed --noconfirm  git base-devel
    git clone https://aur.archlinux.org/yay-bin.git
    cd yay-bin
    makepkg -si
    cd ../
    rm -rf yay-bin
fi

yay -Syu --noconfirm  \
    hyprpaper-git \
    hyprpicker-git \
    hyprlock-git \
    hyprpolkitagent-git \
    hyprsysteminfo-git \
    hyprland-qt-support-git \
    hyprcursor-git \
    hyprutils-git \
    hyprlang-git \
    hyprwayland-scanner-git \
    xdg-desktop-portal-hyprland-git \
    aquamarine-git \
    hyprgraphics-git \
    hyprland-qtutils-git \
    hyprland-git \
    librewolf-bin

hyprpm add https://github.com/Duckonaut/split-monitor-workspaces
hyprpm enable split-monitor-workspaces
hyprpm reload