Skip to main content

Config

To make it easier for you to validate and debug your extensions, Spicetify provides a filtered copy of the user's config-xpui.ini in the Spicetify object.

interface Config {
version: string;
current_theme: string;
color_scheme: string;
extensions: string[];
custom_apps: string[];
}
PropertyTypeDescription
versionstringSpicetify version.
current_themestringCurrent theme name.
color_schemestringCurrent color scheme name.
extensionsstring[]List of enabled extensions.
custom_appsstring[]List of enabled custom apps.

Usage

You can validate if the user currently has a custom app or a theme enabled by checking if the app or theme's name is included in the custom_apps or current_theme property of the Config object.

const { Config } = Spicetify;

if (Config.custom_apps.includes("lyrics-plus")) {
// Do something
}

This can ensure that your extension doesn't break if the user doesn't have the requried app or theme installed.