105 lines
2.9 KiB
Nix
105 lines
2.9 KiB
Nix
{ inputs, config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.desktop.themes;
|
|
accent = "pink";
|
|
variant = "mocha";
|
|
|
|
dark = variant != "latte";
|
|
colorScheme = inputs.nix-colors.colorSchemes.${"catppuccin-${variant}"};
|
|
pascalCase = s: (toUpper (substring 0 1 s)) + (toLower (substring 1 (stringLength s) s));
|
|
in {
|
|
config = mkIf (cfg.active == "catppuccin") {
|
|
colorScheme = colorScheme;
|
|
|
|
modules.desktop.themes = {
|
|
dark = dark;
|
|
|
|
gtkTheme = {
|
|
name = "catppuccin-${variant}-${accent}-compact+rimless";
|
|
package = pkgs.catppuccin-gtk.override {
|
|
variant = variant;
|
|
accents = [ accent ];
|
|
tweaks = [ "rimless" ];
|
|
size = "compact";
|
|
};
|
|
};
|
|
|
|
kvantumTheme = {
|
|
name = "catppuccin-${variant}-${accent}";
|
|
package = pkgs.catppuccin-kvantum.override {
|
|
variant = variant;
|
|
accent = accent;
|
|
};
|
|
};
|
|
|
|
iconTheme = {
|
|
name = "WhiteSur-${if dark then "dark" else "light"}";
|
|
package = pkgs.whitesur-icon-theme;
|
|
};
|
|
|
|
cursorTheme = {
|
|
name = "graphite-${if dark then "dark" else "light"}";
|
|
package = pkgs.graphite-cursors;
|
|
size = 24;
|
|
};
|
|
|
|
editor = {
|
|
vscode = {
|
|
colorTheme = {
|
|
name = "Catppuccin ${pascalCase variant}";
|
|
extension = (pkgs.vscode-extensions.catppuccin.catppuccin-vsc.override {
|
|
accent = accent;
|
|
boldKeywords = false;
|
|
italicComments = false;
|
|
italicKeywords = false;
|
|
extraBordersEnabled = false;
|
|
workbenchMode = "flat";
|
|
bracketMode = "rainbow";
|
|
});
|
|
};
|
|
iconTheme = {
|
|
name = "material-icon-theme";
|
|
extension = pkgs.vscode-extensions.pkief.material-icon-theme;
|
|
};
|
|
};
|
|
};
|
|
|
|
niri = with colorScheme.palette; {
|
|
# TODO: make more dynamic
|
|
# catppuccin pink
|
|
accent = "#f5c2e7";
|
|
inactive = "#${base02}";
|
|
# catppuccin crust
|
|
shadow = "#11111b";
|
|
# catppuccin crust
|
|
background = "#11111b";
|
|
};
|
|
|
|
waybar = builtins.concatStringsSep "\n" [
|
|
"@import \"${inputs.waybar-catppuccin}/themes/${variant}.css\";"
|
|
"@define-color accent @${accent};"
|
|
(lib.readFile ./waybar.css)
|
|
];
|
|
|
|
wob = with colorScheme.palette; {
|
|
borderColor = "${base04}FF";
|
|
backgroundColor = "${base01}66";
|
|
barColor = "${base05}FF";
|
|
};
|
|
|
|
rofi = builtins.concatStringsSep "\n" [
|
|
"@theme \"${inputs.rofi-catppuccin}/themes/catppuccin-${variant}.rasi\""
|
|
"* { accent: @${accent}; }"
|
|
(lib.readFile ./rofi.rasi)
|
|
];
|
|
|
|
fuzzel = "${inputs.fuzzel-catppuccin}/themes/catppuccin-${variant}/${accent}.ini";
|
|
|
|
wezterm = ''
|
|
config.color_scheme = 'Catppuccin ${pascalCase variant}'
|
|
'';
|
|
};
|
|
};
|
|
}
|