mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 13:51:19 +01:00
feat(wm): add layout_options with ratios support
This commit adds parity with the layout_options and ratio support added to LGUG2Z/komorebi@22e8a79833 by @CtByte, which is largely integrated into komorebi for Mac through the importing of the new komorebi-layouts crate.
This commit is contained in:
1 parent
ceba46f878
commit
a11138ec91
6 files changed
+134
-117
No files matched your search
Generated
+2
-2
@@ -3091,7 +3091,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "komorebi-layouts"
|
||||
version = "0.1.40"
|
||||
source = "git+https://github.com/LGUG2Z/komorebi?rev=b4f00fbc1257ab858aa4f45c06a8d3f176aee9a0#b4f00fbc1257ab858aa4f45c06a8d3f176aee9a0"
|
||||
source = "git+https://github.com/LGUG2Z/komorebi?rev=98122bd9d4aabbff927a29228acf6c8a0246c509#98122bd9d4aabbff927a29228acf6c8a0246c509"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"color-eyre",
|
||||
@@ -3107,7 +3107,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "komorebi-themes"
|
||||
version = "0.1.40"
|
||||
source = "git+https://github.com/LGUG2Z/komorebi?rev=b4f00fbc1257ab858aa4f45c06a8d3f176aee9a0#b4f00fbc1257ab858aa4f45c06a8d3f176aee9a0"
|
||||
source = "git+https://github.com/LGUG2Z/komorebi?rev=98122bd9d4aabbff927a29228acf6c8a0246c509#98122bd9d4aabbff927a29228acf6c8a0246c509"
|
||||
dependencies = [
|
||||
"base16-egui-themes",
|
||||
"catppuccin-egui",
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ members = [
|
||||
version = "0.1.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
komorebi-themes = { git = "https://github.com/LGUG2Z/komorebi", rev = "b4f00fbc1257ab858aa4f45c06a8d3f176aee9a0" }
|
||||
komorebi-layouts = { git = "https://github.com/LGUG2Z/komorebi", rev = "b4f00fbc1257ab858aa4f45c06a8d3f176aee9a0", features = [
|
||||
komorebi-themes = { git = "https://github.com/LGUG2Z/komorebi", rev = "98122bd9d4aabbff927a29228acf6c8a0246c509" }
|
||||
komorebi-layouts = { git = "https://github.com/LGUG2Z/komorebi", rev = "98122bd9d4aabbff927a29228acf6c8a0246c509", features = [
|
||||
"darwin",
|
||||
"schemars",
|
||||
] }
|
||||
|
||||
@@ -284,7 +284,13 @@ impl From<&Workspace> for WorkspaceConfig {
|
||||
Layout::Default(layout) => Option::from(layout),
|
||||
})
|
||||
.flatten(),
|
||||
layout_options: value.layout_options,
|
||||
layout_options: {
|
||||
tracing::debug!(
|
||||
"Parsing workspace config - layout_options: {:?}",
|
||||
value.layout_options
|
||||
);
|
||||
value.layout_options
|
||||
},
|
||||
// custom_layout: value
|
||||
// .workspace_config
|
||||
// .as_ref()
|
||||
|
||||
@@ -209,6 +209,12 @@ impl Workspace {
|
||||
self.wallpaper = config.wallpaper.clone();
|
||||
self.layout_options = config.layout_options;
|
||||
|
||||
tracing::debug!(
|
||||
"Workspace '{}' loaded layout_options: {:?}",
|
||||
self.name.as_deref().unwrap_or("unnamed"),
|
||||
self.layout_options
|
||||
);
|
||||
|
||||
self.workspace_config = Some(config.clone());
|
||||
|
||||
Ok(())
|
||||
@@ -1210,6 +1216,11 @@ impl Workspace {
|
||||
window.set_position(&adjusted_work_area)?;
|
||||
};
|
||||
} else if !self.containers().is_empty() {
|
||||
tracing::debug!(
|
||||
"Workspace '{}' update() - self.layout_options before calculate: {:?}",
|
||||
self.name.as_deref().unwrap_or("unnamed"),
|
||||
self.layout_options
|
||||
);
|
||||
let mut layouts = self.layout.as_boxed_arrangement().calculate(
|
||||
&adjusted_work_area,
|
||||
NonZeroUsize::new(self.containers().len()).ok_or_eyre(
|
||||
|
||||
@@ -1040,6 +1040,17 @@ in
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
auto_select_text = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
(lib.types.nullOr catppuccinValue)
|
||||
(lib.types.nullOr base16Value)
|
||||
]
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
auto_select_fill = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
@@ -1348,17 +1359,6 @@ in
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
auto_select_text = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
(lib.types.nullOr catppuccinValue)
|
||||
(lib.types.nullOr base16Value)
|
||||
]
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
+101
-101
@@ -788,7 +788,7 @@ in
|
||||
]
|
||||
);
|
||||
};
|
||||
floating_border = lib.mkOption {
|
||||
bar_accent = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
@@ -799,7 +799,18 @@ in
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
stack_border = lib.mkOption {
|
||||
unfocused_border = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
(lib.types.nullOr catppuccinValue)
|
||||
(lib.types.nullOr base16Value)
|
||||
]
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
monocle_border = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
@@ -821,7 +832,93 @@ in
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
unfocused_border = lib.mkOption {
|
||||
colours = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
base_00 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base00";
|
||||
};
|
||||
base_01 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base01";
|
||||
};
|
||||
base_02 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base02";
|
||||
};
|
||||
base_03 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base03";
|
||||
};
|
||||
base_04 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base04";
|
||||
};
|
||||
base_05 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base05";
|
||||
};
|
||||
base_06 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base06";
|
||||
};
|
||||
base_07 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base07";
|
||||
};
|
||||
base_08 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base08";
|
||||
};
|
||||
base_09 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base09";
|
||||
};
|
||||
base_0a = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0A";
|
||||
};
|
||||
base_0b = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0B";
|
||||
};
|
||||
base_0c = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0C";
|
||||
};
|
||||
base_0d = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0D";
|
||||
};
|
||||
base_0e = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0E";
|
||||
};
|
||||
base_0f = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0F";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
unfocused_locked_border = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
(lib.types.nullOr catppuccinValue)
|
||||
(lib.types.nullOr base16Value)
|
||||
]
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
floating_border = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
@@ -1118,104 +1215,7 @@ in
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
unfocused_locked_border = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
(lib.types.nullOr catppuccinValue)
|
||||
(lib.types.nullOr base16Value)
|
||||
]
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
colours = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
base_00 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base00";
|
||||
};
|
||||
base_01 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base01";
|
||||
};
|
||||
base_02 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base02";
|
||||
};
|
||||
base_03 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base03";
|
||||
};
|
||||
base_04 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base04";
|
||||
};
|
||||
base_05 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base05";
|
||||
};
|
||||
base_06 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base06";
|
||||
};
|
||||
base_07 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base07";
|
||||
};
|
||||
base_08 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base08";
|
||||
};
|
||||
base_09 = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base09";
|
||||
};
|
||||
base_0a = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0A";
|
||||
};
|
||||
base_0b = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0B";
|
||||
};
|
||||
base_0c = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0C";
|
||||
};
|
||||
base_0d = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0D";
|
||||
};
|
||||
base_0e = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0E";
|
||||
};
|
||||
base_0f = lib.mkOption {
|
||||
type = colour;
|
||||
description = "Base0F";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
bar_accent = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
(lib.types.nullOr catppuccinValue)
|
||||
(lib.types.nullOr base16Value)
|
||||
]
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
};
|
||||
monocle_border = lib.mkOption {
|
||||
stack_border = lib.mkOption {
|
||||
type = (
|
||||
lib.types.nullOr (
|
||||
lib.types.oneOf [
|
||||
|
||||
Reference in new issue
Block a user