AppTitle
Spicetify provides a set of API methods to interact with the Spotify client app title.
namespace AppTitle { function set(title: string): Promise<{ clear: () => void }>; function reset(): Promise<void>; function get(): Promise<string>; function sub(callback: (title: string) => void): { clear: () => void };}Methods
set
Set the default app title and force it until canceled. This will override any previous forced title.
function set(title: string): Promise<{ clear: () => void }>;Parameters
| Name | Type | Description |
|---|---|---|
title | string | Title to set |
Returns
Promise that resolves to a function to cancel forced title. This doesn’t reset the title.
Example
await Spicetify.AppTitle.set("My Extension");reset
Reset app title to default.
function reset(): Promise<void>;Example
await Spicetify.AppTitle.reset(); // Spotify Premiumget
Get current default app title.
function get(): Promise<string>;Returns
Current default app title.
Example
const title = await Spicetify.AppTitle.get();console.log(title); // Spotify Premiumsub
Subscribe to title changes.
function sub(callback: (title: string) => void): { clear: () => void };Parameters
| Name | Type | Description |
|---|---|---|
callback | (title: string) => void | Callback to call when title changes |
Returns
Object with method to unsubscribe.
Example
const { clear } = Spicetify.AppTitle.sub((title) => { console.log(title);});
await Spicetify.AppTitle.set("My Extension"); // Console: My Extension
clear();