fully remove flavor and accent-specific catppuccin configs

This commit is contained in:
Sean Kovacs 2025-12-13 22:49:47 -05:00
commit 4ca5cebbb6
Signed by: sckova
GPG key ID: 00F325187C68651A
15 changed files with 276 additions and 364 deletions

View file

@ -6,10 +6,81 @@
}:
let
customPackage = pkgs.noctalia-shell-custom.override {
catppuccinFlavor = config.catppuccin.flavor;
catppuccinAccent = config.catppuccin.accent;
# Get the actual color palettes
darkPalette = pkgs.catppuccin.${config.catppuccin.flavor};
lightPalette = pkgs.catppuccin.latte;
# Create theme from palette
mkTheme = palette: accent: {
mPrimary = palette.${accent};
mOnPrimary = palette.crust;
mSecondary = palette.subtext0;
mOnSecondary = palette.crust;
mTertiary = palette.teal;
mOnTertiary = palette.crust;
mError = palette.red;
mOnError = palette.crust;
mSurface = palette.base;
mOnSurface = palette.text;
mSurfaceVariant = palette.surface0;
mOnSurfaceVariant = palette.lavender;
mOutline = palette.surface2;
mShadow = palette.crust;
mHover = palette.teal;
mOnHover = palette.crust;
};
# Build the complete color scheme
customScheme = {
dark = mkTheme darkPalette config.catppuccin.accent;
light = mkTheme lightPalette config.catppuccin.accent;
};
# Convert to JSON
schemeJson = builtins.toJSON customScheme;
# Write to file - escape for shell
schemeJsonEscaped = lib.escapeShellArg schemeJson;
customPackage = pkgs.noctalia-shell.overrideAttrs (oldAttrs: {
pname = "noctalia-shell-custom";
nativeBuildInputs = (oldAttrs.nativeBuildInputs or [ ]) ++ [ pkgs.jq ];
postPatch = (oldAttrs.postPatch or "") + ''
echo "Patching noctalia-shell with Cat-Custom theme..."
echo " Dark: ${config.catppuccin.flavor} / Light: latte"
echo " Accent: ${config.catppuccin.accent}"
if [ -d Assets/ColorScheme/Catppuccin ]; then
mkdir -p Assets/ColorScheme/Cat-Custom
# Write the JSON directly
cat > Assets/ColorScheme/Cat-Custom/Cat-Custom.json << 'COLORSCHEME_EOF'
${schemeJson}
COLORSCHEME_EOF
echo "Created Cat-Custom color scheme:"
${pkgs.jq}/bin/jq -C '.' Assets/ColorScheme/Cat-Custom/Cat-Custom.json || true
# Add translation entries
for lang in en fr de es pt zh-CN; do
if [ -f "Assets/Translations/$lang.json" ]; then
${pkgs.jq}/bin/jq \
'.["color-scheme"].predefined.schemes["Cat-Custom"] = "Cat-Custom"' \
"Assets/Translations/$lang.json" > "Assets/Translations/$lang.json.tmp" \
&& mv "Assets/Translations/$lang.json.tmp" "Assets/Translations/$lang.json"
fi
done
else
echo "ERROR: ColorScheme directory not found"
exit 1
fi
'';
meta = oldAttrs.meta // {
description = "${oldAttrs.meta.description} (Cat-Custom: ${config.catppuccin.flavor}/${config.catppuccin.accent})";
};
});
in
{
programs.noctalia-shell = {
@ -56,17 +127,27 @@ in
hideMode = "hidden";
id = "ActiveWindow";
maxWidth = 375;
scrollingMode = "hover";
scrollingMode = "always";
showIcon = true;
useFixedWidth = false;
}
{
id = "MediaMini";
}
];
center = [
];
right = [
{
hideMode = "hidden";
hideWhenIdle = false;
id = "MediaMini";
maxWidth = 350;
scrollingMode = "always";
showAlbumArt = false;
showArtistFirst = true;
showProgressRing = true;
showVisualizer = false;
useFixedWidth = false;
visualizerType = "linear";
}
{
id = "ScreenRecorder";
}
@ -389,7 +470,7 @@ in
useWallpaperColors = false;
predefinedScheme = "Cat-Custom";
darkMode = true;
schedulingMode = "on";
schedulingMode = "off";
manualSunrise = "06:30";
manualSunset = "18:30";
matugenSchemeType = "scheme-fruit-salad";