fully remove flavor and accent-specific catppuccin configs
This commit is contained in:
parent
930b13700a
commit
4ca5cebbb6
15 changed files with 276 additions and 364 deletions
|
|
@ -63,7 +63,11 @@ in
|
|||
package = pkgs.colloid-icon-theme;
|
||||
};
|
||||
|
||||
# cursor theme handled in home/hosts/host.nix and in config.kdl
|
||||
cursorTheme = {
|
||||
name = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-cursors";
|
||||
package = pkgs.catppuccin-cursors."${config.catppuccin.flavor}${config.catppuccinUpper.accent}";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
|
|
@ -103,7 +107,6 @@ in
|
|||
# };
|
||||
};
|
||||
|
||||
# Cursor / icon env vars for GTK and Qt apps
|
||||
xsession = {
|
||||
enable = true; # only needed for session variable injection
|
||||
windowManager.command = "niri"; # launches niri directly
|
||||
|
|
@ -114,6 +117,7 @@ in
|
|||
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
prefer-no-csd = true;
|
||||
gestures.hot-corners.enable = false;
|
||||
spawn-at-startup = [
|
||||
{
|
||||
command = [
|
||||
|
|
@ -150,6 +154,10 @@ in
|
|||
drag = false;
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
DISPLAY = null;
|
||||
};
|
||||
outputs = {
|
||||
"eDP-1" = {
|
||||
scale = 1.75;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import "./mocha.css";
|
||||
@import "./colors.css";
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
catppuccin-waybar = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "waybar";
|
||||
rev = "ee8ed32b4f63e9c417249c109818dcc05a2e25da";
|
||||
sha256 = "sha256-za0y6hcN2rvN6Xjf31xLRe4PP0YyHu2i454ZPjr+lWA=";
|
||||
};
|
||||
|
||||
mergedConfig = pkgs.runCommand "mergedConfig" { } ''
|
||||
mkdir -p $out
|
||||
cp -rv ${./config}/* $out/
|
||||
cp -v ${catppuccin-waybar}/themes/${config.catppuccin.flavor}.css $out/colors.css
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.file.".config/waybar" = {
|
||||
source = ./config;
|
||||
source = mergedConfig;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue