summaryrefslogtreecommitdiff
path: root/common/modules/matugen/templates/matugen-waybar.nix
blob: acdb78863be16ca27bad86602aea7a4e8f1a8b62 (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
{
  config,
  lib,
  ...
}:
{
  config = lib.mkIf config.beeMods.mango.waybar {
    xdg.configFile."matugen/templates/waybar.css" = {
      text = ''
        ${lib.optionalString (config.beeMods.mango.window.blur.enable) ''
          <* if {{ is_dark_mode }} *>
          @define-color bg_panel rgba({{colors.surface.default.red}}, {{colors.surface.default.green}}, {{colors.surface.default.blue}}, 0.9);
          <* else *>
          @define-color bg_panel rgba({{colors.surface_container.default.red}}, {{colors.surface_container.default.green}}, {{colors.surface_container.default.blue}}, 0.9);
          <* endif *>
        ''}
        ${lib.optionalString (!config.beeMods.mango.window.blur.enable) ''
          <* if {{ is_dark_mode }} *>
          @define-color bg_panel  {{colors.surface.default.hex}};          
          <* else *>
          @define-color bg_panel  {{colors.surface_container.default.hex}};          
          <* endif *>
        ''}

        @define-color bg_base transparent;
        @define-color border_color {{colors.primary.default.hex}};
        @define-color text_main {{colors.primary.default.hex}};
        @define-color text_dark {{colors.surface_container_highest.default.hex}};
        @define-color alert_urgent {{colors.error.default.hex}};
        @define-color alert_minimized {{colors.error_container.default.hex}};
        @define-color alert_critical {{colors.on_error_container.default.hex}};
      '';
    };
  };
}