{
  config,
  lib,
  ...
}:
let
  border-size = toString config.theme.border-size;
  gaps-in = toString config.theme.gaps-in;
  gaps-out = toString config.theme.gaps-out;
  active-opacity = toString config.theme.active-opacity;
  inactive-opacity = toString config.theme.inactive-opacity;
  rounding = toString config.theme.rounding;
  inherit (config.theme) blur;
  inactive-border = "rgb(" + config.theme.colors.base00 + ")";
  active-border = "rgb(" + config.theme.colors.base05 + ")";
in
{
  wayland.windowManager.hyprland.settings = {
    general = {
      resize_on_border = true;
      gaps_in = gaps-in;
      gaps_out = gaps-out;
      border_size = border-size;
      layout = "dwindle";
      "col.active_border" = lib.mkForce active-border;
      "col.inactive_border" = lib.mkForce inactive-border;
    };

    decoration = {
      inherit rounding;
      active_opacity = active-opacity;
      inactive_opacity = inactive-opacity;
      shadow = {
        enabled = true;
        range = 20;
        render_power = 3;
      };
      blur = {
        enabled = if blur then "true" else "false";
        size = 18;
      };
    };
  };
}
