Skip to content

Development

locainin edited this page Jul 1, 2026 · 7 revisions

Development

Workspace layout

  • crates/unixnotis-daemon: D-Bus daemon and store.
  • crates/unixnotis-center: Control-center panel UI.
  • crates/unixnotis-popups: Popup UI.
  • crates/unixnotis-ui: Shared GTK/UI components and CSS loader.
  • crates/unixnotis-core: Shared models and configuration.
  • crates/unixnotis-installer: Installer, service-manager integration, trial mode, and reset flow.
  • crates/noticenterctl: CLI control tool.

Internal module layout

  • crates/unixnotis-center/src/dbus/: D-Bus backoff, command, seed, and type helpers.
  • crates/unixnotis-center/src/init/: panel construction wiring, keyboard handling, search setup, timing, and startup actions.
  • crates/unixnotis-popups/src/app/: popup startup, reload coalescing, runtime glue, and startup tests.
  • crates/unixnotis-installer/src/main/: Installer UI flow, event handlers, and worker actions.
  • crates/unixnotis-installer/src/service_manager/: systemd, dinit, runit, and s6 backend contracts.
  • crates/unixnotis-installer/src/paths/: install root, binary path, and service backend discovery.
  • crates/unixnotis-installer/src/checks/: session, GTK, shell, and service-manager readiness checks.
  • crates/unixnotis-ui/src/css/: CSS loading, overrides, and watcher helpers.
  • crates/unixnotis-core/src/model/: notification model helpers split into image, notification, and type modules.
  • crates/unixnotis-core/src/config/: config loading, defaults, schemas, media settings, widget schemas, and runtime cleanup.
  • crates/unixnotis-core/src/config/layout/: panel and popup layout schemas.
  • crates/unixnotis-core/src/config/widgets/: slider, toggle, stat, card, and plugin schemas.
  • crates/unixnotis-core/src/config/runtime/sanitize/: runtime sanitize passes and focused sanitize tests.
  • crates/unixnotis-center/src/media/: MPRIS discovery, cache, event loop, metadata, policy, schedule, and snapshot handling.
  • crates/unixnotis-daemon/src/daemon/auth/: control-plane caller authorization and trusted binary checks.
  • crates/unixnotis-daemon/src/daemon/control/: panel control, DND, inhibitors, query, and clear-all helpers.
  • crates/unixnotis-daemon/src/daemon/notifications/: freedesktop notification payload, sender, and limit helpers.
  • crates/unixnotis-daemon/src/child_process/: center and popup child supervision.
  • crates/unixnotis-daemon/src/sound/: backend detection, sound-source resolution, and playback limits.
  • crates/unixnotis-daemon/src/trial_mode/: temporary takeover and restore of another notification daemon.
  • crates/noticenterctl/src/main/main_css_check*: active-theme validation, cache, lint, and geometry checks.
  • crates/noticenterctl/src/preset/: preset archive, export, import, inspect, and portability checks.
  • crates/unixnotis-installer/src/actions/: install, config backup/restore, environment sync, Hyprland, and build acceleration actions.

Build and test

cargo build --release
cargo test --workspace
cargo clippy --workspace --all-targets --all-features -- -D warnings

Optional build acceleration

The installer can optionally write a local .cargo/config.toml that points to a wrapper script under .cargo/unixnotis-rustc-wrapper.sh. The wrapper uses sccache (compiler output caching) and mold (fast linker) when available, and falls back to plain rustc if either tool is missing.

Manual install on Arch:

sudo pacman -S sccache mold

Remove .cargo/config.toml and the wrapper script to disable build acceleration.

CSS validation

noticenterctl css-check

Logging

  • general.log_level in config.toml sets the default.
  • RUST_LOG overrides the configured log level when it is valid.
  • UNIXNOTIS_DIAGNOSTIC=1 enables capped diagnostic output.
  • Normal log snippets are capped; diagnostic mode raises the cap and still strips control/newline characters before logging.

Clone this wiki locally