mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
fix(autoname-workspace) Fix colon not getting removed after closing window
Fix a Bug resulting from faulty logic in the rename_workspaces where a whitespace would have been added to the "icons" part of the workspace, no matters if there are any icons present or not. This lead to the issue that not only a trailing whitespace would've been erroneously added to the workspace's name, but also that the colon separating the workspace number from the nonexistant "icon" (only consisting of the whitespace) wouldn't disappear after closing or moving all windows out of the workspace.
This commit is contained in:
parent
ad20fe5e28
commit
a6d0ac9780
1 changed files with 3 additions and 1 deletions
|
|
@ -44,7 +44,9 @@ def rename_workspaces(ipc):
|
|||
if not ARGUMENTS.duplicates and icon in icon_tuple:
|
||||
continue
|
||||
icon_tuple += (icon,)
|
||||
name_parts["icons"] = " ".join(icon_tuple) + " "
|
||||
name_parts["icons"] = " ".join(icon_tuple)
|
||||
if name_parts["icons"]:
|
||||
name_parts["icons"] += " "
|
||||
new_name = construct_workspace_name(name_parts)
|
||||
ipc.command('rename workspace "%s" to "%s"' % (workspace.name, new_name))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue