e8d93e6b1d
- gui/ui: native GTK4 widget vocabulary (.tn-*) behind the ui.* seam, default backend now native; style_apple.css design language - shell: sidebar/topbar/content all #0f0f0f in dark (matches eww panels) - new pages: wine, online_accounts - packaging: tanin-icons (accent folder theme), tanin-calendar, gtklock, taninux-gtk3-theme, flatpak install handler - iso/distro: profile + manifest tweaks (ISO binary not included)
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Rendert die NATIVE Shell (ui/shell.py) mit echten Settings-Sektionen.
|
|
|
|
TANINUX_UI=native PYTHONPATH=src python shell_demo.py [--shot=PATH]
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
os.environ.setdefault("TANINUX_UI", "native")
|
|
|
|
import gi # noqa: E402
|
|
|
|
gi.require_version("Gtk", "4.0")
|
|
from gi.repository import GLib, Gio # noqa: E402
|
|
|
|
from taninux.gui import style, ui # noqa: E402
|
|
from taninux.gui.pages import SETTINGS_SECTIONS # noqa: E402
|
|
|
|
SHOT = next((a for a in sys.argv if a.startswith("--shot=")), None)
|
|
SHOT = SHOT.split("=", 1)[1] if SHOT else None
|
|
|
|
|
|
class App(ui.Application):
|
|
def __init__(self) -> None:
|
|
super().__init__(application_id="ch.gabrielevarano.Taninux.ShellDemo",
|
|
flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
|
|
|
|
def do_activate(self) -> None:
|
|
style.apply_persisted()
|
|
win = ui.MainWindow(self, SETTINGS_SECTIONS, "System Settings")
|
|
win.present()
|
|
if SHOT:
|
|
win.fullscreen()
|
|
|
|
def _capture() -> bool:
|
|
subprocess.run(["grim", SHOT], check=False)
|
|
self.quit()
|
|
return False
|
|
|
|
GLib.timeout_add(1000, _capture)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(App().run([]))
|