Migrate to chezmoi
Move config files from config to chezmoi Add script to auto install packages with DNF and Cargo
This commit is contained in:
parent
110e0882c6
commit
224c7ed45c
1654 changed files with 470035 additions and 51 deletions
39
chezmoi/dot_config/spicetify/Extensions/catppuccin-latte.js
Normal file
39
chezmoi/dot_config/spicetify/Extensions/catppuccin-latte.js
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// Color map
|
||||
let colorPalette = {
|
||||
rosewater: "#dc8a78",
|
||||
flamingo: "#dd7878",
|
||||
pink: "#ea76cb",
|
||||
maroon: "#e64553",
|
||||
red: "#d20f39",
|
||||
peach: "#fe640b",
|
||||
yellow: "#df8e1d",
|
||||
green: "#40a02b",
|
||||
teal: "#179299",
|
||||
blue: "#1e66f5",
|
||||
sky: "#04a5e5",
|
||||
lavender: "#7287fd",
|
||||
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}`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue