diff --git a/src/khoj/interface/desktop/main_window.py b/src/khoj/interface/desktop/main_window.py index 473e7bd4..12702337 100644 --- a/src/khoj/interface/desktop/main_window.py +++ b/src/khoj/interface/desktop/main_window.py @@ -41,10 +41,13 @@ class MainWindow(QWebEngineView): self.position_window() - def show_page(self, page: str = ""): + def show_page(self, page: str = "", maximized=False): def load_page(): self.webpage.load(QUrl(f"{self.base_url}/{page}")) - self.show() + if maximized: + self.showMaximized() + else: + self.show() return load_page diff --git a/src/khoj/main.py b/src/khoj/main.py index a1780e1b..e311f73b 100644 --- a/src/khoj/main.py +++ b/src/khoj/main.py @@ -101,7 +101,9 @@ def run(): logger.info(f"🌗 Khoj is running at {url}") # Show config window on first run and main window otherwise - startup_window = main_window.show_page() if args.config else main_window.show_page("config") + startup_window = ( + main_window.show_page(maximized=True) if args.config else main_window.show_page("config", maximized=True) + ) startup_window() # Setup Signal Handlers