From e16a885a5ea84f675a2bb6352bba8c7249acd2b9 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Mon, 27 Oct 2025 08:28:53 -0700 Subject: [PATCH] feat(config): add border radius option This commit adds a border_radius configuratino option which defaults to 10, which matches the uniform radius on Sequoia. Tahoe is a mess, but people can at least specify their own preferred border radius value now. Eventually we should look up the radius of each individual window when creating the borders like JankyBorders does (I think?) --- komorebi/src/static_config.rs | 7 ++++++- schema.json | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index f2dc18cc..b2a51846 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -425,7 +425,10 @@ pub struct StaticConfig { #[serde(skip_serializing_if = "Option::is_none")] #[serde(alias = "active_window_border_offset")] pub border_offset: Option, - /// Display an active window border (default: true) + /// Radius of the window border (default: 10) + #[serde(skip_serializing_if = "Option::is_none")] + pub border_radius: Option, + /// Display window borders (default: true) #[serde(skip_serializing_if = "Option::is_none")] #[serde(alias = "active_window_border")] pub border: Option, @@ -754,6 +757,7 @@ impl From<&WindowManager> for StaticConfig { app_specific_configuration_path: None, border_width: Option::from(border_manager::BORDER_WIDTH.load(Ordering::SeqCst)), border_offset: Option::from(border_manager::BORDER_OFFSET.load(Ordering::SeqCst)), + border_radius: Option::from(border_manager::BORDER_RADIUS.load(Ordering::SeqCst)), border: Option::from(border_manager::BORDER_ENABLED.load(Ordering::SeqCst)), border_colours, // transparency: Option::from( @@ -881,6 +885,7 @@ impl StaticConfig { border_manager::BORDER_WIDTH.store(self.border_width.unwrap_or(6), Ordering::SeqCst); border_manager::BORDER_OFFSET.store(self.border_offset.unwrap_or(5), Ordering::SeqCst); + border_manager::BORDER_RADIUS.store(self.border_radius.unwrap_or(10), Ordering::SeqCst); border_manager::BORDER_ENABLED.store(self.border.unwrap_or(true), Ordering::SeqCst); if let Some(colours) = &self.border_colours { diff --git a/schema.json b/schema.json index 442b7857..9b42c2a5 100644 --- a/schema.json +++ b/schema.json @@ -21,7 +21,7 @@ ] }, "border": { - "description": "Display an active window border (default: true)", + "description": "Display window borders (default: true)", "type": "boolean" }, "border_colours": { @@ -352,6 +352,11 @@ ] } }, + "border_radius": { + "description": "Radius of the window border (default: 10)", + "type": "integer", + "format": "int32" + }, "border_width": { "description": "Width of the window border (default: 6)", "type": "integer",