mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
feat(config): add floating border colour opt
This commit is contained in:
@@ -96,6 +96,8 @@ pub struct BorderColours {
|
|||||||
pub stack: Option<Colour>,
|
pub stack: Option<Colour>,
|
||||||
/// Border colour when the container is in monocle mode
|
/// Border colour when the container is in monocle mode
|
||||||
pub monocle: Option<Colour>,
|
pub monocle: Option<Colour>,
|
||||||
|
/// Border colour when the container is in floating mode
|
||||||
|
pub floating: Option<Colour>,
|
||||||
/// Border colour when the container is unfocused
|
/// Border colour when the container is unfocused
|
||||||
pub unfocused: Option<Colour>,
|
pub unfocused: Option<Colour>,
|
||||||
}
|
}
|
||||||
@@ -525,6 +527,7 @@ impl From<&WindowManager> for StaticConfig {
|
|||||||
single: Option::from(Colour::from(border_manager::FOCUSED.load(Ordering::SeqCst))),
|
single: Option::from(Colour::from(border_manager::FOCUSED.load(Ordering::SeqCst))),
|
||||||
stack: Option::from(Colour::from(border_manager::STACK.load(Ordering::SeqCst))),
|
stack: Option::from(Colour::from(border_manager::STACK.load(Ordering::SeqCst))),
|
||||||
monocle: Option::from(Colour::from(border_manager::MONOCLE.load(Ordering::SeqCst))),
|
monocle: Option::from(Colour::from(border_manager::MONOCLE.load(Ordering::SeqCst))),
|
||||||
|
floating: Option::from(Colour::from(border_manager::FLOATING.load(Ordering::SeqCst))),
|
||||||
unfocused: Option::from(Colour::from(
|
unfocused: Option::from(Colour::from(
|
||||||
border_manager::UNFOCUSED.load(Ordering::SeqCst),
|
border_manager::UNFOCUSED.load(Ordering::SeqCst),
|
||||||
)),
|
)),
|
||||||
@@ -652,6 +655,10 @@ impl StaticConfig {
|
|||||||
border_manager::MONOCLE.store(u32::from(monocle), Ordering::SeqCst);
|
border_manager::MONOCLE.store(u32::from(monocle), Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(floating) = colours.floating {
|
||||||
|
border_manager::FLOATING.store(u32::from(floating), Ordering::SeqCst);
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(unfocused) = colours.unfocused {
|
if let Some(unfocused) = colours.unfocused {
|
||||||
border_manager::UNFOCUSED.store(u32::from(unfocused), Ordering::SeqCst);
|
border_manager::UNFOCUSED.store(u32::from(unfocused), Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,9 @@ impl Default for GlobalState {
|
|||||||
monocle: Option::from(Colour::Rgb(Rgb::from(
|
monocle: Option::from(Colour::Rgb(Rgb::from(
|
||||||
border_manager::MONOCLE.load(Ordering::SeqCst),
|
border_manager::MONOCLE.load(Ordering::SeqCst),
|
||||||
))),
|
))),
|
||||||
|
floating: Option::from(Colour::Rgb(Rgb::from(
|
||||||
|
border_manager::FLOATING.load(Ordering::SeqCst),
|
||||||
|
))),
|
||||||
unfocused: Option::from(Colour::Rgb(Rgb::from(
|
unfocused: Option::from(Colour::Rgb(Rgb::from(
|
||||||
border_manager::UNFOCUSED.load(Ordering::SeqCst),
|
border_manager::UNFOCUSED.load(Ordering::SeqCst),
|
||||||
))),
|
))),
|
||||||
|
|||||||
Reference in New Issue
Block a user