{"id":24164482,"url":"https://github.com/erffy/zig-waybar-contrib","last_synced_at":"2025-08-05T16:17:59.468Z","repository":{"id":272175923,"uuid":"915736662","full_name":"erffy/zig-waybar-contrib","owner":"erffy","description":"✨ Lightweight Waybar modules built with Zig","archived":false,"fork":false,"pushed_at":"2025-07-15T20:47:20.000Z","size":252,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-16T06:30:01.956Z","etag":null,"topics":["sway","waybar","waybar-contrib","waybar-module","zig","ziglang","zls"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erffy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-12T17:08:03.000Z","updated_at":"2025-07-15T20:46:03.000Z","dependencies_parsed_at":"2025-03-30T11:19:40.040Z","dependency_job_id":"eac8edf0-70fe-480e-b580-f89d6310bb4d","html_url":"https://github.com/erffy/zig-waybar-contrib","commit_stats":null,"previous_names":["erffy/zig-waybar-contrib"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/erffy/zig-waybar-contrib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erffy%2Fzig-waybar-contrib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erffy%2Fzig-waybar-contrib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erffy%2Fzig-waybar-contrib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erffy%2Fzig-waybar-contrib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erffy","download_url":"https://codeload.github.com/erffy/zig-waybar-contrib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erffy%2Fzig-waybar-contrib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267294180,"owners_count":24065343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sway","waybar","waybar-contrib","waybar-module","zig","ziglang","zls"],"created_at":"2025-01-12T19:17:26.319Z","updated_at":"2025-08-05T16:17:59.457Z","avatar_url":"https://github.com/erffy.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]  \n\u003e This project is in active development. As I'm learning Zig, updates may take time. Your contributions, feedback, and patience are greatly appreciated! 🚀\n\n\n## zig-waybar-contrib\n\n**High-performance Waybar modules written in Zig for efficient system monitoring**\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://gnu.org/licenses/gpl-3.0)\n[![Zig](https://img.shields.io/badge/Zig-0.14+-orange.svg)](https://ziglang.org/)\n[![Waybar](https://img.shields.io/badge/Waybar-Compatible-green.svg)](https://github.com/Alexays/Waybar)\n\n### Overview\n\n`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.\n\n### Why Zig?\n\n- **Zero-cost abstractions** - Runtime performance without sacrificing code clarity\n- **Compile-time safety** - Catch errors before they reach production\n- **Small binaries** - Minimal overhead for system monitoring\n- **Fast compilation** - Quick iteration during development\n\n### Features\n\n- ⚡ **Ultra-fast execution** - Optimized with `ReleaseFast` + LTO + LLVM\n- 🔒 **Memory safe** - No buffer overflows or memory leaks\n- 🧩 **Modular design** - Include only what you need\n- 📊 **Real-time data** - Accurate, up-to-date system metrics\n- 🎯 **Waybar native** - JSON output format, seamless integration\n- 🪶 **Lightweight** - Minimal system dependencies\n\n### Available Modules\n\nAll modules output single-line JSON compatible with Waybar's `custom` module interface.\n\n| Module      | Description                    | Status       | Dependencies                       | Platforms             | Signal   |\n|-------------|--------------------------------|--------------|------------------------------------|-----------------------|----------|\n| **Updates** | System package update tracker  | ✅ Ready     | `fakeroot`                         | Arch Linux            | 10       |\n| **GPU**     | GPU usage, temperature, memory | ✅ Ready     | `rocm-smi-lib`, `amdsmi` or `cuda` | AMD RX Series, NVIDIA | 11       |\n| **Memory**  | RAM usage and statistics       | ✅ Ready     | None                               | Linux                 | 12       |\n| **Ping**    | Network latency monitoring     | ✅ Ready     | None                               | Linux                 | 13       |\n\n\u003c!--\n### Planned Modules\n\n- [ ] **CPU** - Processor usage and frequency monitoring  \n- [ ] **Disk** - Storage usage and I/O statistics\n- [ ] **Network** - Bandwidth and connection monitoring\n- [ ] **Battery** - Power status for laptops\n- [ ] **Temperature** - System thermal monitoring\n--\u003e\n\n### Screenshots\n\n#### Updates\n![Updates Module](assets/updates.png)\n\n#### GPU\n![GPU Module](assets/gpu.png)\n\n#### Memory\n![Memory Module](assets/memory.png)\n\n#### Ping\n![Ping Module](assets/ping.png)\n\n## Installation\n\n### Quick Installation\n\n#### [From AUR (Recommended)](https://aur.archlinux.org/packages/zig-waybar-contrib)\n\nYou can easily install the latest version of **zig-waybar-contrib** from the Arch User Repository (AUR). \nThis package provides pre-built binaries as `waybar-module-X-bin`.\n\nUse your preferred AUR helper:\n\n```bash\n# Using paru\nparu -S zig-waybar-contrib\n\n# Using yay\nyay -S zig-waybar-contrib\n```\n\n### Build from Source\n\n**Requirements:**\n- Zig: 0.14.0+\n- Git\n- rocm-smi-lib, amdsmi or cuda (for gpu module, optional)\n\n```bash\n# Clone the repository\ngit clone https://github.com/erffy/zig-waybar-contrib.git \u0026\u0026 cd zig-waybar-contrib\n\n# Build all modules\nzig build\n\n# Install to system\nsudo cp zig-out/bin/* /usr/local/bin/\n```\n\n### Configuration\n\n#### Basic Waybar Setup\n\nAdd to your Waybar configuration (`~/.config/waybar/config.jsonc`):\n\n```jsonc\n{\n  // Load default module configurations from zig-waybar-contrib\n  \"include\": [\n    \"/etc/zig-waybar-contrib/config.jsonc\"\n  ],\n\n  // Display these modules on the right side of the Waybar\n  \"modules-right\": [\n    \"custom/updates#zwc\",\n    \"custom/gpu#zwc\",\n    \"custom/memory#zwc\",\n    \"custom/ping#zwc\"\n  ],\n\n  // 🛠️ Custom modules configuration\n  \"custom/updates#zwc\": {\n    \"exec\": \"/usr/bin/waybar-module-updates-bin\",\n    \"return-type\": \"json\",\n    \"interval\": 0,\n    \"signal\": 10,\n    \"escape\": true\n  },\n\n  \"custom/gpu#zwc\": {\n    \"exec\": \"/usr/bin/waybar-module-gpu-bin\",\n    \"return-type\": \"json\",\n    \"interval\": 0,\n    \"signal\": 11\n  },\n\n  \"custom/memory#zwc\": {\n    \"exec\": \"/usr/bin/waybar-module-memory-bin\",\n    \"return-type\": \"json\",\n    \"interval\": 0,\n    \"signal\": 12\n  },\n\n  \"custom/ping#zwc\": {\n    \"exec\": \"/usr/bin/waybar-module-ping-bin\",\n    \"return-type\": \"json\",\n    \"interval\": 0,\n    \"signal\": 13\n  }\n}\n```\n\n\u003c!--\n\nPLANNED FEATURE\n\n### Advanced Configuration\n\n#### Module-specific Settings\n\nEach module accepts environment variables for customization:\n\n```bash\n# Ping module settings\nexport PING_HOST=8.8.8.8   # Target host\nexport PING_WARN_MS=50     # Warning latency\nexport PING_CRIT_MS=200    # Critical latency\n```\n---\u003e\n\n### Development\n\n#### Project Structure\n\n```\nzig-waybar-contrib/\n│\n├── README.md               # Project overview, installation, and usage instructions\n├── CHANGELOG.md            # Version history with detailed changes per release\n├── LICENSE                 # Project license (GPL-3.0-only)\n├── config.waybar.jsonc     # Example Waybar module configuration (JSONC format)\n├── .gitignore              # Git exclusions for build artifacts, cache files, etc.\n│\n├── build.zig               # Zig build script for compiling all modules\n├── build.zig.zon           # Zig package and dependency declaration (Zon format)\n│\n├── tests/                  # Test files\n│\n├── src/                    # Source code\n│   │\n│   ├── utils/              # Shared utility modules\n│   │   ├── mod.zig         # Module loader and common interfaces\n│   │   ├── waybar.zig      # Waybar signal sender (e.g., USR1/USR2 signaling)\n│   │   └── format.zig      # Byte/usage formatting helpers (e.g., human-readable memory)\n│   │\n│   ├── gpu/                # GPU statistics and backend integration\n│   │   ├── gpu.zig         # Unified GPU module (auto-selects backend at compile time)\n│   │   └── backend/        # Individual backend implementations\n│   │       ├── amdsmi.zig      # AMD SMI interface (ROCm 5.x+)\n│   │       ├── rocmsmi.zig     # Legacy ROCm SMI interface\n│   │       └── nvml.zig        # NVIDIA GPU interface (via NVML/CUDA)\n│   │\n│   ├── memory.zig          # Module for tracking and displaying memory usage\n│   ├── ping.zig            # Module for displaying ping/latency to a target host\n│   └── updates.zig         # Module for checking for system/package updates\n│\n└── assets/                 # Images, screenshots, and other media assets\n```\n\n\u003c!--\n## Troubleshooting\n\n### Common Issues\n\n**Module not updating:**\n```bash\n# Check if module runs standalone\n/usr/local/bin/gpu-module\n\n# Verify Waybar can execute it\nwaybar -l debug\n```\n\n**Permission errors:**\n```bash\n# Ensure modules are executable\nchmod +x /usr/local/bin/*-module\n```\n\n**GPU module shows no data (AMD):**\n```bash\n# Check GPU files exist\nls /sys/class/drm/card*/device/\n```\n--\u003e\n\n### Contributing\n\nContributions are welcome! Here's how you can help:\n\n#### Code Contributions\n- 🐛 **Bug Fixes** - Help squash issues\n- ⚡ **Performance Improvements** - Make modules even faster  \n- 🧩 **New Modules** - Add support for more system metrics\n- 🎨 **Code Quality** - Improve readability and maintainability\n\n#### Other Ways to Help\n- 📖 **Documentation** - Improve guides and examples\n- 🧪 **Testing** - Report bugs and compatibility issues\n- 💡 **Feature Requests** - Suggest new modules or improvements\n- 🎨 **Themes** - Share your Waybar styling configs\n\n#### Development Workflow\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-module`\n3. Make your changes and test thoroughly\n4. Follow Zig style conventions: `zig fmt src/`\n5. Add tests if applicable\n6. Submit a pull request with a clear description\n\n### Roadmap\n\n- [ ] Implement configuration support\n\n### License\n\nThis project is licensed under the **GNU General Public License v3.0**. See [LICENSE](./LICENSE) for details.\n\n### Acknowledgments\n\n- **Zig Team** - For creating an amazing systems programming language\n- **Waybar Contributors** - For the excellent status bar that makes this possible  \n- **Community** - For feedback, bug reports, and contributions\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by Me**\n\n*Star ⭐ this repo if you find it useful!*\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferffy%2Fzig-waybar-contrib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferffy%2Fzig-waybar-contrib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferffy%2Fzig-waybar-contrib/lists"}