#!/bin/bash

SCRIPTDIR=$(dirname "$(realpath "$0")")

USER_FONTCONFIG_FILE=$HOME/.config/fontconfig/fonts.conf
if [ ! -f "$USER_FONTCONFIG_FILE" ]; then
    echo "Copying custom font configuration for color emoji support"
    # Ensure custom font config folder exists (emoji support)
    mkdir -p "$(dirname "$USER_FONTCONFIG_FILE")"
    cp "$SCRIPTDIR"/../resources/app/resources/fontconfig/fonts.conf "$USER_FONTCONFIG_FILE"
fi

# This sleep is here because we seem to run into issues with pulse not being fully started before this service starts
sleep 15
