From 78b6962d8aed66790fa480f00a461db7555286b1 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 1 Aug 2022 16:35:00 +0200 Subject: [PATCH] New theme + Cava config --- home_manager/modules/cava.nix | 20 ++++++++++++++++++++ home_manager/odin.nix | 1 + rice.nix | 17 +++++------------ themes/bloom.nix | 24 ++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 home_manager/modules/cava.nix create mode 100644 themes/bloom.nix diff --git a/home_manager/modules/cava.nix b/home_manager/modules/cava.nix new file mode 100644 index 0000000..6714f49 --- /dev/null +++ b/home_manager/modules/cava.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, ... }: +let + strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex colorPalette; + fmtString = str: "\'${str}\'"; +in +{ + xdg.configFile."cava/config".text = lib.generators.toINI { } { + general = { bar_width = 1; bar_spacing = 1; }; + color = { + gradient = 1; + gradient_count = 5; + gradient_color_1 = fmtString strPalette.normal.red; + gradient_color_2 = fmtString strPalette.normal.yellow; + gradient_color_3 = fmtString strPalette.normal.white; + gradient_color_4 = fmtString strPalette.normal.cyan; + gradient_color_5 = fmtString strPalette.normal.blue; + }; + smoothing = { gravity = 40; }; + }; +} diff --git a/home_manager/odin.nix b/home_manager/odin.nix index df02c26..366b1b7 100644 --- a/home_manager/odin.nix +++ b/home_manager/odin.nix @@ -126,6 +126,7 @@ ./modules/alacritty.nix ./modules/autorandr.nix ./modules/bspwm.nix + ./modules/cava.nix ./modules/easyeffects.nix ./modules/dunst.nix # ./modules/grobi.nix diff --git a/rice.nix b/rice.nix index 6b24cca..1dce1b2 100644 --- a/rice.nix +++ b/rice.nix @@ -3,27 +3,20 @@ let # nord = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/nord.nix); # onedark = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/onedark.nix); # tomorrow-night = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/tomorrow-night.nix); - mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix); + # mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix); + bloom = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/bloom.nix); in ( rec { rice = { colorPalette = with prev.lib.rice; rec { normal = palette.defaultPalette // { - black = mkpm.base2; - blue = mkpm.blue; - green = mkpm.green; - red = mkpm.red; - white = mkpm.base8; - yellow = mkpm.yellow; + inherit (bloom.normal) black red green yellow blue magenta cyan white; }; bright = palette.brighten 10 normal // { - red = mkpm.orange; - black = mkpm.base3; - }; - dark = palette.darken 10 normal // { - black = mkpm.base0; + inherit (bloom.bright) black red green yellow blue magenta cyan white; }; + dark = palette.darken 10 normal; }; font = { normal = { diff --git a/themes/bloom.nix b/themes/bloom.nix new file mode 100644 index 0000000..e8ea4a7 --- /dev/null +++ b/themes/bloom.nix @@ -0,0 +1,24 @@ +{ + normal = { + black = "#131718"; + red = "#df5b61"; + green = "#87c7a1"; + yellow = "#de8f78"; + blue = "#6791c9"; + magenta = "#bc83e3"; + cyan = "#70b9cc"; + white = "#c4c4c4"; + + }; + + bright = { + black = "#151a1c"; + red = "#ee6a70"; + green = "#96d6b0"; + yellow = "#ffb29b"; + blue = "#7ba5dd"; + magenta = "#cb92f2"; + cyan = "#7fc8db"; + white = "#cccccc"; + }; +}