mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-09 18:29:41 +00:00
Fix eww workspaces script crashing occasionally
This commit is contained in:
parent
03608c5b1c
commit
11ef5e8a1c
|
@ -131,7 +131,10 @@ def get_workspaces() -> list[OutputWorkspaceInfo]:
|
|||
continue
|
||||
format_name = REMAPS.get(workspace["id"], workspace["name"])
|
||||
active = workspace["id"] in active_workspaces
|
||||
try:
|
||||
mon_id = [monitor["id"] for monitor in monitors if monitor["name"] == workspace["monitor"]][0]
|
||||
except IndexError: # Sometimes workspace["monitor"] is "?", which doesn't match any monitor
|
||||
mon_id = -1
|
||||
out.append({**workspace, "format_name": format_name, "active": active, "monitor_id": mon_id})
|
||||
|
||||
out = fill_blank_workspaces(out)
|
||||
|
|
Loading…
Reference in a new issue