A minimalist Wayland status bar with modular widgets and scriptable extensions.
  • C 87.1%
  • Python 9.9%
  • CMake 3%
Find a file
Sandro Alves c441bf212d fix(bar): stop double-counting gaps_out in the exclusive zone
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.
2026-10-08 23:03:52 +01:00
include test: extract JSON helpers and add a test suite 2026-10-08 22:10:36 +01:00
protocols build: generate wayland protocol sources in the build tree 2026-10-08 21:58:25 +01:00
scripts chore(scripts): make all plugin scripts executable 2026-10-08 22:53:14 +01:00
src fix(bar): stop double-counting gaps_out in the exclusive zone 2026-10-08 23:03:52 +01:00
tests test: extract JSON helpers and add a test suite 2026-10-08 22:10:36 +01:00
.gitignore build: generate wayland protocol sources in the build tree 2026-10-08 21:58:25 +01:00
CMakeLists.txt feat(scripts): add sysmon and bluetooth plugins 2026-10-08 22:53:07 +01:00
config.toml fix(bar): stop double-counting gaps_out in the exclusive zone 2026-10-08 23:03:52 +01:00
LICENSE feat: initial implementation of ZBar, a Wayland status bar with modular widgets and TOML configuration 2026-02-04 03:27:20 +00:00
README.md feat(scripts): add sysmon and bluetooth plugins 2026-10-08 22:53:07 +01:00

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-shell for 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 with cmake -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.