feat/monochrome-icon #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/monochrome-icon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add monochrome icon option
Adds a setting that renders the tray icon as a monochrome glyph which adapts to the active system color scheme. Linux: serve the icon through StatusNotifierItem's IconPixmap (empty IconName so Plasma can't auto-substitute a theme icon). The symbolic variant is retinted at runtime to match from , emulating SVG without a runtime SVG parser. An inotify watcher on re-emits NewIcon on color-scheme changes so the tray updates live. Also re-emits on config reload. Windows: embed separate black/white ICOs (icon-b / icon-w) and swap live on WM_SETTINGCHANGE when AppsUseLightTheme flips. Ships icon-symbolic.svg and icon-{b,w}.ico as accompanying assets; generalises the inotify helper into so watchers beyond the config file can reuse it.Adds and alongside the existing option, so users can opt into the monochrome tray icon only in one system mode (e.g. colored panel in light mode, mono in dark). The existing continues to force mono in both modes. WindowConfig gains two helpers: - wants_mono(is_dark) — resolves effective mono state for the current theme - any_mono() — true if any mono flag is set (used to gate optional startup plumbing like the Linux kdeglobals watcher) Linux: the SNI getters and the watcher spawn now route through wants_mono /any_mono. Theme detection reads [Colors:Window] BackgroundNormal (primary), falls back to ForegroundNormal then [General] ColorScheme= name matching. The is_dark value is cached in an AtomicBool; refresh_theme_cache() is the only path that reads kdeglobals, called once per inotify event — and returns false when the value didn't flip, so KConfig's multi-pass section rewrites don't cause redundant NewIcon emissions. Property getters are now a single atomic load, so Plasma's aggressive polling costs nothing between switches. Windows: initial icon selection, config-reload, and WM_SETTINGCHANGE paths all go through wants_mono(is_dark_mode()). ThemeChanged now also repaints when crossing out of mono (previously only repainted if mono_icon was always-on). Docs (README, PROJECT_CONTEXT, CHANGELOG) updated to describe the three flags and their interaction.