Fix not able to execute init repeatedly.

This commit is contained in:
redxef 2022-11-27 03:02:56 +01:00
parent 8763d8a382
commit 015849345d
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -578,7 +578,7 @@ class Config(pydantic.BaseModel):
final_workspace: typing.Optional[str] = None
class RuntimeData(pydantic.BaseModel):
init: typing.Optional[Filter]
init: typing.Optional[str]
programs: typing.List[ProgramConfig] = []
lock: Lock
event: Event
@ -594,7 +594,7 @@ def window_new(runtime_data: RuntimeData, *, debug):
env = Environment(e.ipc_data)
local = LocalEnvironment()
if runtime_data.init is not None:
runtime_data.init.reduce(env, local)
parse(runtime_data.init).reduce(env, local)
cfg.match.reduce(env, local)
if debug:
print(cfg.match.reduced)