mirror of
https://github.com/swaywm/sway.git
synced 2026-04-23 06:46:27 -04:00
Merge fbac7a3154 into 2dace6b824
This commit is contained in:
commit
3940410882
1 changed files with 5 additions and 3 deletions
|
|
@ -64,16 +64,18 @@ def parse_workspace_name(name):
|
||||||
"(?P<num>[0-9]+):?(?P<shortname>\w+)? ?(?P<icons>.+)?", name
|
"(?P<num>[0-9]+):?(?P<shortname>\w+)? ?(?P<icons>.+)?", name
|
||||||
).groupdict()
|
).groupdict()
|
||||||
|
|
||||||
|
|
||||||
def construct_workspace_name(parts):
|
def construct_workspace_name(parts):
|
||||||
new_name = str(parts["num"])
|
new_name = str(parts["num"])
|
||||||
if parts["shortname"] or parts["icons"]:
|
if parts["shortname"] or parts["icons"]:
|
||||||
new_name += ":"
|
icon_count=len(parts["icons"].split())
|
||||||
|
|
||||||
|
if icon_count != 0:
|
||||||
|
new_name += ":"
|
||||||
|
|
||||||
if parts["shortname"]:
|
if parts["shortname"]:
|
||||||
new_name += parts["shortname"]
|
new_name += parts["shortname"]
|
||||||
|
|
||||||
if parts["icons"]:
|
if parts["icons"] and icon_count != 0:
|
||||||
new_name += " " + parts["icons"]
|
new_name += " " + parts["icons"]
|
||||||
|
|
||||||
return new_name
|
return new_name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue