A Wayland status bar for mangowm, built on wlr-layer-shell.
The system tray (StatusNotifierItem / DBusMenu) is inspired by
swaybar and waybar.
Build tools: meson, ninja, wayland-scanner (part of wayland),
pkg-config.
Libraries:
cjsonwaylandwayland-protocolsfcftpixmancairopangolibpulsesystemd-libsgdk-pixbuf2alsa-lib
Arch:
sudo pacman -S --needed meson ninja cjson wayland wayland-protocols \
fcft pixman cairo pango libpulse systemd-libs gdk-pixbuf2 alsa-libDebian/Ubuntu:
sudo apt install meson ninja-build libcjson-dev libwayland-dev \
wayland-protocols libfcft-dev libpixman-1-dev libcairo2-dev \
libpango1.0-dev libpulse-dev libsystemd-dev libgdk-pixbuf-2.0-dev \
libasound2-dev pkg-configgit clone https://github.com/mangowm/mangobar.git
cd mangobar
meson setup build -Dprefix=/usr
ninja -C build
sudo ninja -C build installIf meson.build changes after a git pull, ninja re-runs meson
automatically; install any newly added dependencies first.
Runtime note: pamixer / brightnessctl are only needed if your
config's click/scroll actions call them.
Run mangobar inside a mangowm session. It reads configuration from:
$MANGOBAR_CONFIG~/.config/mangobar/config.jsonc
The JSONC config supports height, layer, buffer-scale, font,
css (or style), and per-module format, interval, on-click,
on-scroll-* etc. Unsupported modules are ignored. All runtime settings
come from JSONC and CSS. See config.jsonc for a complete
example.
buffer-scale is a multiplier on top of the output's Wayland scale
(default 1); leave it at 1 to follow the display's HiDPI scale
automatically. Text, icons and menus are rendered at the effective scale
so they stay sharp.
Any module with a format can also set format-alt; a left click toggles
between the two formats (the module's on-click command still runs if
configured). The network module additionally supports {down} / {up} in
its format strings, e.g. "format-alt": "↓{down} ↑{up}" for live speeds.
CSS priority is $MANGOBAR_CSS > ~/.config/mangobar/style.css.
tags/layout/title/keymode/keyboardlayout: from mangowm IPCcpu:{usage}is the CPU usage percent and{load}is the 1-minute load average (two decimals);memreads/procbrightness: read/sys/class/backlight(auto-detected or the JSONCdevicefield); updates immediately on external changes via udevvolume: read via the PulseAudio library, with ALSA fallback; shows mute state and updates immediately on external changes via PulseAudio eventsclock: time (#clock) and date (#clock.date) with separate CSSnetwork: shows the active interface name; click toggles up/down speeds (KB/s below 1MB/s, MB/s otherwise)tray: StatusNotifierItem / DBusMenu, with a side-opening submenucustom/<name>: user-defined modules (see below)
Add custom/<name> to modules-left or modules-right and define it in the
same JSONC file:
Fields:
exec: command whose stdout becomes the module text (trailing newline trimmed)interval: refresh interval in seconds;0/omitted runs once at startupformat: shown as-is, with{}replaced by the exec output; if omitted the raw exec output is shownon-click/on-click-middle/on-click-right/on-scroll-up/on-scroll-down: shell commands or@ipc:xxxcommands
Custom modules are styled with #custom-<name> selectors, e.g.
#custom-power { background-color: #cc241d; color: #ffffff; }.
Right-click a tray item with a menu to open a context menu; clicking outside closes it.
~/.config/mangobar/style.css supports a small CSS subset: color,
background, padding, margin, border-radius, min-width,
font-family/size/weight, @define-color, and linear-gradient (first
color). Selectors: *, #module, #module.state, and #custom-<name>.
See style.css.example.
Actions are configured through the JSONC config's on-click /
on-scroll-* fields. Special commands:
@view/@toggle: switch / toggle a tag over IPC@ipc:xxx: sendxxxverbatim over IPC- anything else: run via
/bin/sh -c