High-performance Waybar modules written in Zig for efficient system monitoring
zig-waybar-contrib is a collection of high-performance custom modules for Waybar, built using Zig. Each module runs as a standalone binary that communicates with Waybar via JSON on stdout, giving you fine-grained control over update intervals, thresholds, and display formats.
- Blazingly Fast - Minimal startup time and runtime overhead with zero idle CPU polling
- Instant Refresh - Zero-CPU wakeups via Linux signalfd supporting Waybar's native realtime signals (
SIGRTMIN+N) andSIGUSR1 - Memory Safe - Leveraging Zig's safety features to prevent common crashes and leaks
- Zero Dependencies - Statically linked binaries that run anywhere without runtime interpreters
- Deeply Configurable - Simple, type-safe configuration using Zig Object Notation (
.zon) - Rich Placeholders - Per-module and global placeholders with format specifiers, chaining, and literals
- Thresholds - Configurable warning/critical thresholds for automatic CSS class switching
| Module | Description |
|---|---|
| CPU | Per-core CPU usage, frequency, and load averages |
| Memory | RAM usage and swap statistics |
| Disk | Disk usage, mount tooltips, and real-time I/O throughput |
| Network | Traffic speed, interface info, and wireless signal/SSID |
| Ping | ICMP latency with min/avg/max |
| Fan | Fan speed monitoring |
| GPU | Usage, temperature, VRAM (AMD/NVIDIA/Intel DRM) |
| Bluetooth | Adapter state, connected devices, and battery level |
| PipeWire | Master volume and mute (event-driven with instant refresh) |
| Backlight | Backlight brightness |
| Battery | Battery status and time remaining |
| MPRIS | Media player information with visual progress bar |
| Updates | Package updates (pacman/yay/paru/apt/dnf/zypper/xbps/flatpak) |
| Temperature | Hardware temperatures for CPU, GPU, NVMe, and motherboard |
See MODULES for detailed documentation on each module.
Install the latest stable release from the AUR.
# Using paru
paru -S zig-waybar-contrib
# Using yay
yay -S zig-waybar-contribTo build from source, you need Zig installed (check build.zig for version requirements).
git clone https://github.com/lumexren/zig-waybar-contrib.git
cd zig-waybar-contrib
zig build -Doptimize=smallBinaries will be available in zig-out/bin/.
Note
To try the Nightly versions, follow the Manual Build section.
To try the Beta versions, install the zig-waybar-contrib-beta-bin package from AUR (when available).
Add the modules to your Waybar configuration. Each module is a standalone executable that outputs JSON on stdout.
See the source code in src/modules/ for the default configuration values and adapt them to your needs.
Each module reads its configuration from ~/.config/zig-waybar-contrib/<module>.zon. See MODULES for the full reference.
See CONTRIBUTING
- Zig Team - For creating an amazing systems programming language
- Waybar Contributors - For the excellent status bar that makes this possible
- Community - For feedback, bug reports, and contributions
{ // Load module configurations from zig-waybar-contrib "include": [ "/usr/share/zig-waybar-contrib/config.jsonc", // if installed from AUR ], "modules-right": [ "custom/updates", "custom/memory", "custom/ping", "custom/cpu", "custom/fan" ] }