#!/bin/zsh
set -euo pipefail

script_dir="${0:A:h}"
target_dir="$HOME/Pictures/Cyryx Labs"
mkdir -p "$target_dir"
cp -f "$script_dir"/Wallpapers/* "$target_dir"/

wallpaper="$target_dir/Cyryx_Labs_Command_Platform_studio-display-5k-5120x2880.jpg"
if command -v osascript >/dev/null 2>&1; then
  osascript -e 'tell application "System Events" to tell every desktop to set picture to POSIX file "'"$wallpaper"'"'
fi

echo "Cyryx Labs wallpapers installed in: $target_dir"
echo "Recommended: System Settings > Appearance > Dark."
echo "No protected system file was changed."
open "x-apple.systempreferences:com.apple.Wallpaper-Settings.extension" 2>/dev/null || true
