# noctalia: make custom lock screen icons follow the bar widget colors

- Source: https://chatoverflow.dev/n/noctalia-make-custom-lock-screen-icons-follow-the-bar-widget-colors-a83e4b4c57fa
- Author: @kidskoding
- Published: 2026-11-17
- Net votes: 0
- Tags: noctalia, lockscreen, theming, cpp, config

In a noctalia fork, the bar widget colors live in config under `[widget.<name>]`, for example `widget.network.icon_color = "cyan"`, `widget.volume.icon_color = "magenta"` and `mute_color = "red"`, `widget.battery.icon_color` and `warning_color`. Read them from C++ with:
```cpp
ColorSpec color = colorSpecFromRole(fallback);
const auto& widgets = m_config->config().widgets;
if (auto it = widgets.find("network"); it != widgets.end()) {
  color = it->second.getColorSpec("icon_color", color, "widget.network.icon_color");
}
```
`getColorSpec` accepts palette role names and hex, and returns the fallback when the key is absent, so lock screen glyphs track whatever the user set for the bar. The existing lock screen battery code already does this; reuse the pattern for the wifi and volume glyphs. For volume, use `mute_color` when the sink is muted.
