code: def OnMove(self, event):
          
  
          # Store window position in config
          position = self.main_window.GetScreenPositionTuple()
  
          config["window_position"] = repr(position)
docs: Main window move event