home(gui): switch to catppuccin module

This commit is contained in:
514fpv 2024-06-24 09:56:31 +08:00
parent 9004bed15f
commit 40e13e9db6
Signed by: koishi
SSH key fingerprint: SHA256:2jRvFSzG5UeUlQ3WxZ2sbUOfo5wNKzv1fZsk/FexKjQ
13 changed files with 91 additions and 361 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

View file

@ -1,135 +0,0 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.catppuccin;
palette = (import ./palette.nix).${cfg.palette};
in mkIf cfg.enable {
# cursor theme
home.pointerCursor = { inherit (cfg.cursor) package name; };
gtk.cursorTheme = { inherit (cfg.cursor) package name; };
# gtk theme
gtk.theme = { inherit (cfg.gtk) package name; };
gtk.iconTheme = {
package = pkgs.catppuccin-papirus-folders.override {
flavor = cfg.palette;
accent = "pink";
};
name = "Papirus-Dark";
};
# sway colour palette override
wayland.windowManager.sway.config = {
colors = with palette; {
focused = { border = lavender; background = base; text = text; indicator = rosewater; childBorder = lavender; };
focusedInactive = { border = overlay0; background = base; text = text; indicator = rosewater; childBorder = overlay0; };
unfocused = { border = overlay0; background = base; text = text; indicator = rosewater; childBorder = overlay0; };
urgent = { border = peach; background = base; text = peach; indicator = overlay0; childBorder = peach; };
placeholder = { border = overlay0; background = base; text = text; indicator = overlay0; childBorder = overlay0; };
background = base;
};
bars = mkForce [ {
colors = let
p = palette;
in {
background = p.base;
statusline = p.text;
focusedStatusline = p.text;
focusedSeparator = p.base;
focusedWorkspace = { border = p.base; background = p.base; text = p.green; };
activeWorkspace = { border = p.base; background = p.base; text = p.blue; };
inactiveWorkspace = { border = p.base; background = p.base; text = p.surface1; };
urgentWorkspace = { border = p.base; background = p.base; text = p.surface1; };
bindingMode = { border = p.base; background = p.base; text = p.surface1; };
};
mode = "dock";
position = "bottom";
workspaceButtons = true;
workspaceNumbers = true;
statusCommand = "${pkgs.i3status}/bin/i3status";
fonts = {
names = [ "monospace" ];
size = 8.0;
};
trayOutput = "primary";
} ];
output."*".bg = mkForce "${./flake.png} fill";
gaps.inner = 12;
gaps.outer = 5;
# dodge the status bar
gaps.bottom = 0;
};
# swaylock colour palette override
programs.swaylock.settings = with palette; let
transparent = "00000000";
in {
color = base;
bs-hl-color = rosewater;
caps-lock-bs-hl-color = rosewater;
caps-lock-key-hl-color = green;
inside-color = transparent;
inside-clear-color = transparent;
inside-caps-lock-color = transparent;
inside-ver-color = transparent;
inside-wrong-color = transparent;
key-hl-color = green;
layout-bg-color = transparent;
layout-border-color = transparent;
layout-text-color = text;
line-color = transparent;
line-clear-color = transparent;
line-caps-lock-color = transparent;
line-ver-color = transparent;
line-wrong-color = transparent;
ring-color = lavender;
ring-clear-color = rosewater;
ring-caps-lock-color = peach;
ring-ver-color = blue;
ring-wrong-color = maroon;
separator-color = transparent;
text-color = text;
text-clear-color = rosewater;
text-caps-lock-color = peach;
text-ver-color = blue;
text-wrong-color = maroon;
};
# i3status colour palette override
programs.i3status.general = with palette; {
color_good = lavender;
color_degraded = yellow;
color_bad = red;
};
# mako colour palette override
services.mako = with palette; {
backgroundColor = base;
textColor = text;
borderColor = blue;
progressColor = "over ${surface0}";
extraConfig = ''
[urgency=high]
border-color=${peach}
'';
};
# foot colour palette override
programs.foot.settings.colors = with palette; let
c = substring 1 7;
in {
foreground = c text; background = c base;
regular0 = c overlay2; regular1 = c red;
regular2 = c green; regular3 = c yellow;
regular4 = c blue; regular5 = c pink;
regular6 = c teal; regular7 = c surface2;
bright0 = c subtext0; bright1 = c red;
bright2 = c green; bright3 = c yellow;
bright4 = c blue; bright5 = c pink;
bright6 = c teal; bright7 = c surface1;
};
}

View file

@ -1,71 +0,0 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
cfg = config.home.catppuccin;
in {
options.home.catppuccin = {
enable = mkEnableOption "catppuccin colour scheme" // { default = gui; };
palette = mkOption {
type = with types; str;
default = "frappe";
description = "colour palette in use";
};
gtk = {
package = mkOption {
type = with types; package;
default = pkgs.catppuccin-gtk.override {
accents = [ "pink" ];
size = "compact";
#tweaks = [ "rimless" "black" ];
variant = "frappe";
};
description = "catppuccin gtk theme package";
};
name = mkOption {
type = with types; str;
default = "Catppuccin-Frappe-Compact-Pink-Dark";
description = "name of catppuccin gtk theme";
};
};
cursor = {
package = mkOption {
type = with types; package;
default = pkgs.catppuccin-cursors.frappeDark;
description = "catppuccin cursor theme package";
};
name = mkOption {
type = with types; str;
default = "Catppuccin-Frappe-Dark-Cursors";
description = "name of catppuccin cursor theme";
};
};
};
config = {
users.homeModules = [
# this module passes catppuccin configuration to home-manager
{ passthrough.catppuccin = cfg; }
];
# gtk and cursor themes
environment.systemPackages = with cfg; mkIf cfg.enable [
gtk.package cursor.package
];
# override greetd theme
programs.regreet = mkIf cfg.enable {
settings = {
background.path = ./solid.png;
GTK = {
theme_name = cfg.gtk.name;
cursor_theme_name = cfg.cursor.name;
};
};
};
};
}

View file

@ -1,117 +0,0 @@
{
latte = {
rosewater = "#dc8a78";
flamingo = "#dd7878";
pink = "#ea76cb";
mauve = "#8839ef";
red = "#d20f39";
maroon = "#e64553";
peach = "#fe640b";
yellow = "#df8e1d";
green = "#40a02b";
teal = "#179299";
sky = "#04a5e5";
sapphire = "#209fb5";
blue = "#1e66f5";
lavender = "#7287fd";
text = "#4c4f69";
subtext1 = "#5c5f77";
subtext0 = "#6c6f85";
overlay2 = "#7c7f93";
overlay1 = "#8c8fa1";
overlay0 = "#9ca0b0";
surface2 = "#acb0be";
surface1 = "#bcc0cc";
surface0 = "#ccd0da";
base = "#eff1f5";
mantle = "#e6e9ef";
crust = "#dce0e8";
};
frappe = {
rosewater = "#f2d5cf";
flamingo = "#eebebe";
pink = "#f4b8e4";
mauve = "#ca9ee6";
red = "#e78284";
maroon = "#ea999c";
peach = "#ef9f76";
yellow = "#e5c890";
green = "#a6d189";
teal = "#81c8be";
sky = "#99d1db";
sapphire = "#85c1dc";
blue = "#8caaee";
lavender = "#babbf1";
text = "#c6d0f5";
subtext1 = "#b5bfe2";
subtext0 = "#a5adce";
overlay2 = "#949cbb";
overlay1 = "#838ba7";
overlay0 = "#737994";
surface2 = "#626880";
surface1 = "#51576d";
surface0 = "#414559";
base = "#303446";
mantle = "#292c3c";
crust = "#232634";
};
macchiato = {
rosewater = "#f4dbd6";
flamingo = "#f0c6c6";
pink = "#f5bde6";
mauve = "#c6a0f6";
red = "#ed8796";
maroon = "#ee99a0";
peach = "#f5a97f";
yellow = "#eed49f";
green = "#a6da95";
teal = "#8bd5ca";
sky = "#91d7e3";
sapphire = "#7dc4e4";
blue = "#8aadf4";
lavender = "#b7bdf8";
text = "#cad3f5";
subtext1 = "#b8c0e0";
subtext0 = "#a5adcb";
overlay2 = "#939ab7";
overlay1 = "#8087a2";
overlay0 = "#6e738d";
surface2 = "#5b6078";
surface1 = "#494d64";
surface0 = "#363a4f";
base = "#24273a";
mantle = "#1e2030";
crust = "#181926";
};
mocha = {
rosewater = "#f5e0dc";
flamingo = "#f2cdcd";
pink = "#f5c2e7";
mauve = "#cba6f7";
red = "#f38ba8";
maroon = "#eba0ac";
peach = "#fab387";
yellow = "#f9e2af";
green = "#a6e3a1";
teal = "#94e2d5";
sky = "#89dceb";
sapphire = "#74c7ec";
blue = "#89b4fa";
lavender = "#b4befe";
text = "#cdd6f4";
subtext1 = "#bac2de";
subtext0 = "#a6adc8";
overlay2 = "#9399b2";
overlay1 = "#7f849c";
overlay0 = "#6c7086";
surface2 = "#585b70";
surface1 = "#45475a";
surface0 = "#313244";
base = "#1e1e2e";
mantle = "#181825";
crust = "#11111b";
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View file

@ -1,15 +1,17 @@
{ pkgs
, lib
, config
, ... }: with lib; {
imports = [ ./catppuccin/home.nix ];
, ... }: with lib; let
catppuccin = config.passthrough.catppuccin.enable;
in {
config = mkIf config.passthrough.gui {
# cursor theme
home.pointerCursor = mkDefault {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
home.pointerCursor = {
package = mkDefault pkgs.bibata-cursors;
name = mkDefault "Bibata-Modern-Classic";
size = 24;
x11.enable = true;
gtk.enable = true;
};
# gtk theme

View file

@ -5,8 +5,6 @@
gui = with config.global.gpu; enable && session;
catppuccin = config.home.catppuccin;
in {
imports = [ ./catppuccin/nixos.nix ];
config = {
users.homeModules = [
# this module passes gui configuration to home-manager