From 58d660eb167f3963fefb9b1192eed81a7b00c917 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Tue, 28 Jan 2025 15:58:17 -0800 Subject: [PATCH] feat(borders): add floating colour for windows impl This commits adds support for focused floating window colours on borders when using the "Windows" border implementation. --- komorebi/src/border_manager/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/komorebi/src/border_manager/mod.rs b/komorebi/src/border_manager/mod.rs index c9338344..88b088fb 100644 --- a/komorebi/src/border_manager/mod.rs +++ b/komorebi/src/border_manager/mod.rs @@ -211,6 +211,16 @@ pub fn handle_notifications(wm: Arc>) -> color_eyre::Result .unwrap_or_default() .set_accent(window_kind_colour(window_kind))?; } + + for window in ws.floating_windows() { + let mut window_kind = WindowKind::Unfocused; + + if foreground_window == window.hwnd { + window_kind = WindowKind::Floating; + } + + window.set_accent(window_kind_colour(window_kind))?; + } } } }