zig-waybar-contrib icon indicating copy to clipboard operation
zig-waybar-contrib copied to clipboard

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

trafficstars

[!IMPORTANT] I'm looking for someone to maintain this project in the Fedora COPR repositories.
If you're interested in maintaining it, please don't hesitate to reach out.

[!NOTE] This project is under active development.
As I continue learning Zig, updates may take some time — your contributions, feedback, and patience are greatly appreciated!

zig-waybar-contrib License: GPL v3

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

Overview

zig-waybar-contrib is a collection of lightweight, blazingly fast Waybar modules built with Zig.
These modules are designed to provide accurate system monitoring with minimal resource usage, taking advantage of Zig's performance characteristics and memory safety.
Also these modules are drop-in replacement for Waybar's built-in modules

Modules

See MODULES

Installation

Packaging status

Quick Installation

From AUR (Recommended)

You can easily install the latest version of zig-waybar-contrib from the AUR. This package provides pre-built binaries as waybar-module-X.

Use your preferred AUR helper:

# Using paru
paru -S zig-waybar-contrib

# Using yay
yay -S zig-waybar-contrib

Build from Source

Requirements

  • zig (0.16.x) — for building the project
  • git — for cloning the repository
  • rocm-smi-lib, amdsmi — AMD GPU backend (optional)
  • cuda — NVIDIA GPU backend (optional)

Manual Build

# Clone the repository
git clone --branch 0.16-dev https://github.com/erffy/zig-waybar-contrib

# Enter the source directory
cd zig-waybar-contrib

# Build all modules
zig build -Drelease

# Install binaries to system (requires sudo)
for f in zig-out/bin/*; do
  sudo cp -r $f "/usr/local/bin/waybar-module-$f"
done

Script Installation

The installation script automates cloning, building, and installing.
It requires the following tools:

  • bash — to run the script
  • gum — for styled output and prompts
  • curl — to download the script
  • git — to clone or update the repository
  • zig — to build the project
bash -c "$(curl -fsSL https://raw.githubusercontent.com/erffy/zig-waybar-contrib/0.16-dev/install.sh)"

The script will automatically:

  1. Check for required dependencies
  2. Clone or update the repository
  3. Build the project using Zig
  4. Install the binaries to your user

Configuration

{
  // Load module configurations from zig-waybar-contrib
  "include": [
    "/etc/zig-waybar-contrib/config.jsonc"
  ],

  // Display these modules on the right side of the Waybar
  "modules-right": [
    "custom/updates",
    "custom/gpu", // use only if you have installed GPU dependency
    "custom/memory",
    "custom/ping",
    "custom/cpu"
  ]
}

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

Made with ❤️ by Me

Star ⭐ this repo if you find it useful!

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


Alt