Waybar

From Void Linux Wiki
Jump to: navigation, search

Waybar is a highly customizable bar application (similiar to Polybar) written for wlroots-based Wayland compositors e.g. Sway and Wayfire.

Installation

# xbps-install -S waybar

Font Awesome

In order for the default configuration to display correctly you must have either font-awesome or font-awesome5 installed.

# xbps-install -S font-awesome

Modules

Waybar includes the following built-in modules:

  • Tray
  • CPU
  • Sway (Workspaces, Binding mode, Focused window name)
  • Local time
  • Battery
  • Network
  • Pulseaudio
  • Memory
  • Temperature
  • MPD

The visible modules can be configured by modifying the configuration file. Waybar also supports custom scripts to display information not provided by the default modules.


Configuration

Waybar uses two configuration files:

  • a JSON file named 'config'
  • a CSS file named 'style.css'

Valid paths for these files are:

$HOME/.config/waybar/
$HOME/waybar
/etc/xdg/waybar

You can copy the default configs from /etc/xdg/waybar or download them from the project's Github page:

Some users might prefer a minimal config to start with which is also demonstrated here. More detailed information about configurating waybar to your liking is available on the project's Wiki.

Running

Sway

The easiest way to run Waybar under Sway (instead of swaybar) is to modify the swaybar_command in your Sway config:

bar {
    swaybar_command waybar
}

Known issues

The tray implementation seems somewhat lacking or partially broken at the moment. See the Github issue for more information and updates.