bsd-ac / wayland-desktop

Gentoo overlay for Wayland related ebuilds
https://gentoo.org
ISC License
61 stars 21 forks source link

waybar on-click with hyprland #40

Closed ignamartinoli closed 1 year ago

ignamartinoli commented 1 year ago

The on-click functionality of Waybar does not work in Hyprland.

As stated in this section of the guide, Waybar has to be compiled with some special steps for this functionality to work.

I would patch this myself but I'm terrible with writing ebuilds, nevertheless I am gladly willing to test and aid in any other way this fix :D

epsilon-0 commented 1 year ago

This is a waybar issue. This can be solved by creating a patch (using that sed command) and storing it as /etc/portage/patches/gui-apps/waybar/hyprland-waybar-fix.patch and then recompiling waybar.

ignamartinoli commented 1 year ago

Thanks! I will report it to Waybar so that it get's fixed upstream

ignamartinoli commented 1 year ago

@epsilon-0 just to be sure, since I never applied a patch. This should be the content of the /etc/portage/patches/gui-apps/waybar/hyprland-waybar-fix.patch?

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
epsilon-0 commented 1 year ago

no, that won't work. You have to create a patch using git diff or something. https://devconnected.com/how-to-create-and-apply-git-patch-files/