Status Bars
Waybar is a GTK status bar made specifically for wlroots compositors.
To use it, it’s recommended to use the AUR package waybar-hyprland-git
.
To compile manually:
Clone the source, cd into it, then do:
sed -i 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp
meson --prefix=/usr --buildtype=plain --auto-features=enabled --wrap-mode=nodownload build
meson configure -Dexperimental=true build
sudo ninja -C build install
If you want to use the workspaces module, first, copy the configuration files from
/etc/xdg/waybar/
into ~/.config/waybar/
. Then, in ~/.config/waybar/conf/
replace
all the references to sway/workspaces
with wlr/workspaces
.
For more info regarding configuration, see The Waybar Wiki.
In ~/.config/waybar/config
, make sure that you have the layer
configuration
set to top
and not bottom
.
Replace #workspaces button.focus
with #workspaces button.active
in ~/.config/style.css
.
Since there a lot of configuration options from sway/workspaces
are missing, you
should deduce some of them by yourself. In the case of scrolling, it should look like this:
"wlr/workspaces": {
"format": "{icon}",
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1"
}
On the wlr/workspaces
module, add "on-click": "activate"
. That’s the purpose of
the sed
command used before building Waybar: the default way to select a workspace by
clicking uses the swaymsg
’s way, and thus it is required to edit
this function to make it work with hyprctl
.
In order to use Eww, you first have to install
it, either using your distro’s package manager, by searching eww-wayland
, or
by manually compiling. In the latter case, you can follow the
instructions.
After you’ve successfully installed Eww, you can move onto configuring it. There are a few examples listed in the Readme. It’s also highly recommended to read through the Configuration options.
Read the Wayland section carefully before asking why your bar doesn’t work.
Like Waybar, Hybrid is a GTK status bar mainly focused for wlroots compositors.
You can install it from the AUR by the name hybrid-bar
.
The configuration is done through JSON, more information is available here.