horriblename / hyprgrass

hyprland plugin for touch gestures
BSD 3-Clause "New" or "Revised" License
269 stars 11 forks source link

Unable to get gestures to work #45

Closed N0tallion6 closed 10 months ago

N0tallion6 commented 1 year ago

Hi, I've been trying to configure my Surface Pro 4 to work with Hyprland. Saw this plugin and thought it might be handy for navigation, especially if I detach the keyboard. However, I can't seem to get the plugin to respond at all.

I've tried installing via Hyprload as well as compiling manually and loading in my hyprland config with hyprctl plugin load /path/to/libhyprgrass.so. Interestingly, Hyprgrass doesn't show up in the plugin list with hyprload plugin list if I've loaded it through Hyprload, which is what prompted me to try installing it manually, but does when manually executing the one compiled from source, though I don't know if this is a quirk of Hyprload itself.

I don't know if it's anything to do with the way I configured it, although I'm fairly certain I've followed the readme to a T - my config is as follows:

gestures {
    workspace_swipe = true
    workspace_swipe_cancel_ratio = 0.15
}
plugin {
  touch_gestures {
  sensitivity = 4.0
  workspace_swipe_fingers = 3
  }
}

Current gesture bindings are:

bind = , edge:r:l, exec, notify-send "Hello there!"
bind = , swipe:1:d, exec, notify-send "Hello there!"
bind = , swipe:4:d, killactive

(I set it to execute notify-send as a way of testing, though I also tried the top 2 with just the standard workspace +1 command, but that doesn't appear to have any effect either...)

Am I missing something?

I apologise in advance if I've made any rookie mistakes here. Still trying to wrap my head around Hyprland and everything associated with it!

horriblename commented 1 year ago

What do you mean by "plugin not responding"? Does touch screen still work in apps (or is your touch screen completely unusable)? Or is everything working fine, just gestures don't work

Hyprgrass doesn't show up in the plugin list with hyprload plugin list if I've loaded it through Hyprload,

That may very well be a mistake in the README, I don't use hyprload myself so I'm not sure (I only tested it once)

horriblename commented 1 year ago

also what distro are you on?

N0tallion6 commented 1 year ago

What do you mean by "plugin not responding"? Does touch screen still work in apps (or is your touch screen completely unusable)? Or is everything working fine, just gestures don't work

Apologies, I probably could've worded that a bit better. The touchscreen is fine, it's just the gestures that Hyprgrass offers that don't work.

I'm running Arch Linux

horriblename commented 12 months ago

found this on the hy3 repo

Pacman is not very reliable when it comes to building packages in the correct order. If hy3 fails to load or build, crashes randomly or behaves oddly (commonly dispatchers stop working) then your packages likely updated in the wrong order, or you have hyprland headers in /usr/local.

To fix this, remove /usr/include/hyprland, /usr/local/include/hyprland, /usr/share/pkgconfig/hyprland.pc and /usr/local/share/pkgconfig/hyprland.pc, then reinstall hyprland and hy3.

If you know how to fix this please open an issue or pr, or message @outfoxxed:outfoxxed.me in the matrix room.

*This was talking about installing from AUR but the part about deleting /usr/local files should still apply

the hyprland headers and pkg-config file MUST be installed correctly, for the target version of hyprland.

Note that you'll have to rebuild hyprgrass each time you update hyprland

N0tallion6 commented 12 months ago

Sorry for the late reply,

The version of Hyprland I was using when I raised this ticket was 0.30.0-1 from the Official Arch repo. What's strange is that the Hyprgrass repo is at version 0.30.0, but when I load the libhyprgrass.so after compiling from source and loading it manually, the hyprctl plugin list command reports it as version 0.2 - is that correct? I'm guessing that's the previous version?

To fix this, remove /usr/include/hyprland, /usr/local/include/hyprland, /usr/share/pkgconfig/hyprland.pc and /usr/local/share/pkgconfig/hyprland.pc, then reinstall hyprland and hy3.

I tried deleting those files and re-installing Hyprland along with Hyprload. That didn't appear to work. Then I decided to try the above again, only this time I installed Hyprland from the AUR instead of the standard Arch repo.

Interestingly, Hyprload actually installed everything this time and I could see Hyprgrass listed when I executed hyprctl plugin list. (Though it's still worth mentioning that it was still reported as version 0.2) Perhaps I did something wrong during the process of setting up Hyprload...

However, I was only able to get Hyprgrass to work very briefly. After performing a gesture 2-3 times Hyprland seemed to completely crash. Also, any of the gestures that were bound to execute execute a command (In my case this was swaync-client -op to open my Sway Notification center bound to execute when I swiped left from the right edge) caused a crash immediately.

I'll give it another try when I have some spare time in case I did something else wrong.

Which version/package of Hyprland has hyprgrass been tested with?

horriblename commented 11 months ago

which version/package of Hyprland has hyprgrass been tested with?

it works for me on Hyprland 0.30, but it should work on any version after the plugin addition

the hyprctl plugin list command reports it as version 0.2

That's my bad actually, forgot to update version number in the source file

@N0tallion6 @xVermillionx @crimist since yall seem to be facing the same issue I'll let you know here:

I'm waiting for https://github.com/hyprwm/Hyprland/pull/3545 to get merged before I do anything. Basically I'd be able to check for version mismatch - if it is one, there's nothing to fix on my end; if it isn't one... I'll figure it out when it comes to that

vaxerski commented 11 months ago

3545 will be merged once fufexan is resurrected

Magnitudexx commented 11 months ago

3545 looks merged now

tiquis0290 commented 11 months ago

Hi, i dont know if its related to this issue but i see hyprgrass plugin installed and i have all copied from readme in my hyprland.conf but my binds doesnt work(same as in readme), even tried different ones but still the same, am i missing something?

N0tallion6 commented 11 months ago

@horriblename My sincere apologies for the late reply, Life got in the way...

I finally got round to testing Hyprgrass about a week ago with your latest patch. Unfortunately I'm still facing issues.

I uninstalled Hyprland and rebuilt it from source via the AUR. The AUR build had caught up with the minimum version you specified hence why I did it this way. (The version I used being 0.31.0.r67.062f7494-1) I also removed and re-installed Hyprload for good measure and re-installed Hyprgrass that way. I waited until it had fully installed and was showing up when using the hyprctl plugin list command.

The good news is that Hyprgrass no longer crashes my Hyprland. The bad news however is that I still cannot get the gestures to work. In fact, when I try to do a gesture, my Surface pro appears to stop responding to touch gestures entirely - I can't use the Pen or my fingers. Mouse still works fine however.

I've saved a copy of the log and attached it here: hyprland.log

Apologies once again for the late reply - hope this helps!

notorangee commented 11 months ago

I had the same problem on Surface pro5, I also use Arch Linux

horriblename commented 10 months ago

last shot, if this doesn't work I'm truly out of ideas.

update hyprgrass to latest and hyprland from commit 4d6fa6ed0c6f10671c2bee337dc026f68cc12989 onwards

pr: #60

crimist commented 10 months ago

hyprgrass @ 590b197d61694f44998f0195d07602e682dd95bb + hyprland @ 4d6fa6ed0c6f10671c2bee337dc026f68cc12989 has fixed all my issues! Both #45 and #47.

Thanks for your work :)

tiquis0290 commented 10 months ago

last shot, if this doesn't work I'm truly out of ideas.

update hyprgrass to latest and hyprland from commit 4d6fa6ed0c6f10671c2bee337dc026f68cc12989 onwards

pr: #60

thx now its working only one minor bug what i found (maybe i have problem somewhere else hyprload even complaining about mismatch version of hyprland) when i use hyprland and add new bind first execution crash hyprland but after restart works fine.

horriblename commented 10 months ago

when i use hyprland and add new bind first execution crash hyprland but after restart works fine.

If you can reproduce it, open a separate issue for this

tiquis0290 commented 10 months ago

I was able to reproduce it once, even have crash report but now iam not able to reproduce it

Mahgozar commented 10 months ago

the same happens to me too , sometimes it even fails to load and when i load it manually it doesn't work at all and sometimes it works perfectly

N0tallion6 commented 10 months ago

I finally managed to take another look at this. I re-compiled Hyprland, this time directly from the source code so that I now have the latest version. I was still having a few issues with crashes - for some reason it would crash if I specifically used a Swipe gesture after using an Edge gesture.

Then I stupidly realised I was still on the feat HL version check branch that you setup to try and fix the original issue. I modified my Hyprload.toml to re-download the main branch and now everything works fine!

Thank you so much for your help @horriblename ! we can close this ticket now