#5158 (6672e924) moved connectToSocket() off the constructing thread and
into the detached IPC worker's own try/catch, so a missing NIRI_SOCKET no
longer throws out of IPC::IPC(). That was needed to fix #5117 (the worker
should reconnect instead of dying when an established stream drops), but
it also meant the very first connection attempt can never fail anymore.
Factory::makeModule()/Bar::getModules() rely on that constructor throwing
to disable a module it can't construct. With niri/workspaces and
niri/window always constructing successfully now, they get added to every
bar regardless of which compositor is actually running, showing up as a
permanently-empty widget next to the real workspace modules under
Hyprland/Sway.
Restore the old semantics for the first connection: connectToSocket() runs
synchronously in IPC::IPC() again, so a missing socket still throws and
the module gets disabled as before. Only a drop *after* that succeeds
falls into the retrying reconnect loop, preserving the #5117 fix.
Waybar
Highly customizable Wayland bar for Sway and wlroots-based compositors.
Available in all major distributions.
Installation · Wiki · Configuration · Styling · Examples · FAQ
Features
Compositor integration
| Compositor | Workspaces / Tags | Window | Layout | Language | Mode |
|---|---|---|---|---|---|
| Sway | ✅ | ✅ | ✅ | ✅ | |
| River | ✅ | ✅ | ✅ | ✅ | |
| Hyprland | ✅ | ✅ | ✅ | ✅ | |
| Niri | ✅ | ✅ | ✅ | ||
| Mango | ✅ | ✅ | ✅ | ✅ | ✅ |
| DWL | ✅ | ✅ | |||
| Wayfire | ✅ | ✅ |
DWL requires the dwl IPC patch.
Modules
- Power & hardware — Battery, UPower, Power profiles daemon, Backlight, CPU, Memory, Disk, Temperature
- Connectivity — Network, Bluetooth, GPS, WWAN
- Audio & media — PulseAudio, WirePlumber, JACK, sndio, Cava, MPD, MPRIS
- Desktop — Clock & calendar, System tray, Idle inhibitor, Keyboard state, Privacy, Gamemode, Systemd failed units, Image, Custom scripts
…and more. Every module is documented on the wiki (see the Modules sidebar).
Getting started
git clone https://github.com/Alexays/Waybar
cd Waybar
meson setup build
ninja -C build
./build/waybar # run without installing
Waybar launches with a sensible default config. To make
it yours, copy the default config and stylesheet into ~/.config/waybar/ and edit
them. The Configuration
and Styling guides cover every
option, and Examples has
ready-to-use community setups.
Installation
Waybar is packaged by most distributions:
An Ubuntu PPA with more recent versions is available here.
Building from source
git clone https://github.com/Alexays/Waybar
cd Waybar
meson setup build
ninja -C build
ninja -C build install # optional
Runtime dependencies
gtkmm3 jsoncpp libsigc++ fmt wayland
chrono-date spdlog xkbregistry libgtk-3-dev upower
libpulse [Pulseaudio module]
libnl [Network module]
libappindicator-gtk3 [Tray module]
libdbusmenu-gtk3 [Tray module]
libmpdclient [MPD module]
libsndio [sndio module]
libevdev [KeyboardState module]
Build dependencies
cmake meson scdoc wayland-protocols
Install dependencies — Ubuntu
sudo apt install \
clang-tidy gobject-introspection libdbusmenu-gtk3-dev libevdev-dev \
libfmt-dev libgirepository1.0-dev libgtk-3-dev libgtkmm-3.0-dev \
libinput-dev libjsoncpp-dev libmpdclient-dev libnl-3-dev libnl-genl-3-dev \
libpulse-dev libsigc++-2.0-dev libspdlog-dev libwayland-dev scdoc upower \
libxkbregistry-dev
Install dependencies — Arch
pacman -S --asdeps \
gtkmm3 jsoncpp libsigc++ fmt wayland chrono-date spdlog gtk3 \
gobject-introspection libgirepository libpulse libnl libappindicator-gtk3 \
libdbusmenu-gtk3 libmpdclient sndio libevdev libxkbcommon upower meson \
cmake scdoc wayland-protocols glib2-devel
Contributing
Contributions are welcome — see CONTRIBUTING.md. The style guidelines are Google's C++ style.
Docs live in the man pages. Module documentation is written in
man/(scdoc) and auto-synced to the wiki. Edit the man page, not the wiki — see.github/wiki.
Caution
Distributions of Waybar are only released on the official GitHub page.
Waybar does not have an official website. Do not trust any site claiming to be official.
License
Waybar is licensed under the MIT license. See LICENSE for details.
