2022-10-20 22:54:34 +02:00
|
|
|
# Waybar
|
2022-08-12 20:46:36 +02:00
|
|
|
|
|
|
|
Waybar is a GTK status bar made specifically for wlroots compositors.
|
|
|
|
|
2022-10-20 18:12:16 +02:00
|
|
|
To use it, it's recommended to use the AUR package `waybar-hyprland-git`.
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
## Compiling Manually
|
2022-10-19 15:22:42 +02:00
|
|
|
|
2022-08-12 20:46:36 +02:00
|
|
|
To compile manually:
|
|
|
|
|
2022-08-13 18:25:43 +02:00
|
|
|
Clone the source, cd into it, then do:
|
2022-08-13 01:47:48 +02:00
|
|
|
|
2022-10-19 17:09:16 +02:00
|
|
|
```bash
|
2022-08-12 20:46:36 +02:00
|
|
|
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
|
|
|
|
```
|
|
|
|
|
2022-10-23 00:58:34 +02:00
|
|
|
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
|
2022-10-19 17:09:16 +02:00
|
|
|
all the references to `sway/workspaces/` with `wlr/workspaces`.
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-08-13 01:47:48 +02:00
|
|
|
For more info regarding configuration, see
|
2022-08-13 18:25:43 +02:00
|
|
|
[The Waybar Wiki](https://github.com/Alexays/Waybar/wiki).
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
## Waybar popups render behind the windows
|
2022-10-19 16:44:04 +02:00
|
|
|
|
2022-10-23 00:58:34 +02:00
|
|
|
In `~/.config/waybar/config`, make sure that you have the `layer` configuration
|
2022-10-19 17:09:16 +02:00
|
|
|
set to `top` and not `bottom`.
|
2022-10-19 16:44:04 +02:00
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
## Active workspace doesn't show up
|
2022-10-19 16:44:04 +02:00
|
|
|
|
|
|
|
Replace `#workspaces button.focus` with `#wroskapces button.active` in `~/.config/style.css`.
|
|
|
|
|
2022-10-23 00:58:34 +02:00
|
|
|
## Scrolling through workspaces
|
2022-10-19 17:09:16 +02:00
|
|
|
|
2022-10-23 00:58:34 +02:00
|
|
|
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:
|
|
|
|
|
|
|
|
```json
|
2022-10-19 17:09:16 +02:00
|
|
|
|
|
|
|
```json
|
|
|
|
"wlr/workspaces": {
|
|
|
|
"format": "{icon}",
|
|
|
|
"on-scroll-up": "hyprctl dispatch workspace e+1",
|
|
|
|
"on-scroll-down": "hyprctl dispatch workspace e-1"
|
|
|
|
},
|
|
|
|
```
|
|
|
|
|
2022-10-23 00:58:34 +02:00
|
|
|
## Clicking on a workspace icon does not work!
|
2022-10-19 17:09:16 +02:00
|
|
|
|
|
|
|
On the `wlr/workspaces` module, add `"on-click": "activate"`. That's the purpose of
|
2022-10-23 00:58:34 +02:00
|
|
|
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
|
2022-10-19 17:09:16 +02:00
|
|
|
this function to make it work with `hyprctl`.
|
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
# Eww
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-08-13 18:25:43 +02:00
|
|
|
In order to use [Eww](https://github.com/elkowar/eww), you first have to install
|
2022-08-13 01:47:48 +02:00
|
|
|
it, either using your distro's package manager, by searching `eww-wayland`, or
|
2022-08-13 18:25:43 +02:00
|
|
|
by manually compiling. In the latter case, you can follow the
|
|
|
|
[instructions](https://elkowar.github.io/eww).
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
## Configuration
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-08-13 18:25:43 +02:00
|
|
|
After you've successfully installed Eww, you can move onto configuring it. There
|
2022-10-21 16:03:44 +02:00
|
|
|
are a few examples listed in the [Readme](https://github.com/elkowar/eww). It's also
|
2022-10-23 00:58:34 +02:00
|
|
|
highly recommended to read through the
|
2022-08-12 20:46:36 +02:00
|
|
|
[Configuration options](https://elkowar.github.io/eww/configuration.html).
|
|
|
|
|
2022-08-13 18:25:43 +02:00
|
|
|
{{< hint type=important >}}
|
|
|
|
Read
|
|
|
|
[the Wayland section](https://elkowar.github.io/eww/configuration.html#wayland)
|
2022-08-13 01:47:48 +02:00
|
|
|
carefully before asking why your bar doesn't work.
|
2022-08-13 18:25:43 +02:00
|
|
|
{{< /hint >}}
|
2022-10-20 21:55:23 +02:00
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
# Hybrid
|
2022-10-20 21:55:23 +02:00
|
|
|
|
2022-10-21 16:19:24 +02:00
|
|
|
Like Waybar, [Hybrid](https://github.com/vars1ty/HybridBar) is a GTK status bar mainly focused for wlroots compositors.
|
2022-10-20 21:55:23 +02:00
|
|
|
|
|
|
|
You can install it from the AUR by the name `hybrid-bar-git`, do note though that
|
|
|
|
it builds the bar from source, so it may take a few minutes.
|
|
|
|
|
2022-10-20 22:54:34 +02:00
|
|
|
## Configuration
|
2022-10-20 21:55:23 +02:00
|
|
|
|
|
|
|
The configuration is done through JSON, more information is available [here](https://github.com/vars1ty/HybridBar).
|