From 182bdde6e3a3a50d8a7bf324b7ad441efa2706a3 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 7 Nov 2020 11:27:41 +0100 Subject: [PATCH] home: Modularise solarized colorscheme --- users/simon/modules/alacritty.nix | 43 +++++++++++++++++-------------- users/simon/modules/common.nix | 20 ++++++++++++++ 2 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 users/simon/modules/common.nix diff --git a/users/simon/modules/alacritty.nix b/users/simon/modules/alacritty.nix index d87ca6b..48871e3 100644 --- a/users/simon/modules/alacritty.nix +++ b/users/simon/modules/alacritty.nix @@ -1,41 +1,44 @@ let + common = import ./common.nix; + solarized = common.colorschemes.solarized; + colorschemes = { # https://github.com/alacritty/alacritty/wiki/Color-schemes#solarized solarized-dark = { # Default colors primary = { - background = "#002b36"; # base03 - foreground = "#839496"; # base0 + background = solarized.base03; + foreground = solarized.base0; }; # Cursor colors cursor = { - text = "#002b36"; # base03 - cursor = "#839496"; # base0 + text = solarized.base03; + cursor = solarized.base0; }; # Normal colors normal = { - black = "#073642"; # base02 - red = "#dc322f"; # red - green = "#859900"; # green - yellow = "#b58900"; # yellow - blue = "#268bd2"; # blue - magenta = "#d33682"; # magenta - cyan = "#2aa198"; # cyan - white = "#eee8d5"; # base2 + black = solarized.base02; + red = solarized.red; + green = solarized.green; + yellow = solarized.yellow; + blue = solarized.blue; + magenta = solarized.magenta; + cyan = solarized.cyan; + white = solarized.base2; }; # Bright colors bright = { - black = "#002b36"; # base03 - red = "#cb4b16"; # orange - green = "#586e75"; # base01 - yellow = "#657b83"; # base00 - blue = "#839496"; # base0 - magenta = "#6c71c4"; # violet - cyan = "#93a1a1"; # base1 - white = "#fdf6e3"; # base3 + black = solarized.base03; + red = solarized.orange; + green = solarized.base01; + yellow = solarized.base00; + blue = solarized.base0; + magenta = solarized.violet; + cyan = solarized.base1; + white = solarized.base3; }; }; }; diff --git a/users/simon/modules/common.nix b/users/simon/modules/common.nix new file mode 100644 index 0000000..764acef --- /dev/null +++ b/users/simon/modules/common.nix @@ -0,0 +1,20 @@ +{ + colorschemes.solarized = { + base03 = "#002b36"; + base02 = "#073642"; + base01 = "#586e75"; + base00 = "#657b83"; + base0 = "#839496"; + base1 = "#93a1a1"; + base2 = "#eee8d5"; + base3 = "#fdf6e3"; + yellow = "#b58900"; + orange = "#cb4b16"; + red = "#dc322f"; + magenta = "#d33682"; + violet = "#6c71c4"; + blue = "#268bd2"; + cyan = "#2aa198"; + green = "#859900"; + }; +}