diff --git a/dots/.config/fuzzel/fuzzel.ini.nix b/dots/.config/fuzzel/fuzzel.ini.nix new file mode 100644 index 0000000..37e1563 --- /dev/null +++ b/dots/.config/fuzzel/fuzzel.ini.nix @@ -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 + ''; + }; +} diff --git a/dots/.config/kitty/kitty.conf.nix b/dots/.config/kitty/kitty.conf.nix index c59f1df..72e182e 100644 --- a/dots/.config/kitty/kitty.conf.nix +++ b/dots/.config/kitty/kitty.conf.nix @@ -3,7 +3,7 @@ config, ... }: let - inherit (lib) mkIf mkEnableOption mkOption types; + inherit (lib) mkIf mkEnableOption mkOption types catppuccin; cfg = config.horseman.dots.kitty; username = config.horseman.username; colors = config.horseman.catppuccin.colors; @@ -33,75 +33,75 @@ in { font_size ${toString cfg.fontSize} # The basic colors - foreground ${colors.text} - background ${colors.base} - selection_foreground ${colors.base} - selection_background ${colors.rosewater} + foreground ${catppuccin.toHex colors.text} + background ${catppuccin.toHex colors.base} + selection_foreground ${catppuccin.toHex colors.base} + selection_background ${catppuccin.toHex colors.rosewater} # Cursor colors - cursor ${colors.rosewater} - cursor_text_color ${colors.base} + cursor ${catppuccin.toHex colors.rosewater} + cursor_text_color ${catppuccin.toHex colors.base} # URL underline color when hovering with mouse - url_color ${colors.rosewater} + url_color ${catppuccin.toHex colors.rosewater} # Kitty window border colors - active_border_color ${colors.lavender} - inactive_border_color ${colors.overlay0} - bell_border_color ${colors.yellow} + active_border_color ${catppuccin.toHex colors.lavender} + inactive_border_color ${catppuccin.toHex colors.overlay0} + bell_border_color ${catppuccin.toHex colors.yellow} # OS Window titlebar colors wayland_titlebar_color system macos_titlebar_color system # Tab bar colors - active_tab_foreground ${colors.crust} - active_tab_background ${colors.mauve} - inactive_tab_foreground ${colors.text} - inactive_tab_background ${colors.mantle} - tab_bar_background ${colors.crust} + active_tab_foreground ${catppuccin.toHex colors.crust} + active_tab_background ${catppuccin.toHex colors.mauve} + inactive_tab_foreground ${catppuccin.toHex colors.text} + inactive_tab_background ${catppuccin.toHex colors.mantle} + tab_bar_background ${catppuccin.toHex colors.crust} # Colors for marks (marked text in the terminal) - mark1_foreground ${colors.base} - mark1_background ${colors.lavender} - mark2_foreground ${colors.base} - mark2_background ${colors.mauve} - mark3_foreground ${colors.base} - mark3_background ${colors.sapphire} + mark1_foreground ${catppuccin.toHex colors.base} + mark1_background ${catppuccin.toHex colors.lavender} + mark2_foreground ${catppuccin.toHex colors.base} + mark2_background ${catppuccin.toHex colors.mauve} + mark3_foreground ${catppuccin.toHex colors.base} + mark3_background ${catppuccin.toHex colors.sapphire} # The 16 terminal colors # black - color0 ${colors.surface1} - color8 ${colors.surface2} + color0 ${catppuccin.toHex colors.surface1} + color8 ${catppuccin.toHex colors.surface2} # red - color1 ${colors.red} - color9 ${colors.red} + color1 ${catppuccin.toHex colors.red} + color9 ${catppuccin.toHex colors.red} # green - color2 ${colors.green} - color10 ${colors.green} + color2 ${catppuccin.toHex colors.green} + color10 ${catppuccin.toHex colors.green} # yellow - color3 ${colors.yellow} - color11 ${colors.yellow} + color3 ${catppuccin.toHex colors.yellow} + color11 ${catppuccin.toHex colors.yellow} # blue - color4 ${colors.blue} - color12 ${colors.blue} + color4 ${catppuccin.toHex colors.blue} + color12 ${catppuccin.toHex colors.blue} # magenta - color5 ${colors.mauve} - color13 ${colors.mauve} + color5 ${catppuccin.toHex colors.mauve} + color13 ${catppuccin.toHex colors.mauve} # cyan - color6 ${colors.teal} - color14 ${colors.teal} + color6 ${catppuccin.toHex colors.teal} + color14 ${catppuccin.toHex colors.teal} # white - color7 ${colors.subtext1} - color15 ${colors.subtext0} + color7 ${catppuccin.toHex colors.subtext1} + color15 ${catppuccin.toHex colors.subtext0} ''; }; } diff --git a/dots/.config/waybar/style.css.nix b/dots/.config/waybar/style.css.nix index be75ea0..c2c7d82 100644 --- a/dots/.config/waybar/style.css.nix +++ b/dots/.config/waybar/style.css.nix @@ -3,7 +3,7 @@ config, ... }: let - inherit (lib) mkIf mkEnableOption; + inherit (lib) mkIf mkEnableOption catppuccin; cfg = config.horseman.dots.waybar; username = config.horseman.username; colors = config.horseman.catppuccin.colors; @@ -26,33 +26,33 @@ in { } .modules-left, .modules-center, .modules-right { - border: 2px solid ${colors.${accent}}; + border: 2px solid ${catppuccin.toHex colors.${accent}}; border-radius: 10px; margin: 5px; - background: ${colors.base}; - color: ${colors.text}; + background: ${catppuccin.toHex colors.base}; + color: ${catppuccin.toHex colors.text}; } #power { padding-left: 10px; } #idle_inhibitor.activated { - color: ${colors.red}; + color: ${catppuccin.toHex colors.red}; } #power * { - color: ${colors.${accent}}; + color: ${catppuccin.toHex colors.${accent}}; transition: 0.2s color ease; font-size: 26px; } #power *:hover { - color: ${colors.red}; + color: ${catppuccin.toHex colors.red}; } #workspaces .empty { - color: ${colors.surface0}; + color: ${catppuccin.toHex colors.surface0}; } #workspaces .active { - color: ${colors.red}; + color: ${catppuccin.toHex colors.red}; font-size: 18px; } #workspaces * { @@ -62,27 +62,27 @@ in { } #workspaces > * { - color: ${colors.${accent}}; + color: ${catppuccin.toHex colors.${accent}}; } #clock { - color: ${colors.peach}; + color: ${catppuccin.toHex colors.peach}; } #battery { - color: ${colors.maroon}; + color: ${catppuccin.toHex colors.maroon}; } #cpu { - color: ${colors.red}; + color: ${catppuccin.toHex colors.red}; } #memory { - color: ${colors.mauve}; + color: ${catppuccin.toHex colors.mauve}; } #pulseaudio { - color: ${colors.blue}; + color: ${catppuccin.toHex colors.blue}; } #network { - color: ${colors.teal}; + color: ${catppuccin.toHex colors.teal}; } .horizontal .modules-right { font-size: 16px; diff --git a/dots/.config/wofi/style.css.nix b/dots/.config/wofi/style.css.nix index b47e2dd..f010423 100644 --- a/dots/.config/wofi/style.css.nix +++ b/dots/.config/wofi/style.css.nix @@ -3,7 +3,7 @@ config, ... }: let - inherit (lib) mkIf mkEnableOption; + inherit (lib) mkIf mkEnableOption catppuccin; cfg = config.horseman.dots.wofi; username = config.horseman.username; colors = config.horseman.catppuccin.colors; @@ -26,9 +26,9 @@ in { window { margin: 0px; padding: 10px; - border: 3px solid ${colors.${accent}}; + border: 3px solid ${catppuccin.toHex colors.${accent}}; 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; */ } @@ -48,7 +48,7 @@ in { margin: 5px; padding: 10px; border: none; - background-color: ${colors.base}; + background-color: ${catppuccin.toHex colors.base}; /* animation: fadeIn 0.5s ease-in-out both; */ } @@ -68,7 +68,7 @@ in { margin: 5px; padding: 10px; border: none; - background-color: ${colors.base}; + background-color: ${catppuccin.toHex colors.base}; } /* Scroll */ @@ -76,63 +76,63 @@ in { margin: 0px; padding: 10px; border: none; - background-color: ${colors.base}; + background-color: ${catppuccin.toHex colors.base}; } /* Input */ #input { margin: 5px 20px; padding: 10px; - border: 2px solid ${colors.${accent}}; + border: 2px solid ${catppuccin.toHex colors.${accent}}; border-radius: 10px; - color: ${colors.text}; - background-color: ${colors.base}; + color: ${catppuccin.toHex colors.text}; + background-color: ${catppuccin.toHex colors.base}; /* animation: fadeIn 0.5s ease-in-out both; */ } #input image { border: none; - color: ${colors.red}; + color: ${catppuccin.toHex colors.red}; } #input * { - outline: 4px solid ${colors.red}!important; + outline: 4px solid ${catppuccin.toHex colors.red}!important; } /* Text */ #text { margin: 5px; border: none; - color: ${colors.text}; + color: ${catppuccin.toHex colors.text}; /* animation: fadeIn 0.5s ease-in-out both; */ } #entry { - background-color: ${colors.base}; + background-color: ${catppuccin.toHex colors.base}; } #entry arrow { border: none; - color: ${colors.${accent}}; + color: ${catppuccin.toHex colors.${accent}}; } /* Selected Entry */ #entry:selected arrow { overflow: hidden; - color: ${colors.mauve}; + color: ${catppuccin.toHex colors.mauve}; } #entry:selected { - border: 1px solid ${colors.${accent}}; + border: 1px solid ${catppuccin.toHex colors.${accent}}; border-radius: 10px; } #entry:selected #text { - color: ${colors.mauve}; + color: ${catppuccin.toHex colors.mauve}; } #entry:drop(active) { - background-color: ${colors.${accent}}!important; + background-color: ${catppuccin.toHex colors.${accent}}!important; } ''; }; diff --git a/flake.nix b/flake.nix index e2dcfa1..aa12078 100644 --- a/flake.nix +++ b/flake.nix @@ -46,13 +46,15 @@ "x86_64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs systems; + + lib = import ./overlays {inherit inputs;}; in { formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); nixosConfigurations = nixpkgs.lib.genAttrs hosts (host: nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs outputs; + inherit inputs outputs lib; }; modules = [ ./lib diff --git a/machines/terra/configuration.nix b/machines/terra/configuration.nix index a5a9957..4ddf472 100644 --- a/machines/terra/configuration.nix +++ b/machines/terra/configuration.nix @@ -8,4 +8,6 @@ horseman.stateVersion = "24.11"; networking.hostName = "terra"; + + programs.niri.enable = true; } diff --git a/modules/catppuccin/default.nix b/modules/catppuccin/default.nix index 05d2633..e6adb02 100644 --- a/modules/catppuccin/default.nix +++ b/modules/catppuccin/default.nix @@ -9,324 +9,532 @@ flavors = { mocha = { - rosewater = "#f5e0dc"; - rosewater-rgb = "rgb(245, 224, 220)"; - rosewater-hsl = "hsl(10, 56%, 91%)"; - flamingo = "#f2cdcd"; - flamingo-rgb = "rgb(242, 205, 205)"; - flamingo-hsl = "hsl(0, 59%, 88%)"; - pink = "#f5c2e7"; - pink-rgb = "rgb(245, 194, 231)"; - pink-hsl = "hsl(316, 72%, 86%)"; - mauve = "#cba6f7"; - mauve-rgb = "rgb(203, 166, 247)"; - mauve-hsl = "hsl(267, 84%, 81%)"; - red = "#f38ba8"; - red-rgb = "rgb(243, 139, 168)"; - red-hsl = "hsl(343, 81%, 75%)"; - maroon = "#eba0ac"; - maroon-rgb = "rgb(235, 160, 172)"; - maroon-hsl = "hsl(350, 65%, 77%)"; - peach = "#fab387"; - peach-rgb = "rgb(250, 179, 135)"; - peach-hsl = "hsl(23, 92%, 75%)"; - yellow = "#f9e2af"; - yellow-rgb = "rgb(249, 226, 175)"; - yellow-hsl = "hsl(41, 86%, 83%)"; - green = "#a6e3a1"; - green-rgb = "rgb(166, 227, 161)"; - green-hsl = "hsl(115, 54%, 76%)"; - teal = "#94e2d5"; - teal-rgb = "rgb(148, 226, 213)"; - teal-hsl = "hsl(170, 57%, 73%)"; - sky = "#89dceb"; - sky-rgb = "rgb(137, 220, 235)"; - sky-hsl = "hsl(189, 71%, 73%)"; - sapphire = "#74c7ec"; - sapphire-rgb = "rgb(116, 199, 236)"; - sapphire-hsl = "hsl(199, 76%, 69%)"; - blue = "#89b4fa"; - blue-rgb = "rgb(137, 180, 250)"; - blue-hsl = "hsl(217, 92%, 76%)"; - lavender = "#b4befe"; - lavender-rgb = "rgb(180, 190, 254)"; - lavender-hsl = "hsl(232, 97%, 85%)"; - text = "#cdd6f4"; - text-rgb = "rgb(205, 214, 244)"; - text-hsl = "hsl(226, 64%, 88%)"; - subtext1 = "#bac2de"; - subtext1-rgb = "rgb(186, 194, 222)"; - subtext1-hsl = "hsl(227, 35%, 80%)"; - subtext0 = "#a6adc8"; - subtext0-rgb = "rgb(166, 173, 200)"; - subtext0-hsl = "hsl(228, 24%, 72%)"; - overlay2 = "#9399b2"; - overlay2-rgb = "rgb(147, 153, 178)"; - overlay2-hsl = "hsl(228, 17%, 64%)"; - overlay1 = "#7f849c"; - overlay1-rgb = "rgb(127, 132, 156)"; - overlay1-hsl = "hsl(230, 13%, 55%)"; - overlay0 = "#6c7086"; - overlay0-rgb = "rgb(108, 112, 134)"; - overlay0-hsl = "hsl(231, 11%, 47%)"; - surface2 = "#585b70"; - surface2-rgb = "rgb(88, 91, 112)"; - surface2-hsl = "hsl(233, 12%, 39%)"; - surface1 = "#45475a"; - surface1-rgb = "rgb(69, 71, 90)"; - surface1-hsl = "hsl(234, 13%, 31%)"; - surface0 = "#313244"; - surface0-rgb = "rgb(49, 50, 68)"; - surface0-hsl = "hsl(237, 16%, 23%)"; - base = "#1e1e2e"; - base-rgb = "rgb(30, 30, 46)"; - base-hsl = "hsl(240, 21%, 15%)"; - mantle = "#181825"; - mantle-rgb = "rgb(24, 24, 37)"; - mantle-hsl = "hsl(240, 21%, 12%)"; - crust = "#11111b"; - crust-rgb = "rgb(17, 17, 27)"; - crust-hsl = "hsl(240, 23%, 9%)"; + rosewater = { + red = 245; + green = 224; + blue = 220; + }; + flamingo = { + red = 242; + green = 205; + blue = 205; + }; + pink = { + red = 245; + green = 194; + blue = 231; + }; + mauve = { + red = 203; + green = 166; + blue = 247; + }; + red = { + red = 243; + green = 139; + blue = 168; + }; + maroon = { + red = 235; + green = 160; + blue = 172; + }; + peach = { + red = 250; + green = 179; + blue = 135; + }; + yellow = { + red = 249; + green = 226; + blue = 175; + }; + green = { + red = 166; + green = 227; + blue = 161; + }; + teal = { + red = 148; + green = 226; + blue = 213; + }; + sky = { + red = 137; + green = 220; + blue = 235; + }; + sapphire = { + red = 116; + green = 199; + blue = 236; + }; + blue = { + red = 137; + green = 180; + blue = 250; + }; + lavender = { + red = 180; + green = 190; + blue = 254; + }; + text = { + red = 205; + green = 214; + blue = 244; + }; + subtext1 = { + red = 186; + 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 = { - rosewater = "#f4dbd6"; - rosewater-rgb = "rgb(244, 219, 214)"; - rosewater-hsl = "hsl(10, 58%, 90%)"; - flamingo = "#f0c6c6"; - flamingo-rgb = "rgb(240, 198, 198)"; - flamingo-hsl = "hsl(0, 58%, 86%)"; - pink = "#f5bde6"; - pink-rgb = "rgb(245, 189, 230)"; - pink-hsl = "hsl(316, 74%, 85%)"; - mauve = "#c6a0f6"; - mauve-rgb = "rgb(198, 160, 246)"; - mauve-hsl = "hsl(267, 83%, 80%)"; - red = "#ed8796"; - red-rgb = "rgb(237, 135, 150)"; - red-hsl = "hsl(351, 74%, 73%)"; - maroon = "#ee99a0"; - maroon-rgb = "rgb(238, 153, 160)"; - maroon-hsl = "hsl(355, 71%, 77%)"; - peach = "#f5a97f"; - peach-rgb = "rgb(245, 169, 127)"; - peach-hsl = "hsl(21, 86%, 73%)"; - yellow = "#eed49f"; - yellow-rgb = "rgb(238, 212, 159)"; - yellow-hsl = "hsl(40, 70%, 78%)"; - green = "#a6da95"; - green-rgb = "rgb(166, 218, 149)"; - green-hsl = "hsl(105, 48%, 72%)"; - teal = "#8bd5ca"; - teal-rgb = "rgb(139, 213, 202)"; - teal-hsl = "hsl(171, 47%, 69%)"; - sky = "#91d7e3"; - sky-rgb = "rgb(145, 215, 227)"; - sky-hsl = "hsl(189, 59%, 73%)"; - sapphire = "#7dc4e4"; - sapphire-rgb = "rgb(125, 196, 228)"; - sapphire-hsl = "hsl(199, 66%, 69%)"; - blue = "#8aadf4"; - blue-rgb = "rgb(138, 173, 244)"; - blue-hsl = "hsl(220, 83%, 75%)"; - lavender = "#b7bdf8"; - lavender-rgb = "rgb(183, 189, 248)"; - lavender-hsl = "hsl(234, 82%, 85%)"; - text = "#cad3f5"; - text-rgb = "rgb(202, 211, 245)"; - text-hsl = "hsl(227, 68%, 88%)"; - subtext1 = "#b8c0e0"; - subtext1-rgb = "rgb(184, 192, 224)"; - subtext1-hsl = "hsl(228, 39%, 80%)"; - subtext0 = "#a5adcb"; - subtext0-rgb = "rgb(165, 173, 203)"; - subtext0-hsl = "hsl(227, 27%, 72%)"; - overlay2 = "#939ab7"; - overlay2-rgb = "rgb(147, 154, 183)"; - overlay2-hsl = "hsl(228, 20%, 65%)"; - overlay1 = "#8087a2"; - overlay1-rgb = "rgb(128, 135, 162)"; - overlay1-hsl = "hsl(228, 15%, 57%)"; - overlay0 = "#6e738d"; - overlay0-rgb = "rgb(110, 115, 141)"; - overlay0-hsl = "hsl(230, 12%, 49%)"; - surface2 = "#5b6078"; - surface2-rgb = "rgb(91, 96, 120)"; - surface2-hsl = "hsl(230, 14%, 41%)"; - surface1 = "#494d64"; - surface1-rgb = "rgb(73, 77, 100)"; - surface1-hsl = "hsl(231, 16%, 34%)"; - surface0 = "#363a4f"; - surface0-rgb = "rgb(54, 58, 79)"; - surface0-hsl = "hsl(230, 19%, 26%)"; - base = "#24273a"; - base-rgb = "rgb(36, 39, 58)"; - base-hsl = "hsl(232, 23%, 18%)"; - mantle = "#1e2030"; - mantle-rgb = "rgb(30, 32, 48)"; - mantle-hsl = "hsl(233, 23%, 15%)"; - crust = "#181926"; - crust-rgb = "rgb(24, 25, 38)"; - crust-hsl = "hsl(236, 23%, 12%)"; + rosewater = { + red = 244; + green = 219; + blue = 214; + }; + flamingo = { + red = 240; + green = 198; + blue = 198; + }; + pink = { + red = 245; + green = 189; + blue = 230; + }; + mauve = { + red = 198; + green = 160; + blue = 246; + }; + red = { + red = 237; + green = 135; + blue = 150; + }; + maroon = { + red = 238; + green = 153; + blue = 160; + }; + peach = { + red = 245; + green = 169; + blue = 127; + }; + yellow = { + red = 238; + green = 212; + blue = 159; + }; + green = { + red = 166; + green = 218; + blue = 149; + }; + teal = { + red = 139; + green = 213; + blue = 202; + }; + sky = { + red = 145; + green = 215; + blue = 227; + }; + sapphire = { + red = 125; + green = 196; + blue = 228; + }; + blue = { + red = 138; + green = 173; + blue = 244; + }; + lavender = { + red = 183; + green = 189; + blue = 248; + }; + text = { + red = 202; + green = 211; + blue = 245; + }; + subtext1 = { + red = 184; + 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 = { - rosewater = "#f2d5cf"; - rosewater-rgb = "rgb(242, 213, 207)"; - rosewater-hsl = "hsl(10, 57%, 88%)"; - flamingo = "#eebebe"; - flamingo-rgb = "rgb(238, 190, 190)"; - flamingo-hsl = "hsl(0, 59%, 84%)"; - pink = "#f4b8e4"; - pink-rgb = "rgb(244, 184, 228)"; - pink-hsl = "hsl(316, 73%, 84%)"; - mauve = "#ca9ee6"; - mauve-rgb = "rgb(202, 158, 230)"; - mauve-hsl = "hsl(277, 59%, 76%)"; - red = "#e78284"; - red-rgb = "rgb(231, 130, 132)"; - red-hsl = "hsl(359, 68%, 71%)"; - maroon = "#ea999c"; - maroon-rgb = "rgb(234, 153, 156)"; - maroon-hsl = "hsl(358, 66%, 76%)"; - peach = "#ef9f76"; - peach-rgb = "rgb(239, 159, 118)"; - peach-hsl = "hsl(20, 79%, 70%)"; - yellow = "#e5c890"; - yellow-rgb = "rgb(229, 200, 144)"; - yellow-hsl = "hsl(40, 62%, 73%)"; - green = "#a6d189"; - green-rgb = "rgb(166, 209, 137)"; - green-hsl = "hsl(96, 44%, 68%)"; - teal = "#81c8be"; - teal-rgb = "rgb(129, 200, 190)"; - teal-hsl = "hsl(172, 39%, 65%)"; - sky = "#99d1db"; - sky-rgb = "rgb(153, 209, 219)"; - sky-hsl = "hsl(189, 48%, 73%)"; - sapphire = "#85c1dc"; - sapphire-rgb = "rgb(133, 193, 220)"; - sapphire-hsl = "hsl(199, 55%, 69%)"; - blue = "#8caaee"; - blue-rgb = "rgb(140, 170, 238)"; - blue-hsl = "hsl(222, 74%, 74%)"; - lavender = "#babbf1"; - lavender-rgb = "rgb(186, 187, 241)"; - lavender-hsl = "hsl(239, 66%, 84%)"; - text = "#c6d0f5"; - text-rgb = "rgb(198, 208, 245)"; - text-hsl = "hsl(227, 70%, 87%)"; - subtext1 = "#b5bfe2"; - subtext1-rgb = "rgb(181, 191, 226)"; - subtext1-hsl = "hsl(227, 44%, 80%)"; - subtext0 = "#a5adce"; - subtext0-rgb = "rgb(165, 173, 206)"; - subtext0-hsl = "hsl(228, 29%, 73%)"; - overlay2 = "#949cbb"; - overlay2-rgb = "rgb(148, 156, 187)"; - overlay2-hsl = "hsl(228, 22%, 66%)"; - overlay1 = "#838ba7"; - overlay1-rgb = "rgb(131, 139, 167)"; - overlay1-hsl = "hsl(227, 17%, 58%)"; - overlay0 = "#737994"; - overlay0-rgb = "rgb(115, 121, 148)"; - overlay0-hsl = "hsl(229, 13%, 52%)"; - surface2 = "#626880"; - surface2-rgb = "rgb(98, 104, 128)"; - surface2-hsl = "hsl(228, 13%, 44%)"; - surface1 = "#51576d"; - surface1-rgb = "rgb(81, 87, 109)"; - surface1-hsl = "hsl(227, 15%, 37%)"; - surface0 = "#414559"; - surface0-rgb = "rgb(65, 69, 89)"; - surface0-hsl = "hsl(230, 16%, 30%)"; - base = "#303446"; - base-rgb = "rgb(48, 52, 70)"; - base-hsl = "hsl(229, 19%, 23%)"; - mantle = "#292c3c"; - mantle-rgb = "rgb(41, 44, 60)"; - mantle-hsl = "hsl(231, 19%, 20%)"; - crust = "#232634"; - crust-rgb = "rgb(35, 38, 52)"; - crust-hsl = "hsl(229, 20%, 17%)"; + rosewater = { + red = 242; + green = 213; + blue = 207; + }; + flamingo = { + red = 238; + green = 190; + blue = 190; + }; + pink = { + red = 244; + green = 184; + blue = 228; + }; + mauve = { + red = 202; + green = 158; + blue = 230; + }; + red = { + red = 231; + green = 130; + blue = 132; + }; + maroon = { + red = 234; + green = 153; + blue = 156; + }; + peach = { + red = 239; + green = 159; + blue = 118; + }; + yellow = { + red = 229; + green = 200; + blue = 144; + }; + green = { + red = 166; + green = 209; + blue = 137; + }; + teal = { + red = 129; + green = 200; + blue = 190; + }; + sky = { + red = 153; + green = 209; + blue = 219; + }; + sapphire = { + red = 133; + green = 193; + blue = 220; + }; + blue = { + red = 140; + green = 170; + blue = 238; + }; + lavender = { + red = 186; + green = 187; + blue = 241; + }; + text = { + red = 198; + green = 208; + blue = 245; + }; + subtext1 = { + red = 181; + 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 = { - rosewater = "#dc8a78"; - rosewater-rgb = "rgb(220, 138, 120)"; - rosewater-hsl = "hsl(11, 59%, 67%)"; - flamingo = "#dd7878"; - flamingo-rgb = "rgb(221, 120, 120)"; - flamingo-hsl = "hsl(0, 60%, 67%)"; - pink = "#ea76cb"; - pink-rgb = "rgb(234, 118, 203)"; - pink-hsl = "hsl(316, 73%, 69%)"; - mauve = "#8839ef"; - mauve-rgb = "rgb(136, 57, 239)"; - mauve-hsl = "hsl(266, 85%, 58%)"; - red = "#d20f39"; - red-rgb = "rgb(210, 15, 57)"; - red-hsl = "hsl(347, 87%, 44%)"; - maroon = "#e64553"; - maroon-rgb = "rgb(230, 69, 83)"; - maroon-hsl = "hsl(355, 76%, 59%)"; - peach = "#fe640b"; - peach-rgb = "rgb(254, 100, 11)"; - peach-hsl = "hsl(22, 99%, 52%)"; - yellow = "#df8e1d"; - yellow-rgb = "rgb(223, 142, 29)"; - yellow-hsl = "hsl(35, 77%, 49%)"; - green = "#40a02b"; - green-rgb = "rgb(64, 160, 43)"; - green-hsl = "hsl(109, 58%, 40%)"; - teal = "#179299"; - teal-rgb = "rgb(23, 146, 153)"; - teal-hsl = "hsl(183, 74%, 35%)"; - sky = "#04a5e5"; - sky-rgb = "rgb(4, 165, 229)"; - sky-hsl = "hsl(197, 97%, 46%)"; - sapphire = "#209fb5"; - sapphire-rgb = "rgb(32, 159, 181)"; - sapphire-hsl = "hsl(189, 70%, 42%)"; - blue = "#1e66f5"; - blue-rgb = "rgb(30, 102, 245)"; - blue-hsl = "hsl(220, 91%, 54%)"; - lavender = "#7287fd"; - lavender-rgb = "rgb(114, 135, 253)"; - lavender-hsl = "hsl(231, 97%, 72%)"; - text = "#4c4f69"; - text-rgb = "rgb(76, 79, 105)"; - text-hsl = "hsl(234, 16%, 35%)"; - subtext1 = "#5c5f77"; - subtext1-rgb = "rgb(92, 95, 119)"; - subtext1-hsl = "hsl(233, 13%, 41%)"; - subtext0 = "#6c6f85"; - subtext0-rgb = "rgb(108, 111, 133)"; - subtext0-hsl = "hsl(233, 10%, 47%)"; - overlay2 = "#7c7f93"; - overlay2-rgb = "rgb(124, 127, 147)"; - overlay2-hsl = "hsl(232, 10%, 53%)"; - overlay1 = "#8c8fa1"; - overlay1-rgb = "rgb(140, 143, 161)"; - overlay1-hsl = "hsl(231, 10%, 59%)"; - overlay0 = "#9ca0b0"; - overlay0-rgb = "rgb(156, 160, 176)"; - overlay0-hsl = "hsl(228, 11%, 65%)"; - surface2 = "#acb0be"; - surface2-rgb = "rgb(172, 176, 190)"; - surface2-hsl = "hsl(227, 12%, 71%)"; - surface1 = "#bcc0cc"; - surface1-rgb = "rgb(188, 192, 204)"; - surface1-hsl = "hsl(225, 14%, 77%)"; - surface0 = "#ccd0da"; - surface0-rgb = "rgb(204, 208, 218)"; - surface0-hsl = "hsl(223, 16%, 83%)"; - base = "#eff1f5"; - base-rgb = "rgb(239, 241, 245)"; - base-hsl = "hsl(220, 23%, 95%)"; - mantle = "#e6e9ef"; - mantle-rgb = "rgb(230, 233, 239)"; - mantle-hsl = "hsl(220, 22%, 92%)"; - crust = "#dce0e8"; - crust-rgb = "rgb(220, 224, 232)"; - crust-hsl = "hsl(220, 21%, 89%)"; + rosewater = { + red = 220; + green = 138; + blue = 120; + }; + flamingo = { + red = 221; + green = 120; + blue = 120; + }; + pink = { + red = 234; + green = 118; + blue = 203; + }; + mauve = { + red = 136; + green = 57; + blue = 239; + }; + red = { + red = 210; + green = 15; + blue = 57; + }; + maroon = { + red = 230; + green = 69; + blue = 83; + }; + peach = { + red = 254; + green = 100; + blue = 11; + }; + yellow = { + red = 223; + green = 142; + blue = 29; + }; + green = { + red = 64; + green = 160; + blue = 43; + }; + teal = { + red = 23; + green = 146; + blue = 153; + }; + sky = { + red = 4; + green = 165; + blue = 229; + }; + sapphire = { + red = 32; + green = 159; + blue = 181; + }; + blue = { + red = 30; + green = 102; + blue = 245; + }; + lavender = { + red = 114; + green = 135; + blue = 253; + }; + text = { + red = 76; + green = 79; + blue = 105; + }; + subtext1 = { + red = 92; + 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 { @@ -371,7 +579,19 @@ in { }; 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; }; }; diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index 84fe07c..b8c5a7c 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -4,8 +4,7 @@ pkgs, ... }: let - inherit (lib) mkIf mkEnableOption; - inherit (builtins) replaceStrings; + inherit (lib) mkIf mkEnableOption catppuccin; cfg = config.horseman.wm.hyprland; colors = config.horseman.catppuccin.colors; @@ -40,7 +39,7 @@ in { playerctl # Media control pulsemixer # Audio frontend wl-clipboard # Clipboard - wofi # Launcher + fuzzel # Launcher xdg-desktop-portal-hyprland # XDG Portal (needed but idk why) ]; @@ -82,8 +81,8 @@ in { resizeOnBorder = true; allowTearing = false; - col.activeBorder = replaceStrings [" "] [""] colors."${accent}-rgb"; - col.inactiveBorder = replaceStrings [" " ")" "rgb"] ["" ",0.25)" "rgba"] colors."${accent}-rgb"; # Make transparent + col.activeBorder = catppuccin.toRGB colors.${accent}; + col.inactiveBorder = catppuccin.toRGBA colors.${accent} 0.25; layout = "dwindle"; }; diff --git a/overlays/catppuccin.nix b/overlays/catppuccin.nix new file mode 100644 index 0000000..5980626 --- /dev/null +++ b/overlays/catppuccin.nix @@ -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) ")"]; +} diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..17e93fa --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,7 @@ +# {inputs, ...}: import ./catppuccin.nix {inherit inputs;} +{inputs, ...}: +inputs.nixpkgs.lib.extend ( + final: prev: { + catppuccin = import ./catppuccin.nix {inherit inputs;}; + } +)