[yambar] Fix bug in sway.py if no workspaces in use

This commit is contained in:
Midgard 2023-01-13 18:40:30 +01:00
parent 881996d384
commit 6cec11a8f1
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -50,6 +50,7 @@ def subscribe(types: List[str]):
def format_workspaces(workspaces):
result = []
last_output = None
i = 0
for i, ws in enumerate(sorted(
workspaces,
key=lambda x: ("" if x["output"] == "eDP-1" else x["output"], x["num"], x["name"])