From df773861db0eab39752ceb8d676922ab056b716b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Fri, 9 Aug 2024 16:14:48 -0400 Subject: [PATCH] theme: add global border-radius options --- homeManagerModules/apps/rofi/default.nix | 2 +- homeManagerModules/desktop/hyprland/settings.nix | 2 +- homeManagerModules/desktop/sway/settings.nix | 2 +- homeManagerModules/services/mako/default.nix | 2 +- homeManagerModules/services/waybar/default.nix | 2 +- homes/aly/default.nix | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/homeManagerModules/apps/rofi/default.nix b/homeManagerModules/apps/rofi/default.nix index a209c4a4..2e909f9b 100644 --- a/homeManagerModules/apps/rofi/default.nix +++ b/homeManagerModules/apps/rofi/default.nix @@ -104,7 +104,7 @@ in { background-color: ${cfg.theme.colors.background}CC; border: 4; border-color: @border-color; - border-radius: 10px; + border-radius: ${toString cfg.theme.borderRadius}px; padding: 0; } mainbox { diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 8d1459da..e198a468 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -116,7 +116,7 @@ in { "ignorezero,waybar" ]; - rounding = 10; + rounding = cfg.theme.borderRadius; shadow_range = 4; shadow_render_power = 3; }; diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix index 7934b271..f92a19b1 100644 --- a/homeManagerModules/desktop/sway/settings.nix +++ b/homeManagerModules/desktop/sway/settings.nix @@ -265,7 +265,7 @@ in { blur enable blur_passes 2 - # corner_radius 10 + # corner_radius ${toString cfg.theme.borderRadius} shadows enable shadows_on_csd enable shadow_color ${cfg.theme.colors.shadow} diff --git a/homeManagerModules/services/mako/default.nix b/homeManagerModules/services/mako/default.nix index a234aead..76c43f4e 100644 --- a/homeManagerModules/services/mako/default.nix +++ b/homeManagerModules/services/mako/default.nix @@ -12,7 +12,7 @@ in { anchor = "top-center"; backgroundColor = "${cfg.theme.colors.background}99"; borderColor = "${cfg.theme.colors.primary}CC"; - borderRadius = 10; + borderRadius = cfg.theme.borderRadius; borderSize = 4; defaultTimeout = 10000; enable = true; diff --git a/homeManagerModules/services/waybar/default.nix b/homeManagerModules/services/waybar/default.nix index a739c27f..954f2eac 100644 --- a/homeManagerModules/services/waybar/default.nix +++ b/homeManagerModules/services/waybar/default.nix @@ -314,7 +314,7 @@ in { #submap, #tray, #workspaces { - border-radius: 10px; + border-radius: ${toString cfg.theme.borderRadius}px; background: ${cfg.theme.colors.background}; opacity: 1.0; margin: 5px 10px 0px 10px; diff --git a/homes/aly/default.nix b/homes/aly/default.nix index 16c22c4b..fa485e41 100644 --- a/homes/aly/default.nix +++ b/homes/aly/default.nix @@ -127,6 +127,7 @@ in { theme = { enable = true; + borderRadius = 0; colors = { text = "#e0def4";