For unnamed niri workspaces use their niri workspace idx as workspace name
This mirrors the behavior of sway as sway ipc sets the sway workspace number as name for unnamed sway workspaces
This commit is contained in:
parent
75492df065
commit
e64359806c
1 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,7 @@ impl NiriConnectionTask {
|
|||
{
|
||||
if let Some(workspace) = workspaces.into_iter().find(|w| w.id == id) {
|
||||
return (
|
||||
workspace.name.unwrap_or_else(String::new),
|
||||
workspace.name.unwrap_or_else(|| format!("{}", workspace.idx)),
|
||||
workspace.output.unwrap_or_else(String::new),
|
||||
);
|
||||
}
|
||||
|
@ -37,7 +37,8 @@ impl CompositorInterface for NiriConnectionTask {
|
|||
.filter(|w| w.is_active)
|
||||
.map(|workspace| WorkspaceVisible {
|
||||
output: workspace.output.unwrap_or_default(),
|
||||
workspace_name: workspace.name.unwrap_or_default(),
|
||||
workspace_name: workspace.name
|
||||
.unwrap_or_else(|| format!("{}", workspace.idx)),
|
||||
})
|
||||
.collect()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue