fix(noctalia): restore v4 settings via v5 TOML config schema - #1991
Conversation
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Disabled knowledge base sources:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe ChangesNoctalia settings expansion
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request expands the Noctalia configuration in Nix by adding comprehensive settings for shell animations, themes, status bar widgets, notifications, lockscreen, idle behaviors, system monitor, dock, and a theme change hook. The review feedback suggests using the absolute path to the dconf binary (${pkgs.dconf}/bin/dconf) in the theme_mode_changed hook to ensure hermeticity and prevent runtime failures if dconf is not present in the user's PATH.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| hooks.theme_mode_changed = '' | ||
| if [ "$NOCTALIA_THEME_MODE" = "dark" ]; then | ||
| dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" | ||
| dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita-dark'" | ||
| dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'" | ||
| else | ||
| dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'" | ||
| dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'" | ||
| dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'" | ||
| fi | ||
| ''; |
There was a problem hiding this comment.
To ensure hermeticity and prevent runtime failures (e.g., if dconf is not present in the user's PATH when the hook is executed by the daemon), use the absolute path to the dconf binary from pkgs.dconf.
hooks.theme_mode_changed = ''
if [ "$NOCTALIA_THEME_MODE" = "dark" ]; then
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita-dark'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'"
else
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'"
fi
'';
| capsule_opacity = 0.0; | ||
| start = [ "launcher" "clock" "cpu" "memory" "network_rx" "network_tx" "gpu" "active_window" "media" ]; | ||
| center = [ "workspaces" ]; | ||
| end = [ "tray" "bluetooth" "network" "notification_history" "battery" "power_profile" "volume" "brightness" "dark_mode" "control_center" ]; |
There was a problem hiding this comment.
Five widget IDs here are not recognized by the v5 widget factory (src/shell/bar/widget_factory.cpp at noctalia-shell rev 10b2007): memory, gpu, notification_history, dark_mode, control_center. They are neither seeded in src/config/widget_config.cpp:seedBuiltinWidgets nor registered as type == "…" branches in the factory, so each falls through to kLog.warn("widget factory: unknown widget …") (line 692) and is silently dropped.
noctalia config validate only walks [widget.<name>] tables (config_validate.cpp:314) — bar start/center/end are typed as bare std::vector<std::string>, so the build never catches this and the failure only shows up as missing widgets at runtime.
Suggested fixes:
memory→ram(seeded assysmon/ram_used).gpu→ add e.g.widget.gpu = { type = "sysmon"; stat = "gpu_usage"; };then reference"gpu". Options:gpu_temp,gpu_usage,gpu_vram.notification_history→notifications.dark_mode→theme_modefor the bar (usedark_modeonly as acontrol_center.shortcutstype).control_center→control-center(hyphen).
| background_opacity = 0.75; | ||
| }; | ||
|
|
||
| osd.position = "right"; |
There was a problem hiding this comment.
"right" is not a valid OSD position in v5. src/shell/osd/osd_overlay.cpp (and example.toml) accept only top_right | top_left | top_center | bottom_right | bottom_left | bottom_center | center_left | center_right. The schema stores position as a bare string (config_schema.cpp:62), so noctalia config validate won't flag it — but at runtime "right" matches no branch and margins fall back to defaults.
Use "center_right" for right-edge centered, or "top_right" / "bottom_right".
| osd.position = "right"; | |
| osd.position = "center_right"; |
|
|
||
| dock = { | ||
| enabled = true; | ||
| launcher_icon = "nix-snowflake"; |
There was a problem hiding this comment.
This line does nothing as-is. dock.launcher_position defaults to "none" (example.toml line 340), and src/shell/dock/dock_items.cpp only builds the launcher area when position is Start | End. On top of that, launcher_icon expects a Tabler glyph name ("grid-dots" in the example) — nix-snowflake is not in the bundled Tabler set, so even after enabling the launcher position it would fall back.
Either drop launcher_icon, or add dock.launcher_position = "start"; (or "end") and change the icon to a valid Tabler glyph.
| clipboard_auto_paste = "auto"; | ||
| animation = { | ||
| enabled = true; | ||
| speed = 3; |
There was a problem hiding this comment.
shell.animation.speed in v5 is a multiplier (schema range [0.1, 4.0] in src/config/schema/ranges.h:18, default 1.0; example.toml: # 0.5 = 2× slower, 2.0 = 2× faster). 3 runs animations ~3× faster than default, which is likely unintended if this was ported from a v4 stepped-slider value. Consider 1.0 (default) or 1.5.
Summary
bar.main.start/center/endstring arrays with split system monitor widgetshooks.theme_mode_changedusing$NOCTALIA_THEME_MODEenv var (replaces v4$1arg)Test plan
noctalia config validatepasses🤖 Generated with Claude Code
Summary by cubic
Restores v4
noctaliashell behavior in v5 by porting settings to the TOML schema, keeping the prior bar layout, Dracula theme, idle lock, notifications, OSD, dock, and dark-mode hook. Ensuresnoctalia config validatepasses while matching the v4 experience.bar.main.start/center/end(with split system monitor widgets).hooks.theme_mode_changedusing$NOCTALIA_THEME_MODEto update GNOME dconf on theme switches.noctalia:session lock, lockscreen with fingerprint; disabledwallpaper; enabledlocation.auto_locate.Written for commit ee546c0. Summary will update on new commits.