Skip to content

holo-q/hobar-richmon

Repository files navigation

hobar-richmon

Rich hobar panel plugin — a modern replacement for xfce4-genmon-plugin with context menus, file-watch IPC, D-Bus sources, popovers, and live indicator streaming. Written in Rust against the GTK3 XFCE panel ABI.

Why richmon?

genmon is the workhorse XFCE panel monitor: run a shell command on an interval, parse the output, paint it on the panel. It is also stuck in 2007. There is no way to stream events into a panel item, no context menu beyond "Properties", no popover with rich content, no way for one daemon to drive several indicators, and no IPC channel a long-running tool can shove updates into without polling.

richmon keeps genmon's "your shell command is the source" ergonomics and adds the parts genmon never grew:

  • Multiple data source typescommand (genmon-style polling), file (inotify-watched file), stream (long-lived process whose stdout is parsed line-by-line), dbus (signal-driven), and post (event-driven blink via Unix datagram socket).
  • Context menus — right-click items expose configurable actions, not just panel chrome.
  • Popovers — items can open GTK popovers with arbitrary widgets, not just tooltips.
  • JSON manifest indicators — one source can render a row of dots/icons with per-element styling, workspace tagging, and active-workspace highlight.
  • Live config reload — TOML config is the ground truth, hot-reloaded on change.
  • Workspace awareness — owns active-workspace truth via wnck-rs so indicators can tag themselves to a workspace and richmon paints the active one.

Build & install

richmon is an XFCE panel plugin (.so loaded by xfce4-panel), not a cargo install binary. The build is a two-stage dance: cargo produces a Rust staticlib, then gcc links the C shim (plugin.c) against it so the xfce_panel_module_construct entry point is exported for dlsym().

The justfile wraps this:

just full-release      # cargo build --release + gcc link
just install           # link, validate symbols, install to ~/.local/lib/xfce4/panel/plugins, restart panel
just logs              # follow panel logs filtered to richmon

Requirements:

  • Rust toolchain (stable)
  • gcc, pkg-config
  • libxfce4panel-2.0, gtk+-3.0 development headers
  • just
  • Sibling crates: this repo currently uses path-deps on wnck-rs, spaceship-std, babel, and gtk-introspection. To build standalone, swap those for git or crates.io entries in Cargo.toml.

After just install, add the Richmon plugin to your panel via Panel → Add New Items.

Configuration

Config lives at ~/.config/xfce4/panel/richmon-<plugin-id>.{toml,json}. TOML is the ground truth; JSON is supported for legacy. Files are watched and reloaded live — no panel restart needed.

Find your plugin id with:

xfconf-query -c xfce4-panel -lv | grep richmon

Full schema, all source types, manifest format, and styling options are documented in CONFIG.md. File-watch and post-socket IPC patterns have runnable examples in examples/.

License

GPL-2.0-or-later. See LICENSE.

Releases

No releases published

Packages

 
 
 

Contributors

Languages