~ruther/nixos-config

ref: 65631fe7158253199eb7d1ad180d17e4d9d57704 nixos-config/home/modules/themes.nix -rw-r--r-- 1.8 KiB
65631fe7 — Frantisek Bohacek feat: add support for Guix 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib, ... }:

let
  mkColorOption = description: lib.mkOption {
    inherit description;
    type = lib.types.str;
  };
in {
  options = {
    themes = lib.mkOption {
      type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
        options = {
          foreground = {
            primary = mkColorOption "Primary color for foreground (text)";
            secondary = mkColorOption "Secondary color for foreground (text)";
            text = mkColorOption "Basic text color for stuff that's not primary, secondary etc.";

            active = mkColorOption "Color for foreground (text) when element is active";
            activeAlt = mkColorOption "Color for foreground when element is active, and `active` color is used as background instead";

            inactive = mkColorOption "Color for foreground (text) when element is inactive";
          };
          background = {
            primary = mkColorOption "Primary color for background";
            secondary = mkColorOption "Primary color for background";
            box = mkColorOption "Color for box elements";
            inactive = mkColorOption "Color for foreground (text) when element is inactive";
            active = mkColorOption "Color for background when element is active. When this is in use, use `foreground.activeAlt` for text.";
          };

          urgent = mkColorOption "Urgent windows";
        };
      }));
    };
  };

  config = {
    themes.default = {
      foreground = {
        primary = "51afef";
        secondary = "55eddc";
        activeAlt = "d5d5d5";
        text = "cccccc";
        active = "8babf0";
        inactive = "737373";
      };
      background = {
        primary = "222223";
        secondary = "444444";
        active = "8babf0";
        inactive = "555e60";
        box = "121212";
      };
      urgent = "c45500";
    };
  };
}
Do not follow this link