public class SessionTheme
Per-user Klyn session appearance, shared across independent GUI processes. Publishers atomically replace a small versioned preference file. One GUI timer per process observes it every 50 ms, compares bytes (not coarse timestamps), and refreshes subscribed windows on their GUI thread. No widget is rebuilt. KlynOS uses per-user RAMFS state until persistent user storage is available; hosts use ~/.config/klyn/gui/session-theme.json. I/O errors preserve the last accepted appearance and are available in lastError; publication throws.
SessionTheme.follow(window); SessionTheme.setMode("dark")
| Modifier and Type | Member | Description |
|---|---|---|
| public static readonly property | accentaccent as String |
No summary. |
| public static readonly property | filefile as FilePath |
Actual preference path, useful for diagnostics and explicit deployment. |
| public static readonly property | highContrasthighContrast as Boolean |
No summary. |
| public static readonly property | isActiveisActive as Boolean |
No summary. |
| public static readonly property | lastErrorlastError as String = "" |
No summary. |
| public static readonly property | modemode as String |
No summary. |
| public static readonly property | palettepalette as SessionPalette |
No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | applyColorsapplyColors(style as ThemeStyle, widget as Widget) as Void |
Applies canonical KSS colors while retaining application layout metrics. |
| public static | configureStoreconfigureStore(file as FilePath) as Void |
Selects an isolated preference store before any subscriber is attached. |
| public static | followfollow(window as Window) as Void |
Subscribes a window; closing the last subscriber stops the shared timer. |
| public static | setAppearance | Publishes session colors and refreshes local subscribers synchronously. |
| public static | setModesetMode(mode as String) as Void |
Changes mode while retaining the current session accent and contrast. |
| public static | synchronizesynchronize() as Boolean |
Observes an external publication immediately; normally called by the timer. |