diff --git a/src/clients/compositor/sway.rs b/src/clients/compositor/sway.rs index 7cc61b74..e7091a12 100644 --- a/src/clients/compositor/sway.rs +++ b/src/clients/compositor/sway.rs @@ -109,6 +109,16 @@ impl From for WorkspaceUpdate { WorkspaceChange::Move => { Self::Move(event.current.expect("Missing current workspace").into()) } + WorkspaceChange::Rename => { + if let Some(node) = event.current { + Self::Rename { + id: node.id, + name: node.name.unwrap_or_default(), + } + } else { + Self::Unknown + } + } WorkspaceChange::Urgent => { if let Some(node) = event.current { Self::Urgent { diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs index c9fbc77d..039d969e 100644 --- a/src/modules/workspaces.rs +++ b/src/modules/workspaces.rs @@ -164,7 +164,15 @@ fn reorder_workspaces(container: >k::Box) { let mut buttons = container .children() .into_iter() - .map(|child| (child.widget_name().to_string(), child)) + .map(|child| { + let label = child + .downcast_ref::