from __future__ import annotations import sys from pathlib import Path from PySide6.QtWidgets import QApplication APP_DIR = Path(__file__).resolve().parent if str(APP_DIR) not in sys.path: sys.path.insert(0, str(APP_DIR)) try: from .icons import lucide_icon from .main_window import MainWindow from .settings import AppSettings from .theme import apply_app_theme, effective_theme except ImportError: from icons import lucide_icon from main_window import MainWindow from settings import AppSettings from theme import apply_app_theme, effective_theme def main() -> int: app = QApplication(sys.argv) settings = AppSettings.load() apply_app_theme(settings.theme) icon_color = "#111827" if effective_theme(settings.theme) == "light" else "#e5e7eb" app_icon = lucide_icon("git-branch", icon_color, 256) app.setWindowIcon(app_icon) window = MainWindow() window.setWindowIcon(app_icon) window.show() return app.exec() if __name__ == "__main__": raise SystemExit(main())