Skip to content

About

⚡ High-performance Waybar modules written in Zig for efficient system monitoring

Topics

Resources

Contributing

Stars

30 stars

Watchers

3 watching

Forks

Repository files navigation

zig-waybar-contrib License Stars Issues Last Commit

High-performance Waybar modules written in Zig for efficient system monitoring

Table of Contents

Overview

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.

Features

  • 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) and SIGUSR1
  • 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

Modules

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.

Installation

Quick Installation (AUR)

Install the latest stable release from the AUR.

# Using paru
paru -S zig-waybar-contrib

# Using yay
yay -S zig-waybar-contrib

Manual Build

To 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=small

Binaries 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).

Configuration

Add the modules to your Waybar configuration. Each module is a standalone executable that outputs JSON on stdout.

Method 1: Include Config

{
  // 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"
  ]
}

Method 2: Manual Definition

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.

Contributing

See CONTRIBUTING

Acknowledgments

  • 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

Built with ❤️ by lumexren

Star ⭐ this repo if you find it useful!
Join our Fluxer for support and updates!

This project is licensed under the GNU General Public License v3.0. See LICENSE for details.

About

⚡ High-performance Waybar modules written in Zig for efficient system monitoring

Topics

Resources

Contributing

Stars

30 stars

Watchers

3 watching

Forks

Releases

Contributors

Languages