Add hyprland theming
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -40,16 +40,23 @@ in
|
||||
types = mkColor "syntax" "types";
|
||||
};
|
||||
|
||||
custom_keywords = {
|
||||
flavour = hmConfig.theme.flavour;
|
||||
contrast = builtins.toString hmConfig.theme.contrast;
|
||||
opacity = builtins.toString hmConfig.theme.opacity;
|
||||
transparency = builtins.toString (1 - hmConfig.theme.opacity);
|
||||
radius = builtins.toString hmConfig.theme.radius;
|
||||
padding = builtins.toString hmConfig.theme.padding;
|
||||
double_padding = builtins.toString (hmConfig.theme.padding * 2);
|
||||
blur = builtins.toString hmConfig.theme.blur;
|
||||
};
|
||||
custom_keywords =
|
||||
let
|
||||
zeroPad = hex: if builtins.stringLength hex == 1 then "0${hex}" else hex;
|
||||
percentageToHex = percentage: zeroPad (lib.trivial.toHexString (builtins.floor (percentage * 255)));
|
||||
in
|
||||
{
|
||||
flavour = hmConfig.theme.flavour;
|
||||
contrast = builtins.toString hmConfig.theme.contrast;
|
||||
radius = builtins.toString hmConfig.theme.radius;
|
||||
padding = builtins.toString hmConfig.theme.padding;
|
||||
padding_double = builtins.toString (hmConfig.theme.padding * 2);
|
||||
blur = builtins.toString hmConfig.theme.blur;
|
||||
opacity = builtins.toString hmConfig.theme.opacity;
|
||||
opacity_hex = builtins.toString (percentageToHex hmConfig.theme.opacity);
|
||||
opacity_shadow = builtins.toString (hmConfig.theme.opacity * .75);
|
||||
opacity_shadow_hex = builtins.toString (percentageToHex (hmConfig.theme.opacity * .75));
|
||||
};
|
||||
};
|
||||
|
||||
templates = { };
|
||||
|
Reference in New Issue
Block a user