add conversion functions to catppuccin module

This commit is contained in:
KoenDR06 2025-12-24 17:57:24 +01:00
parent 7f5c5b718f
commit 82a11ef821
10 changed files with 663 additions and 391 deletions

View file

@ -0,0 +1,34 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption catppuccin;
cfg = config.horseman.dots.fuzzel;
username = config.horseman.username;
colors = config.horseman.catppuccin.colors;
accent = config.horseman.catppuccin.accent;
in {
options = {
horseman.dots.fuzzel = {
enable = mkEnableOption "~/.config/fuzzel/fuzzel.ini";
};
};
config = mkIf cfg.enable {
home-manager.users.${username}.xdg.configFile."fuzzel/fuzzel.ini".text = ''
[colors]
background=${catppuccin.toHexNoHash colors.base}dd
text=${catppuccin.toHexNoHash colors.text}ff
prompt=${catppuccin.toHexNoHash colors.subtext1}ff
placeholder=${catppuccin.toHexNoHash colors.overlay1}ff
input=${catppuccin.toHexNoHash colors.text}ff
match=${catppuccin.toHexNoHash colors.${accent}}ff
selection=${catppuccin.toHexNoHash colors.surface2}ff
selection-text=${catppuccin.toHexNoHash colors.text}ff
selection-match=${catppuccin.toHexNoHash colors.${accent}}ff
counter=${catppuccin.toHexNoHash colors.overlay1}ff
border=${catppuccin.toHexNoHash colors.${accent}}ff
'';
};
}

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption mkOption types; inherit (lib) mkIf mkEnableOption mkOption types catppuccin;
cfg = config.horseman.dots.kitty; cfg = config.horseman.dots.kitty;
username = config.horseman.username; username = config.horseman.username;
colors = config.horseman.catppuccin.colors; colors = config.horseman.catppuccin.colors;
@ -33,75 +33,75 @@ in {
font_size ${toString cfg.fontSize} font_size ${toString cfg.fontSize}
# The basic colors # The basic colors
foreground ${colors.text} foreground ${catppuccin.toHex colors.text}
background ${colors.base} background ${catppuccin.toHex colors.base}
selection_foreground ${colors.base} selection_foreground ${catppuccin.toHex colors.base}
selection_background ${colors.rosewater} selection_background ${catppuccin.toHex colors.rosewater}
# Cursor colors # Cursor colors
cursor ${colors.rosewater} cursor ${catppuccin.toHex colors.rosewater}
cursor_text_color ${colors.base} cursor_text_color ${catppuccin.toHex colors.base}
# URL underline color when hovering with mouse # URL underline color when hovering with mouse
url_color ${colors.rosewater} url_color ${catppuccin.toHex colors.rosewater}
# Kitty window border colors # Kitty window border colors
active_border_color ${colors.lavender} active_border_color ${catppuccin.toHex colors.lavender}
inactive_border_color ${colors.overlay0} inactive_border_color ${catppuccin.toHex colors.overlay0}
bell_border_color ${colors.yellow} bell_border_color ${catppuccin.toHex colors.yellow}
# OS Window titlebar colors # OS Window titlebar colors
wayland_titlebar_color system wayland_titlebar_color system
macos_titlebar_color system macos_titlebar_color system
# Tab bar colors # Tab bar colors
active_tab_foreground ${colors.crust} active_tab_foreground ${catppuccin.toHex colors.crust}
active_tab_background ${colors.mauve} active_tab_background ${catppuccin.toHex colors.mauve}
inactive_tab_foreground ${colors.text} inactive_tab_foreground ${catppuccin.toHex colors.text}
inactive_tab_background ${colors.mantle} inactive_tab_background ${catppuccin.toHex colors.mantle}
tab_bar_background ${colors.crust} tab_bar_background ${catppuccin.toHex colors.crust}
# Colors for marks (marked text in the terminal) # Colors for marks (marked text in the terminal)
mark1_foreground ${colors.base} mark1_foreground ${catppuccin.toHex colors.base}
mark1_background ${colors.lavender} mark1_background ${catppuccin.toHex colors.lavender}
mark2_foreground ${colors.base} mark2_foreground ${catppuccin.toHex colors.base}
mark2_background ${colors.mauve} mark2_background ${catppuccin.toHex colors.mauve}
mark3_foreground ${colors.base} mark3_foreground ${catppuccin.toHex colors.base}
mark3_background ${colors.sapphire} mark3_background ${catppuccin.toHex colors.sapphire}
# The 16 terminal colors # The 16 terminal colors
# black # black
color0 ${colors.surface1} color0 ${catppuccin.toHex colors.surface1}
color8 ${colors.surface2} color8 ${catppuccin.toHex colors.surface2}
# red # red
color1 ${colors.red} color1 ${catppuccin.toHex colors.red}
color9 ${colors.red} color9 ${catppuccin.toHex colors.red}
# green # green
color2 ${colors.green} color2 ${catppuccin.toHex colors.green}
color10 ${colors.green} color10 ${catppuccin.toHex colors.green}
# yellow # yellow
color3 ${colors.yellow} color3 ${catppuccin.toHex colors.yellow}
color11 ${colors.yellow} color11 ${catppuccin.toHex colors.yellow}
# blue # blue
color4 ${colors.blue} color4 ${catppuccin.toHex colors.blue}
color12 ${colors.blue} color12 ${catppuccin.toHex colors.blue}
# magenta # magenta
color5 ${colors.mauve} color5 ${catppuccin.toHex colors.mauve}
color13 ${colors.mauve} color13 ${catppuccin.toHex colors.mauve}
# cyan # cyan
color6 ${colors.teal} color6 ${catppuccin.toHex colors.teal}
color14 ${colors.teal} color14 ${catppuccin.toHex colors.teal}
# white # white
color7 ${colors.subtext1} color7 ${catppuccin.toHex colors.subtext1}
color15 ${colors.subtext0} color15 ${catppuccin.toHex colors.subtext0}
''; '';
}; };
} }

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption catppuccin;
cfg = config.horseman.dots.waybar; cfg = config.horseman.dots.waybar;
username = config.horseman.username; username = config.horseman.username;
colors = config.horseman.catppuccin.colors; colors = config.horseman.catppuccin.colors;
@ -26,33 +26,33 @@ in {
} }
.modules-left, .modules-center, .modules-right { .modules-left, .modules-center, .modules-right {
border: 2px solid ${colors.${accent}}; border: 2px solid ${catppuccin.toHex colors.${accent}};
border-radius: 10px; border-radius: 10px;
margin: 5px; margin: 5px;
background: ${colors.base}; background: ${catppuccin.toHex colors.base};
color: ${colors.text}; color: ${catppuccin.toHex colors.text};
} }
#power { #power {
padding-left: 10px; padding-left: 10px;
} }
#idle_inhibitor.activated { #idle_inhibitor.activated {
color: ${colors.red}; color: ${catppuccin.toHex colors.red};
} }
#power * { #power * {
color: ${colors.${accent}}; color: ${catppuccin.toHex colors.${accent}};
transition: 0.2s color ease; transition: 0.2s color ease;
font-size: 26px; font-size: 26px;
} }
#power *:hover { #power *:hover {
color: ${colors.red}; color: ${catppuccin.toHex colors.red};
} }
#workspaces .empty { #workspaces .empty {
color: ${colors.surface0}; color: ${catppuccin.toHex colors.surface0};
} }
#workspaces .active { #workspaces .active {
color: ${colors.red}; color: ${catppuccin.toHex colors.red};
font-size: 18px; font-size: 18px;
} }
#workspaces * { #workspaces * {
@ -62,27 +62,27 @@ in {
} }
#workspaces > * { #workspaces > * {
color: ${colors.${accent}}; color: ${catppuccin.toHex colors.${accent}};
} }
#clock { #clock {
color: ${colors.peach}; color: ${catppuccin.toHex colors.peach};
} }
#battery { #battery {
color: ${colors.maroon}; color: ${catppuccin.toHex colors.maroon};
} }
#cpu { #cpu {
color: ${colors.red}; color: ${catppuccin.toHex colors.red};
} }
#memory { #memory {
color: ${colors.mauve}; color: ${catppuccin.toHex colors.mauve};
} }
#pulseaudio { #pulseaudio {
color: ${colors.blue}; color: ${catppuccin.toHex colors.blue};
} }
#network { #network {
color: ${colors.teal}; color: ${catppuccin.toHex colors.teal};
} }
.horizontal .modules-right { .horizontal .modules-right {
font-size: 16px; font-size: 16px;

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption catppuccin;
cfg = config.horseman.dots.wofi; cfg = config.horseman.dots.wofi;
username = config.horseman.username; username = config.horseman.username;
colors = config.horseman.catppuccin.colors; colors = config.horseman.catppuccin.colors;
@ -26,9 +26,9 @@ in {
window { window {
margin: 0px; margin: 0px;
padding: 10px; padding: 10px;
border: 3px solid ${colors.${accent}}; border: 3px solid ${catppuccin.toHex colors.${accent}};
border-radius: 10px; border-radius: 10px;
background-color: ${builtins.replaceStrings ["rgb" ")"] ["rgba" ", 0.99)"] colors.base-rgb}; background-color: ${catppuccin.toRGBA colors.base 0.99};
/* animation: slideIn 0.5s ease-in-out both; */ /* animation: slideIn 0.5s ease-in-out both; */
} }
@ -48,7 +48,7 @@ in {
margin: 5px; margin: 5px;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${colors.base}; background-color: ${catppuccin.toHex colors.base};
/* animation: fadeIn 0.5s ease-in-out both; */ /* animation: fadeIn 0.5s ease-in-out both; */
} }
@ -68,7 +68,7 @@ in {
margin: 5px; margin: 5px;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${colors.base}; background-color: ${catppuccin.toHex colors.base};
} }
/* Scroll */ /* Scroll */
@ -76,63 +76,63 @@ in {
margin: 0px; margin: 0px;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${colors.base}; background-color: ${catppuccin.toHex colors.base};
} }
/* Input */ /* Input */
#input { #input {
margin: 5px 20px; margin: 5px 20px;
padding: 10px; padding: 10px;
border: 2px solid ${colors.${accent}}; border: 2px solid ${catppuccin.toHex colors.${accent}};
border-radius: 10px; border-radius: 10px;
color: ${colors.text}; color: ${catppuccin.toHex colors.text};
background-color: ${colors.base}; background-color: ${catppuccin.toHex colors.base};
/* animation: fadeIn 0.5s ease-in-out both; */ /* animation: fadeIn 0.5s ease-in-out both; */
} }
#input image { #input image {
border: none; border: none;
color: ${colors.red}; color: ${catppuccin.toHex colors.red};
} }
#input * { #input * {
outline: 4px solid ${colors.red}!important; outline: 4px solid ${catppuccin.toHex colors.red}!important;
} }
/* Text */ /* Text */
#text { #text {
margin: 5px; margin: 5px;
border: none; border: none;
color: ${colors.text}; color: ${catppuccin.toHex colors.text};
/* animation: fadeIn 0.5s ease-in-out both; */ /* animation: fadeIn 0.5s ease-in-out both; */
} }
#entry { #entry {
background-color: ${colors.base}; background-color: ${catppuccin.toHex colors.base};
} }
#entry arrow { #entry arrow {
border: none; border: none;
color: ${colors.${accent}}; color: ${catppuccin.toHex colors.${accent}};
} }
/* Selected Entry */ /* Selected Entry */
#entry:selected arrow { #entry:selected arrow {
overflow: hidden; overflow: hidden;
color: ${colors.mauve}; color: ${catppuccin.toHex colors.mauve};
} }
#entry:selected { #entry:selected {
border: 1px solid ${colors.${accent}}; border: 1px solid ${catppuccin.toHex colors.${accent}};
border-radius: 10px; border-radius: 10px;
} }
#entry:selected #text { #entry:selected #text {
color: ${colors.mauve}; color: ${catppuccin.toHex colors.mauve};
} }
#entry:drop(active) { #entry:drop(active) {
background-color: ${colors.${accent}}!important; background-color: ${catppuccin.toHex colors.${accent}}!important;
} }
''; '';
}; };

View file

@ -46,13 +46,15 @@
"x86_64-darwin" "x86_64-darwin"
]; ];
forAllSystems = nixpkgs.lib.genAttrs systems; forAllSystems = nixpkgs.lib.genAttrs systems;
lib = import ./overlays {inherit inputs;};
in { in {
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
nixosConfigurations = nixpkgs.lib.genAttrs hosts (host: nixosConfigurations = nixpkgs.lib.genAttrs hosts (host:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs lib;
}; };
modules = [ modules = [
./lib ./lib

View file

@ -8,4 +8,6 @@
horseman.stateVersion = "24.11"; horseman.stateVersion = "24.11";
networking.hostName = "terra"; networking.hostName = "terra";
programs.niri.enable = true;
} }

View file

@ -9,324 +9,532 @@
flavors = { flavors = {
mocha = { mocha = {
rosewater = "#f5e0dc"; rosewater = {
rosewater-rgb = "rgb(245, 224, 220)"; red = 245;
rosewater-hsl = "hsl(10, 56%, 91%)"; green = 224;
flamingo = "#f2cdcd"; blue = 220;
flamingo-rgb = "rgb(242, 205, 205)"; };
flamingo-hsl = "hsl(0, 59%, 88%)"; flamingo = {
pink = "#f5c2e7"; red = 242;
pink-rgb = "rgb(245, 194, 231)"; green = 205;
pink-hsl = "hsl(316, 72%, 86%)"; blue = 205;
mauve = "#cba6f7"; };
mauve-rgb = "rgb(203, 166, 247)"; pink = {
mauve-hsl = "hsl(267, 84%, 81%)"; red = 245;
red = "#f38ba8"; green = 194;
red-rgb = "rgb(243, 139, 168)"; blue = 231;
red-hsl = "hsl(343, 81%, 75%)"; };
maroon = "#eba0ac"; mauve = {
maroon-rgb = "rgb(235, 160, 172)"; red = 203;
maroon-hsl = "hsl(350, 65%, 77%)"; green = 166;
peach = "#fab387"; blue = 247;
peach-rgb = "rgb(250, 179, 135)"; };
peach-hsl = "hsl(23, 92%, 75%)"; red = {
yellow = "#f9e2af"; red = 243;
yellow-rgb = "rgb(249, 226, 175)"; green = 139;
yellow-hsl = "hsl(41, 86%, 83%)"; blue = 168;
green = "#a6e3a1"; };
green-rgb = "rgb(166, 227, 161)"; maroon = {
green-hsl = "hsl(115, 54%, 76%)"; red = 235;
teal = "#94e2d5"; green = 160;
teal-rgb = "rgb(148, 226, 213)"; blue = 172;
teal-hsl = "hsl(170, 57%, 73%)"; };
sky = "#89dceb"; peach = {
sky-rgb = "rgb(137, 220, 235)"; red = 250;
sky-hsl = "hsl(189, 71%, 73%)"; green = 179;
sapphire = "#74c7ec"; blue = 135;
sapphire-rgb = "rgb(116, 199, 236)"; };
sapphire-hsl = "hsl(199, 76%, 69%)"; yellow = {
blue = "#89b4fa"; red = 249;
blue-rgb = "rgb(137, 180, 250)"; green = 226;
blue-hsl = "hsl(217, 92%, 76%)"; blue = 175;
lavender = "#b4befe"; };
lavender-rgb = "rgb(180, 190, 254)"; green = {
lavender-hsl = "hsl(232, 97%, 85%)"; red = 166;
text = "#cdd6f4"; green = 227;
text-rgb = "rgb(205, 214, 244)"; blue = 161;
text-hsl = "hsl(226, 64%, 88%)"; };
subtext1 = "#bac2de"; teal = {
subtext1-rgb = "rgb(186, 194, 222)"; red = 148;
subtext1-hsl = "hsl(227, 35%, 80%)"; green = 226;
subtext0 = "#a6adc8"; blue = 213;
subtext0-rgb = "rgb(166, 173, 200)"; };
subtext0-hsl = "hsl(228, 24%, 72%)"; sky = {
overlay2 = "#9399b2"; red = 137;
overlay2-rgb = "rgb(147, 153, 178)"; green = 220;
overlay2-hsl = "hsl(228, 17%, 64%)"; blue = 235;
overlay1 = "#7f849c"; };
overlay1-rgb = "rgb(127, 132, 156)"; sapphire = {
overlay1-hsl = "hsl(230, 13%, 55%)"; red = 116;
overlay0 = "#6c7086"; green = 199;
overlay0-rgb = "rgb(108, 112, 134)"; blue = 236;
overlay0-hsl = "hsl(231, 11%, 47%)"; };
surface2 = "#585b70"; blue = {
surface2-rgb = "rgb(88, 91, 112)"; red = 137;
surface2-hsl = "hsl(233, 12%, 39%)"; green = 180;
surface1 = "#45475a"; blue = 250;
surface1-rgb = "rgb(69, 71, 90)"; };
surface1-hsl = "hsl(234, 13%, 31%)"; lavender = {
surface0 = "#313244"; red = 180;
surface0-rgb = "rgb(49, 50, 68)"; green = 190;
surface0-hsl = "hsl(237, 16%, 23%)"; blue = 254;
base = "#1e1e2e"; };
base-rgb = "rgb(30, 30, 46)"; text = {
base-hsl = "hsl(240, 21%, 15%)"; red = 205;
mantle = "#181825"; green = 214;
mantle-rgb = "rgb(24, 24, 37)"; blue = 244;
mantle-hsl = "hsl(240, 21%, 12%)"; };
crust = "#11111b"; subtext1 = {
crust-rgb = "rgb(17, 17, 27)"; red = 186;
crust-hsl = "hsl(240, 23%, 9%)"; green = 194;
blue = 222;
};
subtext0 = {
red = 166;
green = 173;
blue = 200;
};
overlay2 = {
red = 147;
green = 153;
blue = 178;
};
overlay1 = {
red = 127;
green = 132;
blue = 156;
};
overlay0 = {
red = 108;
green = 112;
blue = 134;
};
surface2 = {
red = 88;
green = 91;
blue = 112;
};
surface1 = {
red = 69;
green = 71;
blue = 90;
};
surface0 = {
red = 49;
green = 50;
blue = 68;
};
base = {
red = 30;
green = 30;
blue = 46;
};
mantle = {
red = 24;
green = 24;
blue = 37;
};
crust = {
red = 17;
green = 17;
blue = 27;
};
}; };
macchiato = { macchiato = {
rosewater = "#f4dbd6"; rosewater = {
rosewater-rgb = "rgb(244, 219, 214)"; red = 244;
rosewater-hsl = "hsl(10, 58%, 90%)"; green = 219;
flamingo = "#f0c6c6"; blue = 214;
flamingo-rgb = "rgb(240, 198, 198)"; };
flamingo-hsl = "hsl(0, 58%, 86%)"; flamingo = {
pink = "#f5bde6"; red = 240;
pink-rgb = "rgb(245, 189, 230)"; green = 198;
pink-hsl = "hsl(316, 74%, 85%)"; blue = 198;
mauve = "#c6a0f6"; };
mauve-rgb = "rgb(198, 160, 246)"; pink = {
mauve-hsl = "hsl(267, 83%, 80%)"; red = 245;
red = "#ed8796"; green = 189;
red-rgb = "rgb(237, 135, 150)"; blue = 230;
red-hsl = "hsl(351, 74%, 73%)"; };
maroon = "#ee99a0"; mauve = {
maroon-rgb = "rgb(238, 153, 160)"; red = 198;
maroon-hsl = "hsl(355, 71%, 77%)"; green = 160;
peach = "#f5a97f"; blue = 246;
peach-rgb = "rgb(245, 169, 127)"; };
peach-hsl = "hsl(21, 86%, 73%)"; red = {
yellow = "#eed49f"; red = 237;
yellow-rgb = "rgb(238, 212, 159)"; green = 135;
yellow-hsl = "hsl(40, 70%, 78%)"; blue = 150;
green = "#a6da95"; };
green-rgb = "rgb(166, 218, 149)"; maroon = {
green-hsl = "hsl(105, 48%, 72%)"; red = 238;
teal = "#8bd5ca"; green = 153;
teal-rgb = "rgb(139, 213, 202)"; blue = 160;
teal-hsl = "hsl(171, 47%, 69%)"; };
sky = "#91d7e3"; peach = {
sky-rgb = "rgb(145, 215, 227)"; red = 245;
sky-hsl = "hsl(189, 59%, 73%)"; green = 169;
sapphire = "#7dc4e4"; blue = 127;
sapphire-rgb = "rgb(125, 196, 228)"; };
sapphire-hsl = "hsl(199, 66%, 69%)"; yellow = {
blue = "#8aadf4"; red = 238;
blue-rgb = "rgb(138, 173, 244)"; green = 212;
blue-hsl = "hsl(220, 83%, 75%)"; blue = 159;
lavender = "#b7bdf8"; };
lavender-rgb = "rgb(183, 189, 248)"; green = {
lavender-hsl = "hsl(234, 82%, 85%)"; red = 166;
text = "#cad3f5"; green = 218;
text-rgb = "rgb(202, 211, 245)"; blue = 149;
text-hsl = "hsl(227, 68%, 88%)"; };
subtext1 = "#b8c0e0"; teal = {
subtext1-rgb = "rgb(184, 192, 224)"; red = 139;
subtext1-hsl = "hsl(228, 39%, 80%)"; green = 213;
subtext0 = "#a5adcb"; blue = 202;
subtext0-rgb = "rgb(165, 173, 203)"; };
subtext0-hsl = "hsl(227, 27%, 72%)"; sky = {
overlay2 = "#939ab7"; red = 145;
overlay2-rgb = "rgb(147, 154, 183)"; green = 215;
overlay2-hsl = "hsl(228, 20%, 65%)"; blue = 227;
overlay1 = "#8087a2"; };
overlay1-rgb = "rgb(128, 135, 162)"; sapphire = {
overlay1-hsl = "hsl(228, 15%, 57%)"; red = 125;
overlay0 = "#6e738d"; green = 196;
overlay0-rgb = "rgb(110, 115, 141)"; blue = 228;
overlay0-hsl = "hsl(230, 12%, 49%)"; };
surface2 = "#5b6078"; blue = {
surface2-rgb = "rgb(91, 96, 120)"; red = 138;
surface2-hsl = "hsl(230, 14%, 41%)"; green = 173;
surface1 = "#494d64"; blue = 244;
surface1-rgb = "rgb(73, 77, 100)"; };
surface1-hsl = "hsl(231, 16%, 34%)"; lavender = {
surface0 = "#363a4f"; red = 183;
surface0-rgb = "rgb(54, 58, 79)"; green = 189;
surface0-hsl = "hsl(230, 19%, 26%)"; blue = 248;
base = "#24273a"; };
base-rgb = "rgb(36, 39, 58)"; text = {
base-hsl = "hsl(232, 23%, 18%)"; red = 202;
mantle = "#1e2030"; green = 211;
mantle-rgb = "rgb(30, 32, 48)"; blue = 245;
mantle-hsl = "hsl(233, 23%, 15%)"; };
crust = "#181926"; subtext1 = {
crust-rgb = "rgb(24, 25, 38)"; red = 184;
crust-hsl = "hsl(236, 23%, 12%)"; green = 192;
blue = 224;
};
subtext0 = {
red = 165;
green = 173;
blue = 203;
};
overlay2 = {
red = 147;
green = 154;
blue = 183;
};
overlay1 = {
red = 128;
green = 135;
blue = 162;
};
overlay0 = {
red = 110;
green = 115;
blue = 141;
};
surface2 = {
red = 91;
green = 96;
blue = 120;
};
surface1 = {
red = 73;
green = 77;
blue = 100;
};
surface0 = {
red = 54;
green = 58;
blue = 79;
};
base = {
red = 36;
green = 39;
blue = 58;
};
mantle = {
red = 30;
green = 32;
blue = 48;
};
crust = {
red = 24;
green = 25;
blue = 38;
};
}; };
frappe = { frappe = {
rosewater = "#f2d5cf"; rosewater = {
rosewater-rgb = "rgb(242, 213, 207)"; red = 242;
rosewater-hsl = "hsl(10, 57%, 88%)"; green = 213;
flamingo = "#eebebe"; blue = 207;
flamingo-rgb = "rgb(238, 190, 190)"; };
flamingo-hsl = "hsl(0, 59%, 84%)"; flamingo = {
pink = "#f4b8e4"; red = 238;
pink-rgb = "rgb(244, 184, 228)"; green = 190;
pink-hsl = "hsl(316, 73%, 84%)"; blue = 190;
mauve = "#ca9ee6"; };
mauve-rgb = "rgb(202, 158, 230)"; pink = {
mauve-hsl = "hsl(277, 59%, 76%)"; red = 244;
red = "#e78284"; green = 184;
red-rgb = "rgb(231, 130, 132)"; blue = 228;
red-hsl = "hsl(359, 68%, 71%)"; };
maroon = "#ea999c"; mauve = {
maroon-rgb = "rgb(234, 153, 156)"; red = 202;
maroon-hsl = "hsl(358, 66%, 76%)"; green = 158;
peach = "#ef9f76"; blue = 230;
peach-rgb = "rgb(239, 159, 118)"; };
peach-hsl = "hsl(20, 79%, 70%)"; red = {
yellow = "#e5c890"; red = 231;
yellow-rgb = "rgb(229, 200, 144)"; green = 130;
yellow-hsl = "hsl(40, 62%, 73%)"; blue = 132;
green = "#a6d189"; };
green-rgb = "rgb(166, 209, 137)"; maroon = {
green-hsl = "hsl(96, 44%, 68%)"; red = 234;
teal = "#81c8be"; green = 153;
teal-rgb = "rgb(129, 200, 190)"; blue = 156;
teal-hsl = "hsl(172, 39%, 65%)"; };
sky = "#99d1db"; peach = {
sky-rgb = "rgb(153, 209, 219)"; red = 239;
sky-hsl = "hsl(189, 48%, 73%)"; green = 159;
sapphire = "#85c1dc"; blue = 118;
sapphire-rgb = "rgb(133, 193, 220)"; };
sapphire-hsl = "hsl(199, 55%, 69%)"; yellow = {
blue = "#8caaee"; red = 229;
blue-rgb = "rgb(140, 170, 238)"; green = 200;
blue-hsl = "hsl(222, 74%, 74%)"; blue = 144;
lavender = "#babbf1"; };
lavender-rgb = "rgb(186, 187, 241)"; green = {
lavender-hsl = "hsl(239, 66%, 84%)"; red = 166;
text = "#c6d0f5"; green = 209;
text-rgb = "rgb(198, 208, 245)"; blue = 137;
text-hsl = "hsl(227, 70%, 87%)"; };
subtext1 = "#b5bfe2"; teal = {
subtext1-rgb = "rgb(181, 191, 226)"; red = 129;
subtext1-hsl = "hsl(227, 44%, 80%)"; green = 200;
subtext0 = "#a5adce"; blue = 190;
subtext0-rgb = "rgb(165, 173, 206)"; };
subtext0-hsl = "hsl(228, 29%, 73%)"; sky = {
overlay2 = "#949cbb"; red = 153;
overlay2-rgb = "rgb(148, 156, 187)"; green = 209;
overlay2-hsl = "hsl(228, 22%, 66%)"; blue = 219;
overlay1 = "#838ba7"; };
overlay1-rgb = "rgb(131, 139, 167)"; sapphire = {
overlay1-hsl = "hsl(227, 17%, 58%)"; red = 133;
overlay0 = "#737994"; green = 193;
overlay0-rgb = "rgb(115, 121, 148)"; blue = 220;
overlay0-hsl = "hsl(229, 13%, 52%)"; };
surface2 = "#626880"; blue = {
surface2-rgb = "rgb(98, 104, 128)"; red = 140;
surface2-hsl = "hsl(228, 13%, 44%)"; green = 170;
surface1 = "#51576d"; blue = 238;
surface1-rgb = "rgb(81, 87, 109)"; };
surface1-hsl = "hsl(227, 15%, 37%)"; lavender = {
surface0 = "#414559"; red = 186;
surface0-rgb = "rgb(65, 69, 89)"; green = 187;
surface0-hsl = "hsl(230, 16%, 30%)"; blue = 241;
base = "#303446"; };
base-rgb = "rgb(48, 52, 70)"; text = {
base-hsl = "hsl(229, 19%, 23%)"; red = 198;
mantle = "#292c3c"; green = 208;
mantle-rgb = "rgb(41, 44, 60)"; blue = 245;
mantle-hsl = "hsl(231, 19%, 20%)"; };
crust = "#232634"; subtext1 = {
crust-rgb = "rgb(35, 38, 52)"; red = 181;
crust-hsl = "hsl(229, 20%, 17%)"; green = 191;
blue = 226;
};
subtext0 = {
red = 165;
green = 173;
blue = 206;
};
overlay2 = {
red = 148;
green = 156;
blue = 187;
};
overlay1 = {
red = 131;
green = 139;
blue = 167;
};
overlay0 = {
red = 115;
green = 121;
blue = 148;
};
surface2 = {
red = 98;
green = 104;
blue = 128;
};
surface1 = {
red = 81;
green = 87;
blue = 109;
};
surface0 = {
red = 65;
green = 69;
blue = 89;
};
base = {
red = 48;
green = 52;
blue = 70;
};
mantle = {
red = 41;
green = 44;
blue = 60;
};
crust = {
red = 35;
green = 38;
blue = 52;
};
}; };
latte = { latte = {
rosewater = "#dc8a78"; rosewater = {
rosewater-rgb = "rgb(220, 138, 120)"; red = 220;
rosewater-hsl = "hsl(11, 59%, 67%)"; green = 138;
flamingo = "#dd7878"; blue = 120;
flamingo-rgb = "rgb(221, 120, 120)"; };
flamingo-hsl = "hsl(0, 60%, 67%)"; flamingo = {
pink = "#ea76cb"; red = 221;
pink-rgb = "rgb(234, 118, 203)"; green = 120;
pink-hsl = "hsl(316, 73%, 69%)"; blue = 120;
mauve = "#8839ef"; };
mauve-rgb = "rgb(136, 57, 239)"; pink = {
mauve-hsl = "hsl(266, 85%, 58%)"; red = 234;
red = "#d20f39"; green = 118;
red-rgb = "rgb(210, 15, 57)"; blue = 203;
red-hsl = "hsl(347, 87%, 44%)"; };
maroon = "#e64553"; mauve = {
maroon-rgb = "rgb(230, 69, 83)"; red = 136;
maroon-hsl = "hsl(355, 76%, 59%)"; green = 57;
peach = "#fe640b"; blue = 239;
peach-rgb = "rgb(254, 100, 11)"; };
peach-hsl = "hsl(22, 99%, 52%)"; red = {
yellow = "#df8e1d"; red = 210;
yellow-rgb = "rgb(223, 142, 29)"; green = 15;
yellow-hsl = "hsl(35, 77%, 49%)"; blue = 57;
green = "#40a02b"; };
green-rgb = "rgb(64, 160, 43)"; maroon = {
green-hsl = "hsl(109, 58%, 40%)"; red = 230;
teal = "#179299"; green = 69;
teal-rgb = "rgb(23, 146, 153)"; blue = 83;
teal-hsl = "hsl(183, 74%, 35%)"; };
sky = "#04a5e5"; peach = {
sky-rgb = "rgb(4, 165, 229)"; red = 254;
sky-hsl = "hsl(197, 97%, 46%)"; green = 100;
sapphire = "#209fb5"; blue = 11;
sapphire-rgb = "rgb(32, 159, 181)"; };
sapphire-hsl = "hsl(189, 70%, 42%)"; yellow = {
blue = "#1e66f5"; red = 223;
blue-rgb = "rgb(30, 102, 245)"; green = 142;
blue-hsl = "hsl(220, 91%, 54%)"; blue = 29;
lavender = "#7287fd"; };
lavender-rgb = "rgb(114, 135, 253)"; green = {
lavender-hsl = "hsl(231, 97%, 72%)"; red = 64;
text = "#4c4f69"; green = 160;
text-rgb = "rgb(76, 79, 105)"; blue = 43;
text-hsl = "hsl(234, 16%, 35%)"; };
subtext1 = "#5c5f77"; teal = {
subtext1-rgb = "rgb(92, 95, 119)"; red = 23;
subtext1-hsl = "hsl(233, 13%, 41%)"; green = 146;
subtext0 = "#6c6f85"; blue = 153;
subtext0-rgb = "rgb(108, 111, 133)"; };
subtext0-hsl = "hsl(233, 10%, 47%)"; sky = {
overlay2 = "#7c7f93"; red = 4;
overlay2-rgb = "rgb(124, 127, 147)"; green = 165;
overlay2-hsl = "hsl(232, 10%, 53%)"; blue = 229;
overlay1 = "#8c8fa1"; };
overlay1-rgb = "rgb(140, 143, 161)"; sapphire = {
overlay1-hsl = "hsl(231, 10%, 59%)"; red = 32;
overlay0 = "#9ca0b0"; green = 159;
overlay0-rgb = "rgb(156, 160, 176)"; blue = 181;
overlay0-hsl = "hsl(228, 11%, 65%)"; };
surface2 = "#acb0be"; blue = {
surface2-rgb = "rgb(172, 176, 190)"; red = 30;
surface2-hsl = "hsl(227, 12%, 71%)"; green = 102;
surface1 = "#bcc0cc"; blue = 245;
surface1-rgb = "rgb(188, 192, 204)"; };
surface1-hsl = "hsl(225, 14%, 77%)"; lavender = {
surface0 = "#ccd0da"; red = 114;
surface0-rgb = "rgb(204, 208, 218)"; green = 135;
surface0-hsl = "hsl(223, 16%, 83%)"; blue = 253;
base = "#eff1f5"; };
base-rgb = "rgb(239, 241, 245)"; text = {
base-hsl = "hsl(220, 23%, 95%)"; red = 76;
mantle = "#e6e9ef"; green = 79;
mantle-rgb = "rgb(230, 233, 239)"; blue = 105;
mantle-hsl = "hsl(220, 22%, 92%)"; };
crust = "#dce0e8"; subtext1 = {
crust-rgb = "rgb(220, 224, 232)"; red = 92;
crust-hsl = "hsl(220, 21%, 89%)"; green = 95;
blue = 119;
};
subtext0 = {
red = 108;
green = 111;
blue = 133;
};
overlay2 = {
red = 124;
green = 127;
blue = 147;
};
overlay1 = {
red = 140;
green = 143;
blue = 161;
};
overlay0 = {
red = 156;
green = 160;
blue = 176;
};
surface2 = {
red = 172;
green = 176;
blue = 190;
};
surface1 = {
red = 188;
green = 192;
blue = 204;
};
surface0 = {
red = 204;
green = 208;
blue = 218;
};
base = {
red = 239;
green = 241;
blue = 245;
};
mantle = {
red = 230;
green = 233;
blue = 239;
};
crust = {
red = 220;
green = 224;
blue = 232;
};
}; };
}; };
in { in {
@ -371,7 +579,19 @@ in {
}; };
colors = mkOption { colors = mkOption {
type = types.attrsOf types.anything; type = types.attrsOf (types.submodule {
options = {
red = mkOption {
type = types.int;
};
green = mkOption {
type = types.int;
};
blue = mkOption {
type = types.int;
};
};
});
readOnly = true; readOnly = true;
}; };
}; };

View file

@ -4,8 +4,7 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption catppuccin;
inherit (builtins) replaceStrings;
cfg = config.horseman.wm.hyprland; cfg = config.horseman.wm.hyprland;
colors = config.horseman.catppuccin.colors; colors = config.horseman.catppuccin.colors;
@ -40,7 +39,7 @@ in {
playerctl # Media control playerctl # Media control
pulsemixer # Audio frontend pulsemixer # Audio frontend
wl-clipboard # Clipboard wl-clipboard # Clipboard
wofi # Launcher fuzzel # Launcher
xdg-desktop-portal-hyprland # XDG Portal (needed but idk why) xdg-desktop-portal-hyprland # XDG Portal (needed but idk why)
]; ];
@ -82,8 +81,8 @@ in {
resizeOnBorder = true; resizeOnBorder = true;
allowTearing = false; allowTearing = false;
col.activeBorder = replaceStrings [" "] [""] colors."${accent}-rgb"; col.activeBorder = catppuccin.toRGB colors.${accent};
col.inactiveBorder = replaceStrings [" " ")" "rgb"] ["" ",0.25)" "rgba"] colors."${accent}-rgb"; # Make transparent col.inactiveBorder = catppuccin.toRGBA colors.${accent} 0.25;
layout = "dwindle"; layout = "dwindle";
}; };

8
overlays/catppuccin.nix Normal file
View file

@ -0,0 +1,8 @@
{inputs, ...}: let
inherit (inputs.nixpkgs.lib) toHexString concatStrings;
in {
toHex = color: concatStrings ["#" (toHexString color.red) (toHexString color.green) (toHexString color.blue)];
toHexNoHash = color: concatStrings [(toHexString color.red) (toHexString color.green) (toHexString color.blue)];
toRGB = color: concatStrings ["rgb(" (toString color.red) "," (toString color.green) "," (toString color.blue) ")"];
toRGBA = color: a: concatStrings ["rgba(" (toString color.red) "," (toString color.green) "," (toString color.blue) "," (toString a) ")"];
}

7
overlays/default.nix Normal file
View file

@ -0,0 +1,7 @@
# {inputs, ...}: import ./catppuccin.nix {inherit inputs;}
{inputs, ...}:
inputs.nixpkgs.lib.extend (
final: prev: {
catppuccin = import ./catppuccin.nix {inherit inputs;};
}
)