diff --git a/home.nix b/home.nix index 5817744..51f9ab2 100644 --- a/home.nix +++ b/home.nix @@ -21,7 +21,7 @@ in ( final: prev: rec { rice = prev.rice // { - colorPalette = with pkgs.rice; palette.palette { + colorPalette = with pkgs.rice; palette.palette rec { black = color.hexToRgba nord.n0; red = color.hexToRgba nord.n11; green = color.hexToRgba nord.n14; @@ -34,11 +34,14 @@ in bright-white = color.hexToRgba nord.n6; bright-red = color.hexToRgba nord.n12; cursor-cursor = color.hexToRgba nord.n4; + + primary-background = color.tAlphaRgba (v: float.round (255 * opacity)) black; }; font = { normal = { package = pkgs.cantarell-fonts; name = "Cantarell"; }; monospace = { package = pkgs.nerdfonts; name = "FuraCode Nerd Font Mono"; }; }; + opacity = 0.9; }; } ) diff --git a/modules/alacritty.nix b/modules/alacritty.nix index b9660a2..c8ac86f 100644 --- a/modules/alacritty.nix +++ b/modules/alacritty.nix @@ -1,4 +1,7 @@ { pkgs, lib, ... }: +let + strPalette = with pkgs.rice; palette.toRgbHex colorPalette; +in { # Include fonts packages home.packages = [ pkgs.rice.font.monospace.package ]; @@ -11,34 +14,27 @@ normal.family = pkgs.rice.font.monospace.name; size = 9.0; }; - background_opacity = 0.95; + background_opacity = pkgs.rice.opacity; mouse = { hide_when_typing = true; hints.modifiers = "Control"; }; - colors = with pkgs.rice; { - - primary = palette.toRgbHex colorPalette.primary; - cursor = palette.toRgbHex colorPalette.cursor; - vi_mode_cursor = palette.toRgbHex colorPalette.vi_mode_cursor; + colors = with pkgs.rice; strPalette // { selection = { text = "CellForeground"; - background = color.toRgbHex colorPalette.dim.blue; + background = strPalette.dim.blue; }; search = { matches = { foreground = "CellForeground"; - background = color.toRgbHex colorPalette.dim.cyan; + background = strPalette.dim.cyan; }; bar = { - # foreground = "CellForeground"; - background = color.toRgbHex colorPalette.dim.yellow; + foreground = strPalette.dim.cyan; + background = strPalette.dim.yellow; }; }; - normal = palette.toRgbHex colorPalette.normal; - bright = palette.toRgbHex colorPalette.bright; - dim = palette.toRgbHex colorPalette.dim; }; }; }; diff --git a/modules/polybar.nix b/modules/polybar.nix index 8078a2d..a5c7dd9 100644 --- a/modules/polybar.nix +++ b/modules/polybar.nix @@ -13,8 +13,8 @@ let colors = with pkgs.rice; palette.toARGBHex rec { normal = { - foreground = colorPalette.normal.white; - background = color.tAlphaRgba (v: 240) colorPalette.normal.black; + foreground = colorPalette.primary.foreground; + background = colorPalette.primary.background; underline = colorPalette.normal.blue; };