BSD-3-Clause licensed by Ivan Malison
Maintained by [email protected]
This version can be pinned in stack with:status-notifier-item-0.3.2.8@sha256:4dec7c05235cf5337c561b03a105b3b1664501ed0b56b0a2edc4e05facb4a1e8,3124

status-notifier-item

Build Status Hackage Stackage LTS Stackage Nightly

The status-notifier-item package provides a haskell implementation of the status-notifier-item/app-indicator protocol.

StatusNotifierHost

The host server implementation provided is partial in the sense that it is headless (provides no graphical interface), and it is supposed to be used together with UI code that handles actually displaying a tray. The gtk-sni-tray provides a gtk tray widget that is implemented using the status-notifier-item library. taffybar Uses gtk-sni-tray to provide a tray widget that can be used with the many other widgets it offers.

StatusNotifierWatcher

This package provides a standalone status-notifier-watch binary that can be run on its own to handle the registration of status-notifier-items. By default, it is necessary to run this binary before starting either taffybar or gtk-sni-tray, becuase the trays provided in those binaries do not handle this responsibility. If this is not done, those binaries will fail at startup with this message:

MethodError {methodErrorName = ErrorName "org.freedesktop.DBus.Error.ServiceUnknown", methodErrorSerial = Serial 7, methodErrorSender = Just (BusName "org.freedesktop.DBus"), methodErrorDestination = Just (BusName ":1.549"), methodErrorBody = [Variant "The name org.kde.StatusNotifierWatcher was not provided by any .service files"]}

A client library is also provided for the StatusNotifierWatcher protocol

StatusNotifierItem

This package provides a client library for calling into status notifier items. It also provides a sample implementation of the server side of the StatusNotifierItem protocol as well as a status-notifier-item-static binary that uses this implementation. This binary can be used to test host and watcher implementations, but it mostly just serves as an example of how to implement the protocol using this library, as it does not really do anything useful.

Changes

Changelog for status-notifier-item

0.3.2.8 - 2026-02-13

  • Relax dependency bounds for GHC 9.12 (template-haskell, optparse-applicative).

0.3.2.7 - 2026-02-13

  • Watcher: default --log-level is now INFO.
  • Watcher: log item/host registrations at INFO; keep per-request method/property tracing at DEBUG to avoid spamming.
  • Host: downgrade noisy INFO/WARNING logs (signal dumps, handler updates, and expected removal/mismatch cases) to DEBUG.

0.3.2.6 - 2026-02-13

  • Watcher: persist item/host registrations to an XDG cache JSON file and restore on startup with validation (bus owner + object/interface checks).
  • Watcher: keep persisted state in sync across registrations/unregistrations and deduplicate/replace owner-equivalent path registrations.
  • Host: reconcile item state when watcher ownership changes so stale items are removed after watcher restarts.
  • Add integration tests for cache restore, stale-cache pruning, post-restore deduplication, and host watcher-owner-change reconciliation.

0.3.2.5 - 2026-02-12

  • Test suite: start an isolated dbus-daemon using a session config shipped alongside the dbus-daemon executable when available (fixes Nix sandbox builds where /etc/dbus-1/session.conf is absent).

0.3.2.4 - 2026-02-12

  • Host: deduplicate items that re-register under a different bus name after a watcher restart (e.g. unique name vs well-known name), preventing duplicate tray icons.
  • Add a regression test for watcher-restart re-registration deduplication.

0.3.2.3 - 2026-02-11

  • Downgrade unknown-sender update logs from WARNING to DEBUG to avoid noisy false alarms for routine tray signals.
  • Treat UnknownMethod property refresh failures as expected optional-property misses (same as InvalidArgs), logging them at DEBUG unless no updater succeeded.
  • Add host tests for property update failure log-level classification.

0.3.2.2 - 2026-02-11

  • Fix watcher registration ownership checks by requiring explicit service-name registrations to be initiated by the current owner.
  • Fix watcher duplicate handling by coalescing path-first and name-first registrations from the same sender/path pair.
  • Add an isolated DBus integration test suite covering watcher/host behavior and regression tests for registration ownership and deduplication.

0.3.2.1 - 2026-02-09

  • Add name-owner resolution fallback for signal sender identification, fixing noisy errors when items register under well-known bus names.
  • Downgrade “Failed to identify sender” log from ERROR to DEBUG when the item simply does not implement the getId method.
  • Downgrade “Property update failures” log from ERROR to DEBUG when the failures are InvalidArgs (item does not support optional properties like OverlayIcon).

0.3.2.0 - 2026-02-05

  • Report full bus/path identifiers for non-default SNI object paths so hosts can resolve Ayatana items reliably.
  • Accept bus/path identifiers in watcher/host lookups for compatibility with pathful registrations.