i3-companion: keep a bit more history for workspace switcher

Useful if we make a workspace disappear.
This commit is contained in:
Vincent Bernat 2021-08-06 10:45:27 +02:00
parent c96c93ac02
commit 45e503f017

View file

@ -342,7 +342,7 @@ async def previous_workspace(i3, event):
output, num = data["output"], data["num"]
if history[output][-1:] != [num]:
history[output].append(num)
history[output] = history[output][-2:]
history[output] = history[output][-5:]
logger.debug("on %s, history is %s", output, history[output])
elif event == "previous-workspace":
workspaces = await i3.get_workspaces()