#!/usr/bin/python3 import gi # type: ignore import os gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import Gtk, Gio # type: ignore from fungus.dark_theme import apply_dark_theme class FungusApp(Gtk.Application): def __init__(self): super().__init__( application_id="io.github.Fungus.fungus-launcher", flags=Gio.ApplicationFlags.HANDLES_OPEN, ) self.window = None def do_startup(self): Gtk.Application.do_startup(self) os.environ["GTK_USE_PORTAL"] = "1" apply_dark_theme() def do_activate(self): if not self.window: from fungus.main_window import Main self.window = Main(self) self.window.present()