1
0
Fork 0
forked from wry/wry

config: workspace display order

This commit is contained in:
Stipe Kotarac 2025-07-26 10:52:46 +02:00 committed by Julian Orth
parent 40328d7c4a
commit e570152dde
17 changed files with 237 additions and 11 deletions

View file

@ -35,6 +35,7 @@ use {
},
wire::JayWorkspaceId,
},
jay_config::workspace::WorkspaceDisplayOrder,
std::{
cell::{Cell, RefCell},
fmt::Debug,
@ -491,8 +492,15 @@ pub fn move_ws_to_output(
}
}
ws.set_output(&target);
let before = if target.state.workspace_display_order.get() == WorkspaceDisplayOrder::Sorted {
target
.find_workspace_insertion_point(&ws.name)
.map(|nr| nr.deref().clone())
} else {
config.before
};
'link: {
if let Some(before) = config.before
if let Some(before) = before
&& let Some(link) = &*before.output_link.borrow()
{
link.prepend_existing(ws);