Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 74 additions & 14 deletions config/noctalia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,83 @@ in
enable = true;
package = noctalia;

# v5 is a ground-up rewrite (C++/Qt, TOML config, snake_case keys) and upstream
# does NOT migrate v4 settings - "v5 ships with sane defaults, customize from there".
# The v4 config (bar widget layout, Dracula theme, dark-mode dconf hook, idle
# timeouts, per-widget options) has NO mechanical v5 equivalent and its semantics
# changed (e.g. bar widgets are now id vectors + separate styling; idle uses a
# behavior map; hooks run with no args). Re-apply those on-device via the settings UI.
#
# Only keys verified against the v5 schema (src/config/schema/config_schema.cpp)
# are set here so the build-time `noctalia config validate` passes.
settings = {
shell = {
font_family = "Noto Sans"; # was ui.fontDefault
clipboard_enabled = true; # was appLauncher.enableClipboardHistory
clipboard_auto_paste = "auto"; # was appLauncher.autoPasteClipboard = true
font_family = "Noto Sans";
clipboard_enabled = true;
clipboard_auto_paste = "auto";
animation = {
enabled = true;
speed = 3;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

};
};
location.auto_locate = true; # was location.autoLocate
wallpaper.enabled = false; # noctalia does not manage the wallpaper (wallpaper engine does)

theme = {
mode = "auto";
source = "builtin";
builtin = "Dracula";
};

bar.main = {
background_opacity = 0.0;
capsule = true;
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" ];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  • memoryram (seeded as sysmon / ram_used).
  • gpu → add e.g. widget.gpu = { type = "sysmon"; stat = "gpu_usage"; }; then reference "gpu". Options: gpu_temp, gpu_usage, gpu_vram.
  • notification_historynotifications.
  • dark_modetheme_mode for the bar (use dark_mode only as a control_center.shortcuts type).
  • control_centercontrol-center (hyphen).

};

widget.clock = {
format = "{:%Y/%m/%d %H:%M:%S}";
vertical_format = "{:%H %M %S - %d %m}";
tooltip_format = "{:%Y/%m/%d %H:%M:%S}";
};

notification = {
enable_daemon = true;
position = "top_right";
background_opacity = 0.75;
};

osd.position = "right";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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".

Suggested change
osd.position = "right";
osd.position = "center_right";


lockscreen = {
enabled = true;
fingerprint = true;
};

idle = {
behavior.lock = {
enabled = true;
timeout = 300;
command = "noctalia:session lock";
};
};

system.monitor = {
enabled = true;
};

dock = {
enabled = true;
launcher_icon = "nix-snowflake";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

};

desktop_widgets.enabled = true;
wallpaper.enabled = false;
location.auto_locate = true;

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
'';
Comment on lines +150 to +160

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
      '';

};
};
}
Loading