Waybar
Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
Top Related Projects
A fast and easy-to-use status bar
ElKowars wacky widgets
Rofi: A window switcher, application launcher and dmenu replacement
Light-weight system monitor for X, Wayland (sort of), and other things, too
A huge collection of polybar themes with different styles, colors and variants.
Quick Overview
Waybar is a highly customizable status bar for Wayland-based compositors, such as Sway. It's designed to be a modern replacement for traditional status bars like i3bar, offering a rich set of modules and extensive configuration options to create a personalized and informative desktop experience.
Pros
- Highly customizable with a wide range of built-in modules
- Supports custom modules for extended functionality
- Sleek and modern appearance with CSS styling support
- Active development and community support
Cons
- Limited to Wayland compositors, not compatible with X11
- Configuration can be complex for beginners
- Some modules may require additional dependencies
- Performance impact on systems with many active modules
Getting Started
- Install Waybar using your distribution's package manager or build from source.
- Create a configuration file at
~/.config/waybar/config
. - Create a CSS file at
~/.config/waybar/style.css
. - Add Waybar to your compositor's configuration (e.g., Sway config).
Basic config
example:
{
"layer": "top",
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["pulseaudio", "network", "battery"],
"clock": {
"format": "{:%Y-%m-%d %H:%M}"
},
"battery": {
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""]
},
"network": {
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-disconnected": "Disconnected ⚠"
}
}
Basic style.css
example:
* {
border: none;
border-radius: 0;
font-family: "Font Awesome 5 Free", Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
min-height: 0;
}
window#waybar {
background: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: #ffffff;
border-bottom: 3px solid transparent;
}
#workspaces button.focused {
background: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio {
padding: 0 10px;
margin: 0 5px;
}
Start Waybar by adding the following to your compositor's config file (e.g., ~/.config/sway/config
):
exec waybar
Competitor Comparisons
A fast and easy-to-use status bar
Pros of polybar
- More mature project with a larger community and extensive documentation
- Highly customizable with a wide range of built-in modules
- Supports X11 window managers, making it compatible with more desktop environments
Cons of polybar
- Limited Wayland support, primarily focused on X11
- Configuration can be more complex and verbose
- Slower development cycle compared to Waybar
Code Comparison
Polybar configuration example:
[bar/mybar]
modules-left = i3
modules-center = date
modules-right = cpu memory
Waybar configuration example:
{
"modules-left": ["sway/workspaces"],
"modules-center": ["clock"],
"modules-right": ["cpu", "memory"]
}
Both Polybar and Waybar are popular status bar projects for Linux desktop environments. Polybar is a more established project with broader compatibility, especially for X11-based systems. It offers extensive customization options and a wide range of built-in modules. However, its configuration can be more complex, and it has limited Wayland support.
Waybar, on the other hand, is designed specifically for Wayland compositors, offering better integration with Wayland-based environments. It features a more straightforward JSON-based configuration and faster development cycle. However, it has a smaller community and fewer built-in modules compared to Polybar.
The choice between the two largely depends on the user's desktop environment, desired features, and willingness to invest time in configuration.
ElKowars wacky widgets
Pros of eww
- More flexible and customizable, allowing for complex widgets and layouts
- Uses Yuck, a custom DSL, for easier configuration and styling
- Supports multiple backends (X11, Wayland, and macOS)
Cons of eww
- Steeper learning curve due to its unique configuration language
- Less mature project with potentially fewer community resources
- May require more system resources due to its Rust-based implementation
Code Comparison
Waybar configuration (JSON):
{
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["battery", "network"]
}
eww configuration (Yuck):
(defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0%"
:width "100%"
:height "30px")
:stacking "fg"
(bar))
Both Waybar and eww are popular status bar tools for Linux desktop environments, particularly for tiling window managers. Waybar is specifically designed for Wayland compositors, while eww offers broader compatibility. Waybar provides a more straightforward setup with its JSON configuration, making it easier for beginners. eww, on the other hand, offers greater customization options and flexibility, but requires learning its custom Yuck language. The choice between the two depends on the user's needs for simplicity versus advanced customization.
Rofi: A window switcher, application launcher and dmenu replacement
Pros of Rofi
- More versatile: Can be used as an application launcher, window switcher, and general-purpose menu
- Highly customizable with themes and scripting support
- Lightweight and fast, with minimal dependencies
Cons of Rofi
- Primarily designed for X11, with limited Wayland support
- Steeper learning curve for advanced customization
- Less integrated with specific desktop environments or window managers
Code Comparison
Rofi configuration example:
rofi.theme: /path/to/theme.rasi
rofi.modi: window,run,ssh
rofi.width: 50
rofi.lines: 15
rofi.columns: 1
Waybar configuration example:
{
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["pulseaudio", "network", "battery"],
"clock": {
"format": "{:%Y-%m-%d %H:%M}"
}
}
While both projects serve different purposes, this comparison highlights the key differences between Rofi, a versatile application launcher and menu system, and Waybar, a customizable status bar for Wayland compositors. Rofi offers more flexibility in terms of functionality, while Waybar is specifically designed for integration with Wayland-based environments.
Light-weight system monitor for X, Wayland (sort of), and other things, too
Pros of Conky
- Highly customizable with Lua scripting support
- Works on a wide range of desktop environments and window managers
- Extensive documentation and large user community
Cons of Conky
- Steeper learning curve for advanced configurations
- Less modern appearance compared to Waybar
- Can be resource-intensive with complex setups
Code Comparison
Conky configuration example:
conky.config = {
alignment = 'top_right',
background = false,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'white',
double_buffer = true,
}
Waybar configuration example:
{
"layer": "top",
"position": "top",
"height": 30,
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "clock"]
}
Conky offers more flexibility in terms of scripting and customization, making it suitable for users who want complete control over their system monitor's appearance and functionality. However, this comes at the cost of a steeper learning curve and potentially higher resource usage.
Waybar, on the other hand, provides a more modern and streamlined approach, with easier configuration using JSON. It's specifically designed for Wayland compositors, offering better integration with environments like Sway.
A huge collection of polybar themes with different styles, colors and variants.
Pros of polybar-themes
- Extensive collection of pre-designed themes
- Easy customization and configuration options
- Supports various Linux distributions and window managers
Cons of polybar-themes
- Limited to Polybar, not compatible with other status bars
- May require more manual setup and configuration
- Some themes might be resource-intensive
Code Comparison
Waybar configuration (JSON):
{
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["network", "battery"],
"clock": {
"format": "{:%Y-%m-%d %H:%M}"
}
}
polybar-themes configuration (INI):
[bar/example]
modules-left = i3
modules-center = date
modules-right = wlan battery
[module/date]
type = internal/date
date = %Y-%m-%d %H:%M
Waybar focuses on a JSON-based configuration, while polybar-themes uses an INI-style format. Waybar's configuration is more compact and structured, while polybar-themes offers more flexibility in module placement and customization.
Waybar is designed specifically for Wayland compositors, providing native support for Sway and other Wayland-based environments. polybar-themes, being based on Polybar, offers broader compatibility with various X11 window managers and desktop environments.
Both projects aim to enhance the user's status bar experience, but they cater to different use cases and preferences. Waybar provides a modern, Wayland-focused solution, while polybar-themes offers extensive customization options for traditional X11 environments.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Waybar
Highly customizable Wayland bar for Sway and Wlroots based compositors.
Available in all major distributions
Waybar examples
Current features
- Sway (Workspaces, Binding mode, Focused window name)
- River (Mapping mode, Tags, Focused window name)
- Hyprland (Window Icons, Workspaces, Focused window name)
- DWL (Tags, Focused window name) requires dwl ipc patch
- Tray #21
- Local time
- Battery
- UPower
- Power profiles daemon
- Network
- Bluetooth
- Pulseaudio
- Privacy Info
- Wireplumber
- Disk
- Memory
- Cpu load average
- Temperature
- MPD
- Custom scripts
- Custom image
- Multiple output configuration
- And many more customizations
Configuration and Styling
See the wiki for more details.
Installation
Waybar is available from a number of Linux 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
$ ./build/waybar
# If you want to install it
$ ninja -C build install
$ waybar
Dependencies
gtkmm3
jsoncpp
libsigc++
fmt
wayland
chrono-date
spdlog
libgtk-3-dev [gtk-layer-shell]
gobject-introspection [gtk-layer-shell]
libgirepository1.0-dev [gtk-layer-shell]
libpulse [Pulseaudio module]
libnl [Network module]
libappindicator-gtk3 [Tray module]
libdbusmenu-gtk3 [Tray module]
libmpdclient [MPD module]
libsndio [sndio module]
libevdev [KeyboardState module]
xkbregistry
upower [UPower battery module]
Build dependencies
cmake
meson
scdoc
wayland-protocols
On Ubuntu, you can install all the relevant dependencies using this command (tested with 19.10 and 20.04):
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
Contributions welcome!
Have fun :)
The style guidelines are Google's
License
Waybar is licensed under the MIT license. See LICENSE for more information.
Top Related Projects
A fast and easy-to-use status bar
ElKowars wacky widgets
Rofi: A window switcher, application launcher and dmenu replacement
Light-weight system monitor for X, Wayland (sort of), and other things, too
A huge collection of polybar themes with different styles, colors and variants.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot