def restart(self) -> None:
        """Restart Qtile.

        Can also be triggered by sending Qtile a SIGUSR2 signal.
        """
        if not self.core.supports_restarting:
            raise CommandError(f"Backend does not support restarting: {self.core.name}")
        try:
            self.config.load()
        except Exception as error:
            logger.exception("Preventing restart because of a configuration error:")
            send_notification("Configuration error", str(error.__context__))
            return

        hook.fire("restart")
        lifecycle.behavior = lifecycle.behavior.RESTART
        state_file = os.path.join(tempfile.gettempdir(), "qtile-state")
        with open(state_file, "wb") as f:
            self.dump_state(f)
        lifecycle.state_file = state_file
        self._stop()
Restart Qtile.

        Can also be triggered by sending Qtile a SIGUSR2 signal.
        
libqtile/core/manager.py