#!/bin/bash
USER_CONFIG_DIR="$HOME/.config/Ambxst"
USER_DATA_DIR="$HOME/.local/share/Ambxst"
SYSTEM_DEFAULTS="/usr/share/ambxst/clean_configs"

if [ ! -d "$USER_CONFIG_DIR/config" ] || [ -z "$(ls -A $USER_CONFIG_DIR/config 2>/dev/null)" ]; then
    echo "Initializing Ambxst configuration..."
    mkdir -p "$USER_CONFIG_DIR/config"
    cp "$SYSTEM_DEFAULTS"/*.json "$USER_CONFIG_DIR/config/"
fi

if [ ! -f "$USER_DATA_DIR/colors.json" ]; then
    mkdir -p "$USER_DATA_DIR"
    echo '{ "primary": "#3daee9", "background": "#1a1a1a", "foreground": "#ffffff" }' > "$USER_DATA_DIR/colors.json"
fi

    
exec qs --config /usr/share/ambxst ""
  
