User:Schievel/waybar-hyprland

From Gentoo Wiki
Jump to:navigation Jump to:search

Emerge waybar with USE=experimental, otherwise workspace widget wrl/workspaces does not work.

Patch for persistent workspaces got recently merged, but no release version has it yet, so use 9999.


Put this is /etc/portage/patches/gui-apps/waybar/hyprland-clickable-workspaces.path

diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
index 6a496e6..5d14729 100644
--- a/src/modules/wlr/workspace_manager.cpp
+++ b/src/modules/wlr/workspace_manager.cpp
@@ -511,7 +511,8 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
   if (action.empty())
     return true;
   else if (action == "activate") {
-    zext_workspace_handle_v1_activate(workspace_handle_);
+    const std::string command = "hyprctl dispatch workspace " + name_;
+	system(command.c_str());
   } else if (action == "close") {
     zext_workspace_handle_v1_remove(workspace_handle_);
   } else {