#!/usr/bin/env bash
set -e

# Nomarchy on-boot initialization script.
# Automatically detects the hardware, applies necessary runtime tweaks,
# and sets the correct screen resolution/scaling.

# 1. Automatically configure optimal screen resolution and scaling
nomarchy-hyprland-monitor-scaling-cycle >/dev/null 2>&1

# 2. Hardware-specific runtime tweaks
if nomarchy-hw-match "Laptop 16"; then
  # Framework 16 specific tweaks
  nomarchy-theme-set-keyboard-f16 >/dev/null 2>&1
fi

if nomarchy-hw-asus-rog; then
  # Asus ROG specific tweaks
  nomarchy-theme-set-keyboard-asus-rog >/dev/null 2>&1
fi

# 3. Hardware detection
# Superseded by the installer's hardware-db.sh and declarative selection.
exit 0
