summaryrefslogtreecommitdiff
path: root/common/modules/matugen/templates/matugen-terminal.nix
blob: 4d7106e75c3df2eeed07ca0f91d8646ca1639b7d (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
  config,
  lib,
  ...
}:
{
  config = lib.mkMerge [
    (lib.mkIf config.beeMods.terminal.foot {
      xdg.configFile."matugen/templates/foot-colors.ini" = {
        text = ''
          [colors-dark]
          foreground={{colors.on_surface.default.hex_stripped}}
          <* if {{ is_dark_mode }} *>
          background={{colors.surface.default.hex_stripped}}
          <* else *>
          background={{colors.surface_container_low.default.hex_stripped}}
          <* endif *>
          selection-foreground={{colors.on_primary_container.default.hex_stripped}}
          selection-background={{colors.primary_container.default.hex_stripped}}
          cursor = {{colors.on_primary.default.hex_stripped}} {{colors.primary.default.hex_stripped}}

          regular0={{colors.surface_container_high.default.hex_stripped}}
          regular1={{colors.error.default.hex_stripped}}
          regular2={{colors.primary.default.hex_stripped}}
          regular3={{colors.tertiary.default.hex_stripped}}
          regular4={{colors.secondary.default.hex_stripped}}
          regular5={{colors.primary_fixed.default.hex_stripped}}
          regular6={{colors.secondary_fixed.default.hex_stripped}}
          regular7={{colors.on_surface_variant.default.hex_stripped}}

          bright0={{colors.outline.default.hex_stripped}}
          bright1={{colors.error.default.hex_stripped | to_color | lighten: 10.0}}
          bright2={{colors.primary_container.default.hex_stripped}}
          bright3={{colors.tertiary_container.default.hex_stripped}}
          bright4={{colors.secondary_container.default.hex_stripped}}
          bright5={{colors.inverse_primary.default.hex_stripped}}
          bright6={{colors.outline_variant.default.hex_stripped}}
          bright7={{colors.on_surface.default.hex_stripped}}

          # dim-blend-towards=<* if {{ is_dark_mode }} *>black<* else *>white<* endif *>
        '';
      };
    })
    (lib.mkIf config.beeMods.terminal.alacritty {
      xdg.configFile."matugen/templates/alacritty-colors.toml" = {
        text = ''
          [colors.primary]
          <* if {{ is_dark_mode }} *>
          background = '{{colors.background.default.hex}}'
          <* else *>
          background = '{{colors.surface_container_low.default.hex}}'
          <* endif *>
          foreground = '{{colors.on_surface.default.hex}}'

          [colors.selection]
          text = '{{colors.on_surface.default.hex}}'
          background = '{{colors.primary_container.default.hex}}'

          [colors.cursor]
          text = '{{colors.background.default.hex}}'
          cursor = '{{colors.primary.default.hex}}'

          [colors.normal]
          black   = '{{colors.surface_container_high.default.hex}}'
          red     = '{{colors.error.default.hex}}'
          green   = '{{colors.primary.default.hex}}'
          yellow  = '{{colors.tertiary.default.hex}}'
          blue    = '{{colors.secondary.default.hex}}'
          magenta = '{{colors.primary_fixed.default.hex}}'
          cyan    = '{{colors.secondary_fixed.default.hex}}'
          white   = '{{colors.on_surface_variant.default.hex}}'

          [colors.bright]
          black   = '{{colors.outline.default.hex}}'
          red     = '{{colors.error_container.default.hex | to_color | lighten: 10.0}}'
          green   = '{{colors.primary_container.default.hex}}'
          yellow  = '{{colors.tertiary_container.default.hex}}'
          blue    = '{{colors.secondary_container.default.hex}}'
          magenta = '{{colors.inverse_primary.default.hex}}'
          cyan    = '{{colors.outline_variant.default.hex}}'
          white   = '{{colors.on_surface.default.hex}}'

        '';
      };
    })
    (lib.mkIf config.beeMods.terminal.ghostty {
      xdg.configFile."matugen/templates/ghostty-colors.conf" = {
        text = ''
          <* if {{ is_dark_mode }} *>
          background = {{colors.background.default.hex}}
          <* else *>
          background = {{colors.surface_container_low.default.hex}}
          <* endif *>
          foreground = {{colors.on_surface.default.hex}}
          cursor-color = {{colors.primary.default.hex}}
          selection-background = {{colors.primary_container.default.hex}}
          selection-foreground = {{colors.on_surface.default.hex}}

          palette = 0={{colors.surface_container_high.default.hex}}
          palette = 1={{colors.error.default.hex}}
          palette = 2={{colors.primary.default.hex}}
          palette = 3={{colors.tertiary.default.hex}}
          palette = 4={{colors.secondary.default.hex}}
          palette = 5={{colors.primary_fixed.default.hex}}
          palette = 6={{colors.secondary_fixed.default.hex}}
          palette = 7={{colors.on_surface_variant.default.hex}}
          palette = 8={{colors.outline.default.hex}}
          palette = 9={{colors.error_container.default.hex | to_color | lighten: 10.0}}
          palette = 10={{colors.primary_container.default.hex}}
          palette = 11={{colors.tertiary_container.default.hex}}
          palette = 12={{colors.secondary_container.default.hex}}
          palette = 13={{colors.inverse_primary.default.hex}}
          palette = 14={{colors.outline_variant.default.hex}}
          palette = 15={{colors.on_surface.default.hex}}
        '';
      };
    })
  ];
}