mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
fix: correctly check layout of container
This commit is contained in:
parent
f37e75da40
commit
0e6d7f0afd
1 changed files with 5 additions and 5 deletions
|
@ -137,6 +137,11 @@ fn cmd_toggle_layout(config: &Config, workspace: &Node) -> Option<String> {
|
|||
return None;
|
||||
}
|
||||
|
||||
// Don't do anything if the layout is already correct
|
||||
if &con.layout == desired_layout {
|
||||
return None
|
||||
}
|
||||
|
||||
con = &con.nodes[0];
|
||||
} else {
|
||||
// Strangely enough, setting a layout on the workspace container will create a new
|
||||
|
@ -144,11 +149,6 @@ fn cmd_toggle_layout(config: &Config, workspace: &Node) -> Option<String> {
|
|||
// we can operate on the workspace.
|
||||
}
|
||||
|
||||
// Don't do anything if the layout is already correct
|
||||
if &con.layout == desired_layout {
|
||||
return None
|
||||
}
|
||||
|
||||
let desired_layout = match desired_layout {
|
||||
NodeLayout::SplitH => "splith",
|
||||
NodeLayout::SplitV => "splitv",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue