#!/bin/sh

set -ex

sudo pacman -Syu --noconfirm

# Install dev packages
sudo pacman -S --needed --noconfirm base-devel btop curl fish flatpak git hyfetch imagemagick python-pygments rustup stow
rustup install stable

# Install paru
git clone https://aur.archlinux.org/paru.git /tmp/paru
(cd /tmp/paru; makepkg -si --needed --noconfirm)

# Stow dotfiles
mkdir -p ~/.config/fish
stow */

# Setup fish shell
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher && fisher update"
sudo chsh $USER -s /usr/bin/fish

# File management
sudo pacman -S --needed --noconfirm atool ffmpegthumbnailer highlight mediainfo python-pillow ranger transmission-cli

# Audio
sudo pacman -S --needed --noconfirm easyeffects helvum pamixer pipewire pipewire-alsa pipewire-audio pipewire-jack pipewire-pulse playerctl wireplumber

# Codecs
sudo pacman -S --needed --noconfirm gst-libav gst-plugin-pipewire gst-plugins-base gst-plugins-good gstreamer gstreamer-vaapi libde265

# Greeter
sudo pacman -S --needed --noconfirm sddm
sudo systemctl enable sddm

# Window Manager
paru -S --needed --noconfirm brightnessctl fuzzel gammastep grim hyprland mako network-manager-applet polkit-kde-agent slurp swayidle swaylock-effects-git waybar xdg-desktop-portal-gtk xdg-desktop-portal-hyprland xdg-desktop-portal-wlr
mkdir -p ~/Pictures/Screenshots

# Fonts
sudo pacman -S --needed --noconfirm noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-firacode-nerd ttf-liberation wqy-zenhei

# GUI Applications
sudo pacman -S --needed --noconfirm discord firefox kitty