erffy/zig-waybar-contrib
β‘ High-performance Waybar modules written in Zig for efficient system monitoring
IMPORTANT Starting with Zig 0.16, the major version of the project will now be incremented by 1 with each Zig release.
This aims to eliminate confusion about which version uses which Zig version.
NOTE This project is in active development. As I'm learning Zig, updates may take time.
Your contributions, feedback, and patience are greatly appreciated! π
High-performance Waybar modules written in Zig for efficient system monitoring
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.
ReleaseFast
+ LTO + LLVMAll modules output single-line JSON compatible with Waybarβs
custom
module interface.
Updates β Tracks system package updates
fakeroot
GPU β Monitors GPU usage, temperature, memory, and fan/PWM
rocm-smi-lib
, amdsmi
, or cuda
Memory β RAM usage and statistics
Ping β Measures network latency
CPU - Monitors CPU (per-core) usage and frequencies
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
Requirements:
zig
(0.15.x) β for building the codegit
β for cloning the repositoryrocm-smi-lib
, amdsmi
β AMD GPU backend (optional)cuda
β NVIDIA GPU backend (optional)# Clone the repository
git clone https://github.com/erffy/zig-waybar-contrib.git
# or clone from AUR
git clone https://aur.archlinux.org/zig-waybar-contrib.git
# cd to source
cd zig-waybar-contrib
# Install to system*
makepkg --si
# Build all modules**
zig build -Drelease
# Install to system**
for f in zig-out/bin/*; do
sudo cp -r $f /usr/local/bin/waybar-module-$f
done
*
: Run this command if you cloned from AUR
**
: Run this command if you cloned from GitHub
{
// 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"
]
}
Contributions are welcome! Here's how you can help:
git checkout -b feature/amazing-module
zig fmt src/
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.