Eidos

Installation Notice

The installation may currently fail. We recommend copying the code below and creating the extension manually in Eidos.

switch theme

By: Mayne

Install Latest (v0.0.1)

Rotates through available themes every 1 second

export async function switchTheme(input: Input, context: Context) {
  const themes = await eidos.currentSpace.theme.listThemes();

  if (!themes || themes.length === 0) {
    eidos.currentSpace.notify({
      title: "No Themes Found",
      description: "Could not find any themes to cycle through."
    });
    return;
  }

  for (let i = 0; i < themes.length; i++) {
    const themeIndex = i % themes.length;
    const { name } = themes[themeIndex];

    await eidos.currentSpace.theme.setCurrentTheme(name);
    // eidos.currentSpace.notify({
    //   title: "Theme Changed",
    //   description: `Current theme: ${name}`
    // });
    // Wait for 1 second before changing to the next theme
    await new Promise(resolve => setTimeout(resolve, 1000));
  }
}

export default switchTheme;

export const commands = [
  {
    name: "switchTheme",
    description: "Rotates through available themes every 1 second",
    inputJSONSchema: {
      type: "object",
      properties: {},
    },
    outputJSONSchema: {
      type: "object",
      properties: {},
    },
    asTableAction: false,
  },
];

Information

Author
Mayne
Type
script
Latest Version
0.0.1
Last Updated
06/16/2025
Published
06/16/2025

Version History

  • v0.0.1 06/16/2025