A minimalist Wayland status bar with modular widgets and scriptable extensions.
- C 87.1%
- Python 9.9%
- CMake 3%
The layer-shell protocol says 'the exclusive zone includes the margin' and wlroots 0.19 implements reserved = exclusive_zone + margin.top. ZBar set exclusive = height + gaps_out with a top margin of gaps_out, so the top gap was counted twice in the reserved strip and the extra space showed up below the bar: above = gaps_out, below = gaps_out + the compositor's window gap (e.g. 12 + 10 = 22px with Zurin). The exclusive zone is now just the bar height; the top margin provides the space above the bar and the gap below follows the compositor's window gaps, like other layer-shell bars. |
||
|---|---|---|
| include | ||
| protocols | ||
| scripts | ||
| src | ||
| tests | ||
| .gitignore | ||
| CMakeLists.txt | ||
| config.toml | ||
| LICENSE | ||
| README.md | ||
ZBar
A minimalist and performant status bar written in C for Wayland compositors (with layer-shell support), designed to be lightweight and highly configurable.
Features
- Wayland Native: Uses
wlr-layer-shellfor seamless integration - Zurin Integration: UNIX socket-based control for workspaces and window focus for integration with the Zurin compositor
- Modular Widgets:
- Workspaces (interactive)
- Window Title
- Python Integrations (dynamic output, run in the background)
- System Indicators (Volume, Network, Battery, Clock)
- Runtime Configuration: TOML-based configuration for appearance and scripts
- Tooltips: hover hints for the expanded content of each widget
- Configurable Opacity: bar background alpha via
background_opacity
Dependencies
Required
| Package | Description |
|---|---|
| wayland | Wayland core libraries |
| wayland-protocols | Wayland protocol definitions |
| python3 | Required at runtime: plugin scripts run via python3 |
| nerd-fonts | Font support for icons and special characters |
Runtime tools (not linked at build time)
| Tool | Description |
|---|---|
pactl |
Volume widget (PulseAudio or PipeWire's pulse layer) |
busctl |
Used by the bundled music plugin (MPRIS in systemd) |
bluetoothctl |
Used by the bundled Bluetooth plugin (BlueZ) |
zmenu |
Optional: interactive menus for weather/sysmon/bluetooth plugins |
Optional
| Package | Description |
|---|---|
| zurin | Zurin compositor integration |
Build Tools
- CMake 3.12+
- pkg-config
- GCC or Clang
- wayland-scanner
Building
# Create build directory
mkdir build && cd build
# Configure (installs to /usr/bin by default)
cmake ..
# Build
make -j$(nproc)
# Install: binary to /usr/bin, config + plugin scripts to ~/.config/zbar/
# (the directory is created automatically if it does not exist)
sudo make install
If you configured with an older CMake cache (default
/usr/local), reset the prefix withcmake -DCMAKE_INSTALL_PREFIX=/usr ..before installing.
Running
zbar
Configuration
The installer copies config.toml and the plugin scripts to
~/.config/zbar/ (and ~/.config/zbar/scripts/). Edit
~/.config/zbar/config.toml to adjust appearance and scripts.
Add the plugins you want to ~/.config/zbar/scripts.
Example Configuration
[appearance]
height = 32
gaps_out = 8
border_width = 2
border_color = "#1e3a5f"
background_color = "#0a1628"
# 0 = fully transparent, 100 = fully opaque (default)
background_opacity = 100
font = "Mononoki Nerd Font 11"
[scripts]
music = "music.py"
weather = "weather.py"
sysmon = "sysmon.py"
bluetooth = "bluetooth.py"
License
GPLv3. See LICENSE file.
Contributing
Contributions are welcome! This project aims to complement the Zurin compositor ecosystem.