From 38ce53c779ee67d033c455e55dc96f1b6cf7bf1b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 15 Aug 2024 18:31:07 -0400 Subject: [PATCH] theme: borderRadius -> borders.radius --- homeManagerModules/apps/fuzzel/default.nix | 2 +- homeManagerModules/apps/rofi/default.nix | 2 +- homeManagerModules/desktop/hyprland/settings.nix | 2 +- homeManagerModules/desktop/sway/settings.nix | 2 +- homeManagerModules/options.nix | 10 ++++++---- homeManagerModules/services/mako/default.nix | 2 +- homeManagerModules/services/swayosd/default.nix | 2 +- homeManagerModules/services/waybar/default.nix | 14 +++++++------- homeManagerModules/theme.nix | 2 +- homes/aly/default.nix | 2 +- 10 files changed, 21 insertions(+), 19 deletions(-) diff --git a/homeManagerModules/apps/fuzzel/default.nix b/homeManagerModules/apps/fuzzel/default.nix index 821aad98..d263bd9a 100644 --- a/homeManagerModules/apps/fuzzel/default.nix +++ b/homeManagerModules/apps/fuzzel/default.nix @@ -10,7 +10,7 @@ in { enable = true; settings = { border = { - radius = cfg.theme.borderRadius; + radius = cfg.theme.borders.radius; width = 4; }; diff --git a/homeManagerModules/apps/rofi/default.nix b/homeManagerModules/apps/rofi/default.nix index 18576622..d2489b44 100644 --- a/homeManagerModules/apps/rofi/default.nix +++ b/homeManagerModules/apps/rofi/default.nix @@ -89,7 +89,7 @@ in { background-color = mkLiteral "@background"; border = 4; border-color = mkLiteral "@blue"; - border-radius = mkLiteral "${toString cfg.theme.borderRadius}"; + border-radius = mkLiteral "${toString cfg.theme.borders.radius}"; }; message = { diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index fd8cb998..1a1bfabc 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -118,7 +118,7 @@ in { "ignorezero,waybar" ]; - rounding = cfg.theme.borderRadius; + rounding = cfg.theme.borders.radius; shadow_range = 4; shadow_render_power = 3; }; diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix index 5e993581..9cba6753 100644 --- a/homeManagerModules/desktop/sway/settings.nix +++ b/homeManagerModules/desktop/sway/settings.nix @@ -256,7 +256,7 @@ in { blur enable blur_passes 2 - # corner_radius ${toString cfg.theme.borderRadius} + # corner_radius ${toString cfg.theme.borders.radius} shadows enable shadows_on_csd enable shadow_color ${config.lib.stylix.colors.withHashtag."base00"}CC diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index 1d61927e..b7b62a11 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -201,10 +201,12 @@ in { theme = { enable = lib.mkEnableOption "Gtk, Qt, and application colors."; - borderRadius = lib.mkOption { - description = "Global border radius."; - default = 10; - type = lib.types.int; + borders = { + radius = lib.mkOption { + description = "Global border radius."; + default = 10; + type = lib.types.int; + }; }; gtk.hideTitleBar = lib.mkOption { diff --git a/homeManagerModules/services/mako/default.nix b/homeManagerModules/services/mako/default.nix index d4ba3c93..fdb9da8f 100644 --- a/homeManagerModules/services/mako/default.nix +++ b/homeManagerModules/services/mako/default.nix @@ -10,7 +10,7 @@ in { services.mako = { actions = true; anchor = "bottom-right"; - borderRadius = cfg.theme.borderRadius; + borderRadius = cfg.theme.borders.radius; borderSize = 4; defaultTimeout = 10000; enable = true; diff --git a/homeManagerModules/services/swayosd/default.nix b/homeManagerModules/services/swayosd/default.nix index 886ad083..3f4bbb0b 100644 --- a/homeManagerModules/services/swayosd/default.nix +++ b/homeManagerModules/services/swayosd/default.nix @@ -26,7 +26,7 @@ in { text = '' window#osd { padding: 12px 20px; - border-radius: ${toString cfg.theme.borderRadius}px; + border-radius: ${toString cfg.theme.borders.radius}px; border: 4px solid alpha(${config.lib.stylix.colors.withHashtag."base07"}, ${toString config.stylix.opacity.popups}); background: alpha(${config.lib.stylix.colors.withHashtag."base01"}, ${toString config.stylix.opacity.popups}); } diff --git a/homeManagerModules/services/waybar/default.nix b/homeManagerModules/services/waybar/default.nix index 3107b8de..7d79ff94 100644 --- a/homeManagerModules/services/waybar/default.nix +++ b/homeManagerModules/services/waybar/default.nix @@ -301,7 +301,7 @@ in { } #workspaces button { - border-radius: ${toString cfg.theme.borderRadius}; + border-radius: ${toString cfg.theme.borders.radius}; } #workspaces button.active, @@ -327,7 +327,7 @@ in { #submap, #mode { background-color: ${config.lib.stylix.colors.withHashtag."base08"}; - border-radius: ${toString cfg.theme.borderRadius}; + border-radius: ${toString cfg.theme.borders.radius}; color: ${config.lib.stylix.colors.withHashtag."base00"}; font-weight: bold; } @@ -352,25 +352,25 @@ in { entry { background-color: rgba (0, 0, 0, 0.2); border: alpha(${config.lib.stylix.colors.withHashtag."base07"}, ${toString config.stylix.opacity.popups}); - border-radius: ${toString cfg.theme.borderRadius}px + border-radius: ${toString cfg.theme.borders.radius}px } button, image { background: none; border: none; - border-radius: ${toString cfg.theme.borderRadius}px + border-radius: ${toString cfg.theme.borders.radius}px } button:active, button:hover, button:focused { background-color: alpha (${config.lib.stylix.colors.withHashtag."base05"}, 0.2); border: none; - border-radius: ${toString cfg.theme.borderRadius}px; + border-radius: ${toString cfg.theme.borders.radius}px; color: ${config.lib.stylix.colors.withHashtag."base0D"} } #category-button { margin: 0 10px 0 10px; - border-radius: ${toString cfg.theme.borderRadius}px + border-radius: ${toString cfg.theme.borders.radius}px } #pinned-box { @@ -381,7 +381,7 @@ in { #files-box { padding: 5px; border: 1px dotted gray; - border-radius: ${toString cfg.theme.borderRadius}px + border-radius: ${toString cfg.theme.borders.radius}px } ''; }; diff --git a/homeManagerModules/theme.nix b/homeManagerModules/theme.nix index df60cdb1..382b1582 100644 --- a/homeManagerModules/theme.nix +++ b/homeManagerModules/theme.nix @@ -37,7 +37,7 @@ in { stylix.targets.gtk.extraCss = '' // Control rounded corners - window.background { border-radius: ${toString cfg.borderRadius}; } + window.background { border-radius: ${toString cfg.borders.radius}; } ${ lib.strings.optionalString diff --git a/homes/aly/default.nix b/homes/aly/default.nix index a7c392c8..000a4b82 100644 --- a/homes/aly/default.nix +++ b/homes/aly/default.nix @@ -115,7 +115,7 @@ self: { theme = { enable = true; - borderRadius = 0; + borders.radius = 0; }; }; }