{
  config,
  flake,
  ...
}:
let

  inherit (flake.config.aesthetics.themes)
    currentTheme
    palettes
    fonts
    windowManager
    ;

  inherit (flake.config.people) user0;

  user = config.home.username;

  themeLogic = if user == user0 then currentTheme else currentTheme;

  el = palettes.${themeLogic}.colours;

  custom = {
    font = fonts.name;
    font_size = fonts.sizes.popups;
    font_weight = "bold";
    opacityBg = "0.90";
    opacityBt = "1";
    border = windowManager.borders;
    rounding = windowManager.rounding;
    text_color = el.base0E;
    secondary_accent = el.base07;
    tertiary_accent = el.base15;
    button_color = el.base04;
    background_1 = el.base01;
    background_2 = el.base00;
    background_3 = el.base04;
  };

  fontSizeMod = plus: builtins.toString (custom.font_size + plus);
in
''

  * {
      min-height: 34px;
      border-radius: 0;
      font-family: ${custom.font};
      font-weight: ${custom.font_weight};
  }

  window#waybar {
      background: #${custom.background_2};
      color: #${custom.text_color};
      border: ${builtins.toString custom.border}px solid;
      border-radius: ${builtins.toString custom.rounding}px;
      border-color: #${custom.text_color};
      opacity: ${custom.opacityBg};
  }

  #workspaces {
      font-size: ${fontSizeMod 6}px;
      padding-left: 5px;
      margin-bottom: 0px;
  }
  #workspaces button {
      color: #${custom.button_color};
      padding: 0px 5px 0px 5px;
      opacity: ${custom.opacityBt};
  }
  #workspaces button.empty {
      color: #${custom.background_3};
  }
  #workspaces button.active {
      color: #${custom.text_color};
  }

  #tray, #pulseaudio, #privacy, #cpu, #memory, #disk, #clock {
      font-size: ${builtins.toString custom.font_size}px;
      color: #${custom.text_color};
      padding-right: 10px;
  }

  #privacy {
  }

  #cpu {
  }

  #memory {
  }

  #disk {
  }

  #tray {
  }

  #pulseaudio {
  }

  #clock {
  }

  #battery {
      font-size: ${builtins.toString custom.font_size}px;
      color: #${custom.text_color};
      padding-right: 10px;
  }

  #custom-launcher {
      font-size: ${fontSizeMod 8}px;
      color: #${custom.text_color};
      font-weight: ${custom.font_weight};
      padding-left: 10px;
      padding-right: 10px;
  }

  #custom-weather {
      font-size: ${fontSizeMod 2}px;
      color: #${custom.text_color};
      font-weight: ${custom.font_weight};
  }
''
