diff --git a/pyprland/command.py b/pyprland/command.py index dac3392..0c05717 100755 --- a/pyprland/command.py +++ b/pyprland/command.py @@ -146,8 +146,6 @@ async def _callHandler(self, full_name, *params, notify=""): async def read_events_loop(self): "Consumes the event loop and calls corresponding handlers" - last_cmd_args: dict[str, None | str] = defaultdict(lambda: None) - former_cmd = None while not self.stopped: try: data = (await self.event_reader.readline()).decode() @@ -158,14 +156,10 @@ async def read_events_loop(self): self.log.critical("Reader starved") return cmd, params = data.split(">>", 1) - last_args = last_cmd_args.get(cmd) - if cmd != former_cmd or params != last_args: - full_name = f"event_{cmd}" - - # self.log.debug("[%s] %s", cmd, params.strip()) - await self._callHandler(full_name, params) - last_cmd_args[cmd] = params - former_cmd = cmd + full_name = f"event_{cmd}" + + # self.log.debug("[%s] %s", cmd, params.strip()) + await self._callHandler(full_name, params) async def read_command(self, reader, writer) -> None: "Receives a socket command"