{ config, pkgs, lib, ... }:

{
  services.swayosd = {
    enable = lib.mkDefault true;
    stylePath = lib.mkDefault "${config.home.homeDirectory}/.config/swayosd/style.css";
  };

  xdg.configFile."swayosd/style.css".text = lib.mkDefault ''
    @define-color background-color #${config.colorScheme.palette.base00};
    @define-color border-color #${config.colorScheme.palette.base0E};
    @define-color label #${config.colorScheme.palette.base05};
    @define-color image #${config.colorScheme.palette.base05};
    @define-color progress #${config.colorScheme.palette.base0B};

    window {
      border-radius: 0;
      opacity: 0.97;
      border: 2px solid @border-color;
      background-color: @background-color;
    }

    label {
      font-family: '${config.nomarchy.fonts.monospace}';
      font-size: 11pt;
      color: @label;
    }

    image {
      color: @image;
    }

    progressbar {
      border-radius: 0;
    }

    progress {
      background-color: @progress;
    }
  '';
}
