#!/bin/sh
echo "Xorg and desktop setup"

# Ask for desktop environment choice
echo "Available options:"
echo "1) LXDE (lightweight)"
echo "2) XFCE (medium)"
echo "3) Minimal Xorg only"
read -p "Choice [1-3]: " choice

apt update
case "$choice" in
    1) apt install -y xorg lxde-core lightdm ;;
    2) apt install -y xorg xfce4 lightdm ;;
    3) apt install -y xorg ;;
    *) echo "Invalid choice"; exit 1 ;;
esac

# Enable display manager if installed
if command -v lightdm >/dev/null 2>&1; then
    systemctl enable lightdm
fi

echo "Xorg/desktop installation complete."
