From 83c3480570729c333aa761eae50267ebc56ce593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 4 Feb 2024 14:54:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20remove(spicetify):=20fo?= =?UTF-8?q?rgot=20to=20remove=20the=20js=20file=20for=20catppuccin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/catppuccin-macchiato.js | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 .config/spicetify/Extensions/catppuccin-macchiato.js diff --git a/.config/spicetify/Extensions/catppuccin-macchiato.js b/.config/spicetify/Extensions/catppuccin-macchiato.js deleted file mode 100644 index b0c536c4..00000000 --- a/.config/spicetify/Extensions/catppuccin-macchiato.js +++ /dev/null @@ -1,39 +0,0 @@ -// Color map -let colorPalette = { - rosewater: "#f4dbd6", - flamingo: "#f0c6c6", - pink: "#f5bde6", - maroon: "#ee99a0", - red: "#ed8796", - peach: "#f5a97f", - yellow: "#eed49f", - green: "#a6da95", - teal: "#8bd5ca", - blue: "#8aadf4", - sky: "#91d7e3", - lavender: "#b7bdf8", - white: "#d9e0ee" -} - -// waitForElement borrowed from: -// https://github.com/morpheusthewhite/spicetify-themes/blob/master/Dribbblish/dribbblish.js -function waitForElement(els, func, timeout = 100) { - const queries = els.map(el => document.querySelector(el)); - if (queries.every(a => a)) { - func(queries); - } else if (timeout > 0) { - setTimeout(waitForElement, 300, els, func, --timeout); - } -} - -// Return the color label for a given hex color value -function getKeyByValue(object, value) { - return Object.keys(object).find(key => object[key] === value.trim()); -} - -// Used to select matching equalizer-animated-COLOR.gif -waitForElement([".Root"], (root) => { - let spiceEq = getComputedStyle(document.querySelector(":root")).getPropertyValue("--spice-equalizer"); - let eqColor = getKeyByValue(colorPalette, spiceEq); - root[0].classList.add(`catppuccin-eq-${eqColor}`); -});