Giter VIP home page Giter VIP logo

hyprgrass's Introduction

Hyprland Touch Gestures

Warning

Even though hyprgrass is mostly stable now, there used to be some bugs that render your touch device unusable until you unload the plugin/close Hyprland (#27), keep a keyboard in hand the first time you try this. This plugin is still in alpha, expect breakable changes!

Please open an issue if you find any bugs. Feel free to make a feature request if you have a suggestion.

Features/Roadmap

  • Workspace Swipe
  • Custom commands
  • Swipe From Edge
  • Multi-finger swipe

Installation

Dependencies

Asides from Hyprland (duh), this plugin has the following dependencies:

glm

# build dependencies
meson
ninja

Install via hyprpm

First, install all dependencies. Then, run these commands:

hyprpm add https://github.com/horriblename/hyprgrass
hyprpm enable hyprgrass

You can add exec-once = hyprpm reload -n to your hyprland config to have plugins loaded at startup. -n will make hyprpm send a notification if anything goes wrong (e.g. update needed)

see hyprland wiki for more info

Install via Hyprload

(hyprload is deprecated, please use hyprpm instead)

  1. install all dependencies

  2. install hyprload by following the instructions here

  3. put this in ~/.config/hypr/hyprload.toml:

    plugins = [
        "horriblename/hyprgrass",
    ]
    
  4. run this command:

    # install the plugins
    hyprctl dispatch hyprload install
    
    # load plugins
    hyprctl dispatch hyprload load

Manual compilation

meson setup build
ninja -C build

Install via nix

Flakes are highly recommended (because I don't know how to do anything without them)

Put this in your flake.nix file:

{
   inputs = {
      # ...
      hyprland.url = "github:hyprwm/Hyprland";
      hyprgrass = {
         url = "github:horriblename/hyprgrass";
         inputs.hyprland.follows = "hyprland"; # IMPORTANT
      };
   };
}

and in your home-manager module:

wayland.windowManager.hyprland = {
   plugins = [
      inputs.hyprgrass.packages.${pkgs.system}.default
   ];
};

Configuration

Configuration options:

plugin:touch_gestures {
  # The default sensitivity is probably too low on tablet screens,
  # I recommend turning it up to 4.0
  sensitivity = 1.0

  # must be >= 3
  workspace_swipe_fingers = 3

  # switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
  # and can be used at the same time
  # possible values: l, r, u, or d
  # to disable it set it to anything else
  workspace_swipe_edge = d

  # in milliseconds
  long_press_delay = 400

  experimental {
    # send proper cancel events to windows instead of hacky touch_up events,
    # NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
    send_cancel = 0
  }
}

Other options

I also recommend that you adjust the settings for the built-in gesture to make it easier to switch workspaces:

gestures {
  workspace_swipe = true
  workspace_swipe_cancel_ratio = 0.15
}

Custom Commands

You can also bind gesture events to dispatchers, using hyprgrass-bind keyword. The syntax is like normal keybinds.

Syntax

hyprgrass-bind = , <gesture_name>, <dispatcher>, <args>

where (skip to examples if this is confusing):

  • gesture_name is one of:
    1. swipe:<finger_count>:<direction>
      • finger_count must be >= 3
      • direction is one of l, r, u, d, or ld, rd, lu, ru for diagonal directions.
        (l, r, u, d stand for left, right, up, down)
    2. tap:<finger_count>
      • finger_count must be >= 3
    3. edge:<from_edge>:<direction>
      • <from_edge> is from which edge to start from (l/r/u/d)
      • <direction> is in which direction to swipe (l/r/u/d/lu/ld/ru/rd)
    4. longpress:<finger_count>

Examples

plugin:touch_gestures {
    # swipe left from right edge
    hyprgrass-bind = , edge:r:l, workspace, +1

    # swipe up from bottom edge
    hyprgrass-bind = , edge:d:u, exec, firefox

    # swipe down from left edge
    hyprgrass-bind = , edge:l:d, exec, pactl set-sink-volume @DEFAULT_SINK@ -4%

    # swipe down with 4 fingers
    # NOTE: swipe events only trigger for finger count of >= 3
    hyprgrass-bind = , swipe:4:d, killactive

    # swipe diagonally left and down with 3 fingers
    # l (or r) must come before d and u
    hyprgrass-bind = , swipe:3:ld, exec, foot

    # tap with 3 fingers
    # NOTE: tap events only trigger for finger count of >= 3
    hyprgrass-bind = , tap:3, exec, foot

    # longpress can trigger mouse binds:
    hyprgrass-bindm = , longpress:2, movewindow
    hyprgrass-bindm = , longpress:3, resizewindow
}

Acknowledgements

Special thanks to wayfire for the awesome wf-touch library!

hyprgrass's People

Contributors

duckonaut avatar github-actions[bot] avatar horriblename avatar iamgiga avatar nine7nine avatar samuelefacenda avatar technotechnoduck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hyprgrass's Issues

compile failed for nixos

I did completely same as the readme.
with flake and homemanager,
but it builded failed,
here is the info:

[8/12] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o FAILED: src/libhyprgrass.so.p/main.cpp.o g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/6aay4yykygav8vmsfaqbchbhi6796b94-wf-touch-git-dev/include -I/nix/store/gprgf8rc2ngn6ighv1z61pvgac0k2k63-glm-0.9.9.8/include -I/nix/store/ldz76qcgv1ic8s8jlvhcyw51s7pzl2bx-pixman-0.43.4/include/pixman-1 -I/nix/store/bnanzp44z8gxxqcm2b9sw4wpymnlfqpp-libdrm-2.4.120> ../src/main.cpp: In function 'PLUGIN_DESCRIPTION_INFO pluginInit(void*)': ../src/main.cpp:73:96: error: no match for 'operator=' (operand types are 'std::shared_ptr<std::function<void(void*, SCallbackInfo&, std::any)> >' and 'CSharedPointer<std::function<void(void*, SCallbackInfo&, std::any)> >') 73 | g_pTouchDownHook = HyprlandAPI::registerCallbackDynamic(PHANDLE, "touchDown", hkOnTouchDown); | ^ In file included from /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/memory:80, from ../src/./gestures/Gestures.hpp:7, from ../src/GestureManager.hpp:2, from ../src/main.cpp:1: /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/bits/shared_ptr.h:418:9: note: candidate: 'template<class _Yp> std::shared_ptr<_Tp>::_Assignable<const std::shared_ptr<_Yp>&> std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Yp>&) [with _Tp = std::function<void(void*, SCallbackInfo&, st> 418 | operator=(const shared_ptr<_Yp>& __r) noexcept | ^~~~~~~~ /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/bits/shared_ptr.h:418:9: note: template argument deduction/substitution failed: ../src/main.cpp:73:96: note: 'CSharedPointer<std::function<void(void*, SCallbackInfo&, std::any)> >' is not derived from 'const std::shared_ptr<_Tp>' 73 | g_pTouchDownHook = HyprlandAPI::registerCallbackDynamic(PHANDLE, "touchDown", hkOnTouchDown); | ^ /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/bits/shared_ptr.h:429:9: note: candidate: 'template<class _Yp> std::shared_ptr<_Tp>::_Assignable<std::auto_ptr<_Up> > std::shared_ptr<_Tp>::operator=(std::auto_ptr<_Up>&&) [with _Tp = std::function<void(void*, SCallbackInfo&, std::any)>]' 429 | operator=(auto_ptr<_Yp>&& __r) | ^~~~~~~~ /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/bits/shared_ptr.h:429:9: note: template argument deduction/substitution failed: ../src/main.cpp:73:96: note: 'CSharedPointer<std::function<void(void*, SCallbackInfo&, std::any)> >' is not derived from 'std::auto_ptr<_Up>' 73 | g_pTouchDownHook = HyprlandAPI::registerCallbackDynamic(PHANDLE, "touchDown", hkOnTouchDown); | ^ /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/bits/shared_ptr.h:446:9: note: candidate: 'template<class _Yp> std::shared_ptr<_Tp>::_Assignable<std::shared_ptr<_Yp> > std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Yp>&&) [with _Tp = std::function<void(void*, SCallbackInfo&, std::any)>]' 446 | operator=(shared_ptr<_Yp>&& __r) noexcept | ^~~~~~~~ /nix/store/nw6sp0xjb83svy8a5d6i46islcv3l6sm-gcc-13.2.0/include/c++/13.2.0/bits/shared_ptr.h:446:9: note: template argument deduction/substitution failed: ../src/main.cpp:73:96: note: 'CSharedPointer<std::function<void(void*, SCallbackInfo&, std::any)> >' is not derived from 'std::shared_ptr<_Tp>' 73 | g_pTouchDownHook = HyprlandAPI::registerCallbackDynamic(PHANDLE, "touchDown", hkOnTouchDown);

config: Move to hyprlang keywords

Hyprlang allows us to use syntax like this:

plugins = {
  touch_gestures = {
    bind = , swipe:3:d, exec, thing
    bind = ...
  }
}
  • Existing support for Hyprland's bind keyword can be left as-is

  • binds introduced by the new keyword should be added to GestureManager.internalBinds

  • the gesture handlers already make use of internalBinds, but noone has ever tested this functionality so I wouldn't be surprised if it doesn't work

hyprpm failed to build

please help me to fix this

hyprpm output

 → checking for updates for hyprgrass                                                      
 → Cloning https://github.com/horriblename/hyprgrass                                       
✔ repository hyprgrass has updates.                                                        
 → Building hyprgrass                                                                      
✔ found hyprload manifest                                                                  
 → Building hyprgrass                                                                      
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━  6 / 8  Updating hyprgrass[v] shell returned:  -> cd /tmp/hyprpm/update && PKG_CONFIG_PATH="/home/shadow/.local/share/hyprpm/headersRoot/share/pkgconfig" meson setup build
The Meson build system
Version: 1.4.0
Source dir: /tmp/hyprpm/update
Build dir: /tmp/hyprpm/update/build
Build type: native build
Project name: hyprgrass
Project version: 0.6.0
C compiler for the host machine: cc (gcc 13.2.1 "cc (GCC) 13.2.1 20230801")
C linker for the host machine: cc ld.bfd 2.42.0
C++ compiler for the host machine: c++ (gcc 13.2.1 "c++ (GCC) 13.2.1 20230801")
C++ linker for the host machine: c++ ld.bfd 2.42.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -std=c++23: YES 
meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.1
Run-time dependency hyprland found: YES 0.39.1
Found CMake: /usr/bin/cmake (3.29.2)
Run-time dependency wftouch found: NO (tried pkgconfig and cmake)

Executing subproject wf-touch 

wf-touch| Project name: wf-touch
wf-touch| Project version: 0.0
wf-touch| C++ compiler for the host machine: c++ (gcc 13.2.1 "c++ (GCC) 13.2.1 20230801")
wf-touch| C++ linker for the host machine: c++ ld.bfd 2.42.0
wf-touch| Run-time dependency glm found: NO (tried pkgconfig and cmake)

subprojects/wf-touch/meson.build:6:6: ERROR: Dependency "glm" not found, tried pkgconfig and cmake

A full log can be found at /tmp/hyprpm/update/build/meson-logs/meson-log.txt

 -> cd /tmp/hyprpm/update && PKG_CONFIG_PATH="/home/shadow/.local/share/hyprpm/headersRoot/share/pkgconfig" ninja -C build
ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory



✖ Plugin hyprgrass failed to build.
  This likely means that the plugin is either outdated, not yet available for your version, or broken.
  If you are on -git, update first.
  Try re-running with -v to see more verbose output.
Fetching submodule subprojects/wf-touch
✔ updated hyprgrass                                                                        
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  8 / 8  Done!                          
✔ Ensuring plugin load state
✔ Loaded hyprbars
✔ Loaded Hyprspace
✔ Plugin load state ensured

combined key and touch combinations

I'm using a pretty tiny screen, and for lack of space I'd like to use key combinations to expand the possible touch gestures, as the most I can fit on screen comfortably is two fingers, which leaves not many combinations for use.

I'd for example like to open the context menu without automatically triggering a window move like so:

bindm = , longpress:1, exec, ydotool click 0xC1
# while having
bindm = $mainMod, longpress:1, movewindow

Could you implement that?
Thanks!

Unable to get gestures to work

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!

linux-surface compat (libwacom-surface)

I was just wondering if there are any plans to add compatibility with Surface touchscreens, or if I'm just missing the way to pass the libwacom output to hyprland. Currently the only way to use the touchscreen on these with linux installed is with some kernel patches that haven't been upstreamed yet, and they still have some quirks when it comes to multitouch support.

(Checkout here if you're curious.)

hyprland carch with hyprgrass

Hyprland, built from branch at commit 05c84304ccb1169b550504830139e07e28500a3b ().
Date: 2024-03-19
Tag:

flags: (if any)

System Information:
System name: Linux
Node name: xxx
Release: 6.8.1
Version: #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:19:29 UTC 2024

GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) (prog-if 00 [VGA controller])
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c5) (prog-if 00 [VGA controller])

os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240316.c75037b"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"

plugins:
hyprgrass by horriblename ver 0.5
hyprbars by Vaxry ver 1.0
borders-plus-plus by Vaxry ver 1.0

on standrd output after crash hyprland give me this error err:wayland.c:1942: failed to flush wayland socket:Brocken pipe

this is producible with any gesture

Hyprgrass doesn't build on latest Hyprland commit

> /nix/store/6pdsf2nfyniddz8yk7xxzmlc98zg3dkb-hyprland-0.30.0+date=2023-10-14_261c594-dev/include/hyprland/src/plugins/PluginAPI.hpp:276:12: note: the macro 'GIT_COMMIT_HASH' had not yet been defined
       > In file included from /nix/store/6pdsf2nfyniddz8yk7xxzmlc98zg3dkb-hyprland-0.30.0+date=2023-10-14_261c594-dev/include/hyprland/src/macros.hpp:17,
       >                  from /nix/store/6pdsf2nfyniddz8yk7xxzmlc98zg3dkb-hyprland-0.30.0+date=2023-10-14_261c594-dev/include/hyprland/src/helpers/Vector2D.hpp:5,
       >                  from /nix/store/6pdsf2nfyniddz8yk7xxzmlc98zg3dkb-hyprland-0.30.0+date=2023-10-14_261c594-dev/include/hyprland/src/helpers/MiscFunctions.hpp:6,
       >                  from /nix/store/6pdsf2nfyniddz8yk7xxzmlc98zg3dkb-hyprland-0.30.0+date=2023-10-14_261c594-dev/include/hyprland/src/debug/Log.hpp:8,
       >                  from ../src/GestureManager.hpp:4:
       > /nix/store/6pdsf2nfyniddz8yk7xxzmlc98zg3dkb-hyprland-0.30.0+date=2023-10-14_261c594-dev/include/hyprland/src/version.h:2: note: it was later defined here
       >     2 | #define GIT_COMMIT_HASH    "261c594458fec8bc64136eebf7c7e4e5ab421907"
       >       |
       > ninja: build stopped: subcommand failed.

Build fails

I can't manage to build this plugin on current Hyprland version.

Hyprland version (Arch Linux Hyprland package):

Hyprland, built from branch v0.38.1-b at commit 360ede79d124ffdeebbe8401f1ac4bc0dbec2c91  (props: bump ver to 0.38.1).
Date: Sat Apr 6 14:24:13 2024
Tag: v0.38.1

Adding it with hyprpm:

hyprpm add https://github.com/horriblename/hyprgrass                                                                                                                                    0 (53.228s) < 23:02:49
✔ adding a new plugin repository from https://github.com/horriblename/hyprgrass
  MAKE SURE that you trust the authors. DO NOT install random plugins without verifying the code and author.
  Are you sure? [Y/n] 

 → Cloning https://github.com/horriblename/hyprgrass                                                                                                                                                              
✔ cloned                                                                                                                                                                                                          
✔ found hyprload manifest                                                                                                                                                                                         
✔ parsed manifest, found 1 plugins:                                                                                                                                                                               
 → hyprgrass by horriblename version 0.6.0                                                                                                                                                                        
✔ Hyprland headers OK                                                                                                                                                                                             
 → Building hyprgrass                                                                                                                                                                                             
✖ Plugin hyprgrass failed to build.                                                                                                                                                                               

✔ all plugins built                                                                                                                                                                                               
✔ installed repository                                                                                                                                                                                            
✔ you can now enable the plugin(s) with hyprpm enable                                                                                                                                                             
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  5 / 5  Done!    

installing manually, it gives this error on ninja -C build

ninja: Entering directory `build'
[11/13] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/hyprland/protocols -I/usr/include/hyprland/wlroots -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
../src/GestureManager.cpp: In member function ‘bool GestureManager::handleWorkspaceSwipe(GestureDirection)’:
../src/GestureManager.cpp:248:9: error: base operand of ‘->’ is not a pointer
  248 |         ->m_vRenderOffset.getConfig()
      |         ^~
../src/GestureManager.cpp:251:9: error: base operand of ‘->’ is not a pointer
  251 |         ->m_vRenderOffset.getConfig()
      |         ^~
[12/13] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
ninja: build stopped: subcommand failed.

Is this plugin only for the git version of Hyprland?

I installed & enabled using hyprpm:

~ ➜  hyprpm list
 → Repository hyprgrass:
  │ Plugin hyprgrass
  └─ enabled: true

And I reloaded the plugins with hyprpm reload -n.

However, when I run hyprctl systeminfo, the plugins section is empty and hyprctl plugin list gives me: no plugins loaded. Needless to say, whatever configuration I try in my Hyprland config, it does nothing.

So does this plugin only work in the latest git version of Hyprland? I'm using the package from the official Arch repository (not AUR).

workspace_swipe_edge = d is completely broken

So i tried to enable workspace_swipe_edge=d in a previous version of hyprland (unsure what) and it caused hyprland to crash whenever i would finish (lift up the finger) swiping, So i decided to update both hyprland and hyprgrass (Big mistake)

Now when i swipe from left to right, It visually shows the right animation.
But the moment i lift up my finger it throws me back to the original workspace

But when swiping from right to left, It initially starts at workspace 2 then swipes to workspace 1 (but also doesn't) ((does not really switch workspaces))

Though i have very rarely after fiddling with it for a while managed to swipe to the other workspace successfully like 1 out of 10 tries

Excuse the lack of a video, Github/My browser seems to think the file is corrupt.

Edit:
Forgot to mention but this only happens with the edge swipe, Normal gestures work fine.

Plugin only works for one swipe and then stops doing anything

When I launch a Hyprland session and load the plugin, I can do one workspace swipe that does about 80% of the animation and then the plugin just stops working.

Here is the log I could find :

[LOG] Starting a swipe from 2
[LOG] Set keyboard focus to surface 55b9e5a80960, with window name: Crashes and Bugs | Hyprland Wiki — Mozilla Firefox
[LOG] Ended swipe to the left
[LOG] Starting a swipe from 1
[LOG] Set keyboard focus to surface 55b9e5accca0, with window name: matt@hypr:~
[LOG] Ended swipe to the right
[LOG] Hyprland received signal 15
[LOG]  [PluginSystem] Plugin touch-gestures unloaded.

I then try to unload and load the plugin again but it still does nothing.

Mismatched versions

whenever i try to load hyprgrass on system start up it gives me the error version mismatch

swipe features don't work

after updating hyprland yesterday, all swipe, edge swipe and drag functions have stopped working.
this is probably related to the latest breaking changes in hyprland that are also breaking other plugins.

Plugin isn't correctly loading

After installing and enabling the plugin using hyprpm, the plugin appears to be loaded by hyprpm however running hyprctl plugin list shows that it isn't actually loaded, which results in gestures not registering

Output of hyprpm list:

 → Repository hyprland-plugins:
  │ Plugin borders-plus-plus
  └─ enabled: false
  │ Plugin csgo-vulkan-fix
  └─ enabled: false
  │ Plugin hyprbars
  └─ enabled: false
  │ Plugin hyprexpo
  └─ enabled: false
  │ Plugin hyprtrails
  └─ enabled: false
  │ Plugin hyprwinwrap
  └─ enabled: false
 → Repository hycov:
  │ Plugin hycov
  └─ enabled: false
 → Repository hyprgrass:
  │ Plugin hyprgrass
  └─ enabled: true

Output of hyprctl systeminfo:

no plugins loaded

~ 
❯ hyprctl systeminfo
Hyprland, built from branch main at commit 3529fbc6d4db298c4d50a39732e59ca38b463c9f  (compositor: fix getMonitorFromVector getting wrong monitor (6010)).
Date: Sat May 11 10:35:20 2024
Tag: v0.40.0-60-g3529fbc6, commits: 4666

flags: (if any)


System Information:
System name: Linux
Node name: thinkpad-l380-yoga
Release: 6.8.9-arch1-2
Version: #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) (prog-if 00 [VGA controller])
00:13.0 Non-VGA unclassified device [0000]: Intel Corporation Sunrise Point-LP Integrated Sensor Hub [8086:9d35] (rev 21)


os-release: NAME="EndeavourOS"
PRETTY_NAME="EndeavourOS"
ID="endeavouros"
ID_LIKE="arch"
BUILD_ID="2024.01.25"
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://endeavouros.com"
DOCUMENTATION_URL="https://discovery.endeavouros.com"
SUPPORT_URL="https://forum.endeavouros.com"
BUG_REPORT_URL="https://forum.endeavouros.com/c/general-system/endeavouros-installation"
PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2"
LOGO="endeavouros"


plugins:


Mouse Gestures Interact with the Active Window Weirdly

I set the example mouse binds to move/resize windows and when moving my terminal it thinks I'm click&dragging all over it but also moves the window as expected, resizing works fine. When using the move window with Firefox in Wayland mode it thinks I'm doing the pinch zoom and moves me around on the page while also moving the window as expected, resizing usually works fine but while writing this it made my mouse scroll the page to wherever I put it and I can't reproduce that. Other apps with pinch gestures (like Dolphin file manager) also have a similar reaction to Firefox, scaling a lot when moving around.
edit: "foot" terminal doesn't seem to have this issue, maybe it's just X11 apps being funky as they do

Here's my current hyprgrass config file with the comments removed if that's helpful

plugin:touch_gestures {
  sensitivity = 2.0
  long_press_delay = 400
}

bind = , edge:r:l, workspace, +1
bind = , edge:l:r, workspace, -1

bind = , edge:l:d, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , edge:l:u, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%

bind = , swipe:4:d, killactive

###
bindm = , longpress:2, movewindow
bindm = , longpress:3, resizewindow
###

bind = , edge:d:u, exec, $runner

bind = , edge:u:d, togglespecialworkspace, magic
bind = , swipe:3:u, movetoworkspace, special:magic
bind = , swipe:3:d, exec, ~/.config/hypr/scripts/dt_plugins_hyprgrass_mv-win-active-workspace.sh

Video of what I mean

2024-01-24.09-35-40.mp4

Building without NixOS or nix

It would be nice to have instructions or clarifications on how to compile and use this plugin on a non NixOS system in the README.

Hyprland Crashes on single finger touch and edge swipe

I tried the gestures and sometimes Hyprland crashes, but Hyprland crashes every time if its just a single touch interaction (aka touching something on screen), also happens on edge swipe.

Here I have attached the crash log, from just using the touch screen normally (single finger touch), if that helps:
hyprlandCrashReport9655.txt

Config:

plugin {
    touch_gestures {
      sensitivity = 4.0
      workspace_swipe_fingers = 4
    }
}

bind =,edge:d:u,exec,/usr/bin/kill -s 34 $(pidof wvkbd-mobintl) #crashes
bind =,swipe:3:u,exec,/usr/bin/notify-send hi                   #works
bind =,edge:u:d,exec,$term --class dropdownterm                 #crashes

I have not looked into this in any detail and won't be able to look at it, but I wanted to report this here (maybe others have the same experience).

Also thank you for creating this plugin to bringing gesture support to Hyprland.

resize / move window with touch

is there a way to resize window borders, or move floating windows using touch?
i couldn't find any way to bind "finger" like a mouse button.

i would like to have the option to switch windows to floating with a 4-finger tap on that window if possible.

Flake is broken

So I installed hyprgrass on nixos with the method described in the readme by using the flake. It all worked until today, when I did a nix flake update. Now a rebuild results in this

building the system configuration...
warning: Git tree '/home/lukas/.config/nixos' is dirty
error: builder for '/nix/store/2i2m464mrrr622bdg7l1pskkh69d1v4x-hyprgrass-0.5.0.drv' failed with exit code 1;
       last 10 log lines:
       >    13 |
       > /nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:34:10: error: 'list' in namespace 'std' does not name a template type
       >    34 |     std::list<CWLSurface> popupSurfaces;
       >       |          ^~~~
       > /nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:7:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
       >     6 | #include "../Window.hpp"
       >   +++ |+#include <list>
       >     7 | #include "Subsurface.hpp"
       > [10/12] Compiling C++ object src/gestures/test/test-gestures.p/test.cpp.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/2i2m464mrrr622bdg7l1pskkh69d1v4x-hyprgrass-0.5.0.drv'.
error: 1 dependencies of derivation '/nix/store/rzx7vlar8qlx073wgbmx512kz9qx8y4m-hm_hyprhyprland.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p2gii5156zj58hysh74swqp4nrc01jnz-activation-script.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zd8rxsca7y9dp1k8p3g8w57vad9chq38-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dgwks4j1p8iyi8cx9xjrslb261kjc01g-unit-home-manager-lukas.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/q2mff4dpkixhrz46ihl0sq58prfd3fjm-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2rl0vslrz7i0is18xpr4kwm38jvdk59g-etc.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-linux-6.1.68.drv-0': Directory not empty
error: 1 dependencies of derivation '/nix/store/v15zz4m6r6dccsimv2di0c0mzs0xsb90-nixos-system-lnix-24.05.20240228.9099616.drv' failed to build

When I run nix log /nix/store/2i2m464mrrr622bdg7l1pskkh69d1v4x-hyprgrass-0.5.0.drv i get this

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/79jr5ysx4i1q9fihy2bx761qkhadz5v8-ydqmwrbgb3q37kn8cml9q98chibcqx0s-source
source root is ydqmwrbgb3q37kn8cml9q98chibcqx0s-source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
mesonConfigurePhase flags: --prefix=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0 --libdir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/lib --libexecdir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/libexec --bindir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/bin --sbindir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/sbin --includedir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/include --mandir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/share/man --infodir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/share/info --localedir=/nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain
The Meson build system
Version: 1.3.2
Source dir: /build/ydqmwrbgb3q37kn8cml9q98chibcqx0s-source
Build dir: /build/ydqmwrbgb3q37kn8cml9q98chibcqx0s-source/build
Build type: native build
Project name: hyprgrass
Project version: 0.5.0
C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
C linker for the host machine: gcc ld.bfd 2.40
C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0")
C++ linker for the host machine: g++ ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -std=c++23: YES 
meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Found pkg-config: YES (/nix/store/492n7ylp2f9zn0k3vghv1snypgkzznc5-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency hyprland found: YES 0.36.0
Run-time dependency wftouch found: YES 0.0
Found CMake: /nix/store/paxnwg89pdx4car5fj84mmiprg952459-cmake-3.28.2/bin/cmake (3.28.2)
Run-time dependency doctest found: YES 2.4.11
Run-time dependency pixman-1 found: YES 0.43.2
Run-time dependency libdrm found: YES 2.4.120
Build targets in project: 3

hyprgrass 0.5.0

  User defined options
    auto_features: enabled
    bindir       : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/bin
    buildtype    : plain
    includedir   : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/include
    infodir      : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/share/info
    libdir       : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/lib
    libexecdir   : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/libexec
    localedir    : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/share/locale
    mandir       : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/share/man
    prefix       : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0
    sbindir      : /nix/store/4a3x9h9zjs7vxwki7znqqnrxm8nz9dci-hyprgrass-0.5.0/sbin
    wrap_mode    : nodownload

Found ninja-1.11.1 at /nix/store/3dj1s1bhxanq3f0nffwf786l71g1lcn6-ninja-1.11.1/bin/ninja
mesonConfigurePhase: enabled\ parallel\ building
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
build flags: -j16
[1/12] Compiling C++ object src/gestures/libgestures.a.p/Shared.cpp.o
[2/12] Compiling C++ object src/gestures/libgestures.a.p/DragGesture.cpp.o
[3/12] Compiling C++ object src/gestures/libgestures.a.p/CompletedGesture.cpp.o
[4/12] Compiling C++ object src/gestures/test/test-gestures.p/MockGestureManager.cpp.o
[5/12] Compiling C++ object src/gestures/libgestures.a.p/Actions.cpp.o
[6/12] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
[7/12] Linking static target src/gestures/libgestures.a
[8/12] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o 
g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/mvp62404rbjjx1yckll93r11jlkn8k0j-wf-touch-git-dev/include -I/nix/store/ijqlfizb1y3hhgddcxn0dczw59prnab9-glm-0.9.9.8/include -I/nix/store/mk3hpjywv0hkkn2bwplcb9lwvzsv2j0i-pixman-0.43.2/include/pixman-1 -I/nix/store/sg7sijswn5a2mb9ycjbir22mrbgib70n-libdrm-2.4.120-dev/include -I/nix/store/sg7sijswn5a2mb9ycjbir22mrbgib70n-libdrm-2.4.120-dev/include/libdrm -I/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include -I/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/protocols -I/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
In file included from /nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:6,
                 from /nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/Monitor.hpp:5,
                 from ../src/GestureManager.hpp:6,
                 from ../src/GestureManager.cpp:1:
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/Window.hpp:213:10: error: 'list' in namespace 'std' does not name a template type
  213 |     std::list<CWLSurface> m_lPopupSurfaces;
      |          ^~~~
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/Window.hpp:13:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
   12 | #include "managers/XWaylandManager.hpp"
  +++ |+#include <list>
   13 | 
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:34:10: error: 'list' in namespace 'std' does not name a template type
   34 |     std::list<CWLSurface> popupSurfaces;
      |          ^~~~
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:7:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
    6 | #include "../Window.hpp"
  +++ |+#include <list>
    7 | #include "Subsurface.hpp"
[9/12] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
FAILED: src/libhyprgrass.so.p/main.cpp.o 
g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/mvp62404rbjjx1yckll93r11jlkn8k0j-wf-touch-git-dev/include -I/nix/store/ijqlfizb1y3hhgddcxn0dczw59prnab9-glm-0.9.9.8/include -I/nix/store/mk3hpjywv0hkkn2bwplcb9lwvzsv2j0i-pixman-0.43.2/include/pixman-1 -I/nix/store/sg7sijswn5a2mb9ycjbir22mrbgib70n-libdrm-2.4.120-dev/include -I/nix/store/sg7sijswn5a2mb9ycjbir22mrbgib70n-libdrm-2.4.120-dev/include/libdrm -I/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include -I/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/protocols -I/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
In file included from /nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:6,
                 from /nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/Monitor.hpp:5,
                 from ../src/GestureManager.hpp:6,
                 from ../src/main.cpp:1:
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/Window.hpp:213:10: error: 'list' in namespace 'std' does not name a template type
  213 |     std::list<CWLSurface> m_lPopupSurfaces;
      |          ^~~~
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/Window.hpp:13:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
   12 | #include "managers/XWaylandManager.hpp"
  +++ |+#include <list>
   13 | 
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:34:10: error: 'list' in namespace 'std' does not name a template type
   34 |     std::list<CWLSurface> popupSurfaces;
      |          ^~~~
/nix/store/88rzywvnqhjz19010z1kwmrwibcahfjh-hyprland-0.36.0+date=2024-02-29_4bff762-dev/include/hyprland/src/helpers/WLClasses.hpp:7:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
    6 | #include "../Window.hpp"
  +++ |+#include <list>
    7 | #include "Subsurface.hpp"
[10/12] Compiling C++ object src/gestures/test/test-gestures.p/test.cpp.o
ninja: build stopped: subcommand failed.

Swiping up from bottom edge not working

I want to bring up a dock when I swipe up from the bottom, however using edge:d:u does not work while edge swipes from other directions like the top work. This can be seen in the video provided, not sure if there are any logs that are produced by hyprgrass but I can provide them if there are any.

2024-05-17.22-24-54.mp4

Hyprgrass failing to build on arch linux.

I'm using x86_64 Arch Linux, and I have all necessary dependencies installs (yes, glm) but on build, your code throws a stdandard library error:

[1/13] Compiling C++ object src/gestures/libgestures.a.p/Shared.cpp.o
[2/13] Compiling C++ object src/gestures/libgestures.a.p/DragGesture.cpp.o
[3/13] Compiling C++ object src/gestures/libgestures.a.p/CompletedGesture.cpp.o
[4/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_math.cpp.o
[5/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_touch.cpp.o
[6/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_actions.cpp.o
[7/13] Linking static target subprojects/wf-touch/libwftouch.a
[8/13] Compiling C++ object src/gestures/libgestures.a.p/Actions.cpp.o
[9/13] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
[10/13] Linking static target src/gestures/libgestures.a
[11/13] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
FAILED: src/libhyprgrass.so.p/main.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/protocols -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/wlroots -I/home/ezntek/.local/share/hyprpm/headersRoot/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
../src/main.cpp: In function ‘PLUGIN_DESCRIPTION_INFO pluginInit(void*)’:
../src/main.cpp:48:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’
   48 |                                 Hyprlang::CConfigValue((Hyprlang::INT)3));
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/globals.hpp:3,
                 from ../src/GestureManager.hpp:4,
                 from ../src/main.cpp:1:
/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’
  115 |     APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value);
      |                                                                         ~~~~~~~~~~~~~~~~~~~~^~~~~
../src/main.cpp:50:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’
   50 |                                 Hyprlang::CConfigValue((Hyprlang::STRING) "d"));
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’
  115 |     APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value);
      |                                                                         ~~~~~~~~~~~~~~~~~~~~^~~~~
../src/main.cpp:52:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’
   52 |                                 Hyprlang::CConfigValue((Hyprlang::FLOAT)1.0));
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’
  115 |     APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value);
      |                                                                         ~~~~~~~~~~~~~~~~~~~~^~~~~
../src/main.cpp:54:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’
   54 |                                 Hyprlang::CConfigValue((Hyprlang::INT)400));
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’
  115 |     APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value);
      |                                                                         ~~~~~~~~~~~~~~~~~~~~^~~~~
../src/main.cpp:56:43: error: invalid initialization of reference of type ‘const SConfigValue&’ from expression of type ‘Hyprlang::CConfigValue’
   56 |                                 Hyprlang::CConfigValue((Hyprlang::INT)0));
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:115:93: note: in passing argument 3 of ‘bool HyprlandAPI::addConfigValue(void*, const std::string&, const SConfigValue&)’
  115 |     APICALL bool addConfigValue(HANDLE handle, const std::string& name, const SConfigValue& value);
      |                                                                         ~~~~~~~~~~~~~~~~~~~~^~~~~
[12/13] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/protocols -I/home/ezntek/.local/share/hyprpm/headersRoot/include/hyprland/wlroots -I/home/ezntek/.local/share/hyprpm/headersRoot/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
../src/GestureManager.cpp: In constructor ‘GestureManager::GestureManager()’:
../src/GestureManager.cpp:28:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
   28 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp:31:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
   31 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeBegin(uint32_t)’:
../src/GestureManager.cpp:48:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
   48 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeUpdate(uint32_t)’:
../src/GestureManager.cpp:67:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
   67 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘virtual bool GestureManager::handleDragGesture(const DragGesture&)’:
../src/GestureManager.cpp:96:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
   96 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp:99:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
   99 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp:102:76: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(<brace-enclosed initializer list>)’
  102 |     auto const workspace_swipe_edge_str = std::string{*WORKSPACE_SWIPE_EDGE};
      |                                                                            ^
In file included from /usr/include/c++/13.2.1/string:54,
                 from ../src/./gestures/Shared.hpp:3,
                 from ../src/./gestures/CompletedGesture.hpp:2,
                 from ../src/./gestures/Gestures.hpp:3,
                 from ../src/GestureManager.hpp:2,
                 from ../src/GestureManager.cpp:1:
/usr/include/c++/13.2.1/bits/basic_string.h:783:9: note: candidate: ‘template<class _Tp, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  783 |         basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
      |         ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:783:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13.2.1/bits/basic_string.h:771:9: note: candidate: ‘template<class _Tp, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  771 |         basic_string(const _Tp& __t, size_type __pos, size_type __n,
      |         ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:771:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13.2.1/bits/basic_string.h:748:9: note: candidate: ‘template<class _InputIterator, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  748 |         basic_string(_InputIterator __beg, _InputIterator __end,
      |         ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:748:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13.2.1/bits/basic_string.h:654:7: note: candidate: ‘template<class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  654 |       basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:654:7: note:   template argument deduction/substitution failed:
/usr/include/c++/13.2.1/bits/basic_string.h:631:7: note: candidate: ‘template<class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  631 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:631:7: note:   template argument deduction/substitution failed:
/usr/include/c++/13.2.1/bits/basic_string.h:705:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  705 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:705:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:700:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  700 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:700:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:695:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  695 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:695:7: note:   conversion of argument 1 would be ill-formed:
/usr/include/c++/13.2.1/bits/basic_string.h:667:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  667 |       basic_string(basic_string&& __str) noexcept
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:667:7: note:   conversion of argument 1 would be ill-formed:
/usr/include/c++/13.2.1/bits/basic_string.h:609:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  609 |       basic_string(const _CharT* __s, size_type __n,
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:609:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:589:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  589 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:589:7: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:571:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  571 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:571:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:554:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  554 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:554:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:537:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  537 |       basic_string(const basic_string& __str)
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:537:7: note:   conversion of argument 1 would be ill-formed:
/usr/include/c++/13.2.1/bits/basic_string.h:525:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  525 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:525:7: note:   conversion of argument 1 would be ill-formed:
/usr/include/c++/13.2.1/bits/basic_string.h:512:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  512 |       basic_string()
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:512:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/13.2.1/bits/basic_string.h:176:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(__sv_wrapper, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  176 |       basic_string(__sv_wrapper __svw, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13.2.1/bits/basic_string.h:176:7: note:   candidate expects 2 arguments, 1 provided
../src/GestureManager.cpp: In member function ‘virtual void GestureManager::sendCancelEventsToWindows()’:
../src/GestureManager.cpp:244:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
  244 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘bool GestureManager::onTouchDown(wlr_touch_down_event*)’:
../src/GestureManager.cpp:262:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
  262 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘bool GestureManager::onTouchUp(wlr_touch_up_event*)’:
../src/GestureManager.cpp:308:15: error: ‘struct SConfigValue’ has no member named ‘getDataStaticPtr’
  308 |             ->getDataStaticPtr();
      |               ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp:327:50: warning: control reaches end of non-void function [-Wreturn-type]
  327 |     const auto BLOCK = IGestureManager::onTouchUp(gesture_event);
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

hyprpm requires meson and ninja

hyprpm uses meson and ninja to build the package. Nevertheless, if meson is not present, it reports error like below. The problem can be easily diagnosed with --verbose in the add hyprpm command. I was wondering if i would be better to include this information in the install via hyprpm part.

2024-01-18T11:13:11,313794068+08:00

Workspace swipe rework

Some time ago Hyprland added touch gestures for workspace swipe, so now we can use the slightly less hacky internal APIs for our own.

  • The new workspace swipe should be implemented using: g_pInputManager->beginWorkspaceSwipe, updateWorkspaceSwipe and endWorkspaceSwipe. These are private methods so the following hack needs to be used:
#define private public
#include <hyprland/src/...>
#undef private

(even the official hyprexpo plugin does this so don't think about it)

Fails to build on latest Hyprland commit

Since this PR, hyprgrass fails to build

hyprgrass> The Meson build system
hyprgrass> Version: 1.2.1
hyprgrass> Source dir: /build/l1lfc7xh3m34b0r347gkm13zq96pw3d3-source
hyprgrass> Build dir: /build/l1lfc7xh3m34b0r347gkm13zq96pw3d3-source/build
hyprgrass> Build type: native build
hyprgrass> Project name: hyprgrass
hyprgrass> Project version: 0.0.1
hyprgrass> C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
hyprgrass> C linker for the host machine: gcc ld.bfd 2.40
hyprgrass> C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0")
hyprgrass> C++ linker for the host machine: g++ ld.bfd 2.40
hyprgrass> Host machine cpu family: x86_64
hyprgrass> Host machine cpu: x86_64
hyprgrass> Compiler for C++ supports arguments -std=c++23: YES
hyprgrass> meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
hyprgrass> Found pkg-config: /nix/store/ifr6srqgpvygd5vp14748d109ri31isv-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
hyprgrass> Run-time dependency hyprland found: YES 0.31.0
hyprgrass> Run-time dependency wftouch found: YES 0.0
hyprgrass> Run-time dependency pixman-1 found: YES 0.42.2
hyprgrass> Run-time dependency libdrm found: YES 2.4.116
hyprgrass> Build targets in project: 2
hyprgrass>
hyprgrass> hyprgrass 0.0.1
hyprgrass>
hyprgrass>   User defined options
hyprgrass>     auto_features: enabled
hyprgrass>     bindir       : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/bin
hyprgrass>     buildtype    : plain
hyprgrass>     includedir   : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/include
hyprgrass>     infodir      : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/share/info
hyprgrass>     libdir       : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/lib
hyprgrass>     libexecdir   : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/libexec
hyprgrass>     localedir    : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/share/locale
hyprgrass>     mandir       : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/share/man
hyprgrass>     prefix       : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0
hyprgrass>     sbindir      : /nix/store/wrlr3k4xrrbz276xll1ygz4c7cq3kgk3-hyprgrass-0.3.0/sbin
hyprgrass>     wrap_mode    : nodownload
hyprgrass>
hyprgrass> Found ninja-1.11.1 at /nix/store/jyk3j4632ldxsikjq0syjlj16i12jfsx-ninja-1.11.1/bin/ninja
hyprgrass> meson: enabled parallel building
hyprgrass> meson: enabled parallel installing
hyprgrass> building
hyprgrass> build flags: -j16
hyprgrass> [1/5] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
hyprgrass> [2/5] Linking static target src/gestures/libgestures.a
hyprgrass> [3/5] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
hyprgrass> FAILED: src/libhyprgrass.so.p/main.cpp.o
hyprgrass> g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/spmknpsimm569zylik2d476mibjgycdh-wf-touch-git-dev/include -I/nix/store/1ml7l4qxmlpj131947j502k6jxnvc3ni-glm-0.9.9.8/include -I/nix/store/ln5nawph2b93bdmwn6mkm1ssskf83cz2-pixman-0.42.2/include/pixman-1 -I/nix/store/rf863vb01j35ki1jgvhdhjma0vixdajl-libdrm-2.4.116-dev/include -I/nix/store/rf863vb01j35ki1jgvhdhjma0vixdajl-libdrm-2.4.116-dev/include/libdrm -I/nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include -I/nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/protocols -I/nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
hyprgrass> In file included from /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/plugins/PluginAPI.hpp:25,
hyprgrass>                  from ../src/globals.hpp:3,
hyprgrass>                  from ../src/GestureManager.hpp:3,
hyprgrass>                  from ../src/main.cpp:1:
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:32:5: error: 'Vector2D' does not name a type
hyprgrass>    32 |     Vector2D topLeft;
hyprgrass>       |     ^~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:33:5: error: 'Vector2D' does not name a type
hyprgrass>    33 |     Vector2D bottomRight;
hyprgrass>       |     ^~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp: In member function 'SWindowDecorationExtents SWindowDecorationExtents::operator*(const double&) const':
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:37:41: error: 'topLeft' was not declared in this scope
hyprgrass>    37 |         return SWindowDecorationExtents{topLeft * scale, bottomRight * scale};
hyprgrass>       |                                         ^~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:37:58: error: 'bottomRight' was not declared in this scope
hyprgrass>    37 |         return SWindowDecorationExtents{topLeft * scale, bottomRight * scale};
hyprgrass>       |                                                          ^~~~~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp: In member function 'SWindowDecorationExtents SWindowDecorationExtents::floor()':
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:17: error: 'topLeft' was not declared in this scope
hyprgrass>    41 |         return {topLeft.floor(), bottomRight.floor()};
hyprgrass>       |                 ^~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:34: error: 'bottomRight' was not declared in this scope
hyprgrass>    41 |         return {topLeft.floor(), bottomRight.floor()};
hyprgrass>       |                                  ^~~~~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:53: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'SWindowDecorationExtents'
hyprgrass>    41 |         return {topLeft.floor(), bottomRight.floor()};
hyprgrass>       |                                                     ^
hyprgrass>       |                                                     |
hyprgrass>       |                                                     <brace-enclosed initializer list>
hyprgrass> [4/5] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
hyprgrass> FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o
hyprgrass> g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/spmknpsimm569zylik2d476mibjgycdh-wf-touch-git-dev/include -I/nix/store/1ml7l4qxmlpj131947j502k6jxnvc3ni-glm-0.9.9.8/include -I/nix/store/ln5nawph2b93bdmwn6mkm1ssskf83cz2-pixman-0.42.2/include/pixman-1 -I/nix/store/rf863vb01j35ki1jgvhdhjma0vixdajl-libdrm-2.4.116-dev/include -I/nix/store/rf863vb01j35ki1jgvhdhjma0vixdajl-libdrm-2.4.116-dev/include/libdrm -I/nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include -I/nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/protocols -I/nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
hyprgrass> In file included from /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/plugins/PluginAPI.hpp:25,
hyprgrass>                  from ../src/globals.hpp:3,
hyprgrass>                  from ../src/GestureManager.hpp:3,
hyprgrass>                  from ../src/GestureManager.cpp:1:
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:32:5: error: 'Vector2D' does not name a type
hyprgrass>    32 |     Vector2D topLeft;
hyprgrass>       |     ^~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:33:5: error: 'Vector2D' does not name a type
hyprgrass>    33 |     Vector2D bottomRight;
hyprgrass>       |     ^~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp: In member function 'SWindowDecorationExtents SWindowDecorationExtents::operator*(const double&) const':
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:37:41: error: 'topLeft' was not declared in this scope
hyprgrass>    37 |         return SWindowDecorationExtents{topLeft * scale, bottomRight * scale};
hyprgrass>       |                                         ^~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:37:58: error: 'bottomRight' was not declared in this scope
hyprgrass>    37 |         return SWindowDecorationExtents{topLeft * scale, bottomRight * scale};
hyprgrass>       |                                                          ^~~~~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp: In member function 'SWindowDecorationExtents SWindowDecorationExtents::floor()':
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:17: error: 'topLeft' was not declared in this scope
hyprgrass>    41 |         return {topLeft.floor(), bottomRight.floor()};
hyprgrass>       |                 ^~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:34: error: 'bottomRight' was not declared in this scope
hyprgrass>    41 |         return {topLeft.floor(), bottomRight.floor()};
hyprgrass>       |                                  ^~~~~~~~~~~
hyprgrass> /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:53: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'SWindowDecorationExtents'
hyprgrass>    41 |         return {topLeft.floor(), bottomRight.floor()};
hyprgrass>       |                                                     ^
hyprgrass>       |                                                     |
hyprgrass>       |                                                     <brace-enclosed initializer list>
hyprgrass> ninja: build stopped: subcommand failed.
error: builder for '/nix/store/m3xsdwivh6wk11kkmcvh2r3c0428d7jn-hyprgrass-0.3.0.drv' failed with exit code 1;
       last 10 log lines:
       >       |                 ^~~~~~~
       > /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:34: error: 'bottomRight' was not declared in this scope
       >    41 |         return {topLeft.floor(), bottomRight.floor()};
       >       |                                  ^~~~~~~~~~~
       > /nix/store/armhmi9vq49w2zhc8bs2x8648l1daqlp-hyprland-0.31.0+date=2023-11-04_55b4f84-dev/include/hyprland/src/SharedDefs.hpp:41:53: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'SWindowDecorationExtents'
       >    41 |         return {topLeft.floor(), bottomRight.floor()};
       >       |                                                     ^
       >       |                                                     |
       >       |                                                     <brace-enclosed initializer list>
       > ninja: build stopped: subcommand failed.

Touch Gestures are not be Working

​​  ​​ ​コンピューター
┌──────────────────────────────────────────┐
​ ​​  OS : Arch Linux x86_64
​​ ​  Kernel : 6.8.4-arch1-1
​​ ​  Packages : 1349 (pacman), 48 (flatpak)
​​ ​  Resolution : 1920x1080
​​ ​  DE : Hyprland
​​ ​  Terminal : kitty
└──────────────────────────────────────────┘

                                           ​​ ​​​  : goof@Trashcan 
                                          ┌──────────────────────────────────────────┐ 
                                           ​​ ​  CPU : Intel i7-8700 (12) @ 4.600GHz 
                                           ​​ ​  GPU : AMD ATI Radeon 540/540X/550/550X / RX 540X/550/550X 
                                           ​​ ​  GPU : AMD ATI Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT 
                                           ​​ ​  GPU Driver : amdgpu 
                                           ​​ ​ ﬙ Memory : 3734MiB / 31911MiB 
                                          └──────────────────────────────────────────┘ 

Input device : Magic trackpad

I have made the following configs
hyprpm list
→ Repository hyprgrass:
│ Plugin hyprgrass
└─ enabled: true

~/.config/hypr/hyprland.conf

plugin:touch_gestures {
  # The default sensitivity is probably too low on tablet screens,
  # I recommend turning it up to 4.0
  sensitivity = 1.0

  # must be >= 3
  workspace_swipe_fingers = 3

  # switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
  # and can be used at the same time
  # possible values: l, r, u, or d
  # to disable it set it to anything else
  workspace_swipe_edge = d

  # in milliseconds
  long_press_delay = 400


}

then


# swipe left from right edge
bind = , edge:r:l, workspace, +1

# swipe up from bottom edge
bind = , edge:d:u, exec, firefox

# swipe down from left edge
bind = , edge:l:d, exec, pactl set-sink-volume @DEFAULT_SINK@ -4%

# swipe down with 4 fingers
# NOTE: swipe events only trigger for finger count of >= 3
bind = , swipe:4:d, killactive

# swipe diagonally left and down with 3 fingers
# l (or r) must come before d and u
bind = , swipe:3:ld, exec, foot

# tap with 3 fingers
# NOTE: tap events only trigger for finger count of >= 3
bind = , tap:3, exec, foot

# longpress can trigger mouse binds:
bindm = , longpress:2, movewindow
bindm = , longpress:3, resizewindow

any help would be great the docs are well made but I'm still haveing trouble.

Plugin doesn't work

Any gestures from this plugin don't do anything, while Hyprland's edge swipes (workspace_swipe_touch) work.

Workspace swipes definitely used to work (a week ago, perhaps), though I haven't tried the old commit yet to check.

Using NixOS unstable with flakes (full config).

Relevant configuration with additional binds for testing:

# Touchscreen
wayland.windowManager.hyprland = {
  plugins = with inputs; [
    hyprgrass.packages.${pkgs.system}.default
  ];
  settings = {
    debug = {
      disable_logs = false;
    };
    device = [
      {
        name = "goodix-capacitive-touchscreen-1";
        transform = "3";
      }
    ];
    gestures = {
      workspace_swipe = true;
      workspace_swipe_touch = true;
      workspace_swipe_cancel_ratio = 0.15;
    };
    plugin = {
      touch_gestures = {
        sensitivity = 4.0;
        workspace_swipe_edge = "false";
      };
    };
    bind = [
      ", edge:d:u, exec, firefox"
      ", swipe:4:d, killactive"
    ];
    bindm = [ ", longpress:2, movewindow" ];
  };
};

Output of hyprctl plugin list:

Plugin hyprgrass by horriblename:
	Handle: 311b840
	Version: 0.6
	Description: Touchscreen gestures

When executing a gesture, the log contains the following lines:

[wlr] [types/seat/wlr_seat_touch.c:189] could not create touch point

Can't get the plugin to work

I'm running arch, tried hyprland, hyprland-git and building hyprland from source, every time tried to install this plugin with hyprpm and by building from source and loading manually. And it is never working. The only gestures that do work are default hyprland workspace_swipe gestures. Can you help me?
hyprland.conf.txt

[Question] 3 finger drag/select?

Hello! Thank you so much for creating this amazing open-source plugin!

I've been experimenting with it, and I wanted to add MacOS like three-finger select/drag functionality.
Is that possible with this plugin? If so, Is there any documentation showing that how can it be done?

Thank you!

Misaligned mouse gestures

When moving a window with 3-finger longpress, the window doesn't appear under my fingers as I would expect and instead appears in a corner and sometimes off the screen. In the video below, I am longpressing on the middle of the terminal window I'm trying to move and have to drag the window to the edges of my display to move them which means that I can't grab the window from the bottom as well as being generally very unintuitive.

2024-05-17.19-45-39.mp4

My config:

plugin:touch_gestures {
  # The default sensitivity is probably too low on tablet screens,
  # I recommend turning it up to 4.0
  sensitivity = 1.0

  # must be >= 3
  workspace_swipe_fingers = 3

  # switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
  # and can be used at the same time
  # possible values: l, r, u, or d
  # to disable it set it to anything else
  workspace_swipe_edge = d

  # in milliseconds
  long_press_delay = 400

  experimental {
    # send proper cancel events to windows instead of hacky touch_up events,
    # NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
    send_cancel = 0
  }
}

# longpress can trigger mouse binds:
bindm = , longpress:3, movewindow

possible to make it play nice with hyprexpo?

Hello,

first of all, thanks for the good work. I opened the issue because using the new hyprland-plugins plugin hyprexpo doesn't behave well when I try to have it activated using this plugin:

bind = , swipe:4:u, hyprexpo:expo, on

I opened it here because the bug seems to be that the "touch" event is registered immediately before the animation is finished, which makes it switch to a workspace immediately without doing the expo. To my very limited knowledge, it looks like the workspace switching would have the same problem if it wasn't handled in some way by your plugin, so I thought it might be possible to do the same here. If not, I can open the issue at hyprland-plugins.

Thanks.

incorrect position mapping with multiple touch screens

when grabbing a window (with a 3-finger longpress) if the window is on a secondary display it will get teleported to the main display at the same x/y location.
i can still move it around in the mapped area and it follows the finger positions from screen 2 to screen 1.

grabbing windows on the primary screen works as intended.

Crash on send cancel to koreader(xwayland)

crashes on sending cancel events to xwayland surfaces

crash log
--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Sorry, didn't mean to...

Hyprland received signal 11 (Segmentation fault)

Version: e4bcd2e2da3136fb55886c4f02dd4a01099e687b
Tag: 

Hyprland seems to be running with plugins. This crash might not be Hyprland's fault.
Plugins:
	hyprgrass (horriblename) 0.2


System info:
	System name: Linux
	Node name: fedora.fritz.box
	Release: 6.3.6-2.surface.fc38.x86_64
	Version: #1 SMP PREEMPT_DYNAMIC Fri Jun  9 17:33:07 UTC 2023

GPU:
	00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b) (prog-if 00 [VGA controller])


os-release:
	NAME="Fedora Linux"
	VERSION="38 (Workstation Edition)"
	ID=fedora
	VERSION_ID=38
	VERSION_CODENAME=""
	PLATFORM_ID="platform:f38"
	PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
	ANSI_COLOR="0;38;2;60;110;180"
	LOGO=fedora-logo-icon
	CPE_NAME="cpe:/o:fedoraproject:fedora:38"
	DEFAULT_HOSTNAME="fedora"
	HOME_URL="https://fedoraproject.org/"
	DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
	SUPPORT_URL="https://ask.fedoraproject.org/"
	BUG_REPORT_URL="https://bugzilla.redhat.com/"
	REDHAT_BUGZILLA_PRODUCT="Fedora"
	REDHAT_BUGZILLA_PRODUCT_VERSION=38
	REDHAT_SUPPORT_PRODUCT="Fedora"
	REDHAT_SUPPORT_PRODUCT_VERSION=38
	SUPPORT_END=2024-05-14
	VARIANT="Workstation Edition"
	VARIANT_ID=workstation
	


Backtrace:
	#0 | /home/py/.nix-profile/bin/Hyprland(_Z12getBacktracev+0x48) [0x560048]
		_Z12getBacktracev
		??:?
	#1 | /home/py/.nix-profile/bin/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x59f) [0x51d25f]
		_ZN13CrashReporter18createAndSaveCrashEi
		??:?
	#2 | /home/py/.nix-profile/bin/Hyprland(_Z25handleUnrecoverableSignali+0x3f) [0x496bcf]
		_Z25handleUnrecoverableSignali
		??:?
	#3 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x38d30) [0x7f673ed72d30]
		??
		??:0
	#4 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_resource_get_client+0) [0x7f673fa6c680]
		??
		??:0
	#5 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(wlr_seat_touch_send_cancel+0xf) [0x7f673f9bda6f]
		??
		??:0
	#6 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(wlr_seat_touch_notify_cancel+0x1f) [0x7f673f9bd32f]
		??
		??:0
	#7 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN9CGestures25sendCancelEventsToWindowsEv+0x36) [0x7f673c0d9376]
		??
		??:0
	#8 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN21MultiFingerDownAction12update_stateERKN2wf5touch15gesture_state_tERKNS1_15gesture_event_tE+0x72) [0x7f673c0ea4a2]
		??
		??:0
	#9 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN2wf5touch9gesture_t12update_stateERKNS0_15gesture_event_tE+0x12b) [0x7f673c0ed14b]
		??
		??:0
	#10 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN15IGestureManager14updateGesturesERKN2wf5touch15gesture_event_tE+0x3f) [0x7f673c0ea8ff]
		??
		??:0
	#11 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN15IGestureManager11onTouchDownERKN2wf5touch15gesture_event_tE+0x20) [0x7f673c0ea9a0]
		??
		??:0
	#12 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN9CGestures11onTouchDownEP20wlr_touch_down_event+0x1d8) [0x7f673c0da2b8]
		??
		??:0
	#13 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_Z13hkOnTouchDownPvP20wlr_touch_down_event+0x1b) [0x7f673c0d48fb]
		??
		??:0
	#14 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7f673fa6da1c]
		??
		??:0
	#15 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7f673fa6da1c]
		??
		??:0
	#16 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(+0x609b9) [0x7f673f9a49b9]
		??
		??:0
	#17 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(+0x5df1b) [0x7f673f9a1f1b]
		??
		??:0
	#18 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f673fa6f8f2]
		??
		??:0
	#19 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7f673fa6d455]
		??
		??:0
	#20 | /home/py/.nix-profile/bin/Hyprland(main+0xb29) [0x484149]
		main
		??:?
	#21 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x23ace) [0x7f673ed5dace]
		??
		??:0
	#22 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(__libc_start_main+0x89) [0x7f673ed5db89]
		??
		??:0
	#23 | /home/py/.nix-profile/bin/Hyprland(_start+0x25) [0x496a35]
		_start
		??:?


Log tail:
[LOG] Cleanup: destroyed a layersurface
[LOG] LayerSurface 3d97040 unmapped
[LOG] Framebuffer created, status 36053
[LOG] Callback 3d5d050 -> 3d5d048, CWLSurface removed.
[LOG] CWLSurface 3d5d020 called destroy()
[LOG] Set keyboard focus to surface 3d438a0, with [Window 3d88c50: title: "foot"]
[LOG] LayerSurface 3d97040 destroyed
[LOG] Callback 3d5d208 -> 3d5d200, layerSurface removed.
[LOG] Callback 3d5d0d0 -> 3d5d0c8, layerSurface removed.
[LOG] Callback 3d5d138 -> 3d5d130, layerSurface removed.
[LOG] Callback 3d5d1a0 -> 3d5d198, layerSurface removed.
[LOG] Callback 3d5d270 -> 3d5d268, layerSurface removed.
[LOG] LayerSurface 2b0f6f0 arranged: x: 0 y: 0 w: 46 h: 847 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 2b97130 arranged: x: 0 y: 0 w: 1270 h: 847 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 2b97138 arranged: x: 0 y: 0 w: 1270 h: 847 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: [46.00000, 0.00000] [0.00000, 0.00000]
[wlr] [types/wlr_compositor.c:689] New wlr_surface 0x3d8a590 (res 0x3d8b130)
[wlr] [types/wlr_compositor.c:689] New wlr_surface 0x3d82260 (res 0x3d82610)
[wlr] [types/wlr_compositor.c:689] New wlr_surface 0x3ddc410 (res 0x3ddc7c0)
[LOG] Cleanup: destroyed a layersurface
[wlr] [types/wlr_server_decoration.c:104] new server_decoration 0x3d65410 (res 0x3125730)
[wlr] [types/xdg_shell/wlr_xdg_surface.c:390] new xdg_surface 0x3d8c990 (res 0x30ada30)
[LOG] New XDG Surface created. (class: org.gnome.Logs)
[LOG] Registered signal for owner 3d8cb20: 3ddc6f0 -> 3d8cb88 (owner: XDG Window)
[LOG] Registered signal for owner 3d8cb20: 3d8ca38 -> 3d8cc58 (owner: XDG Window)
[wlr] [types/wlr_xdg_activation_v1.c:112] Rejecting token commit request: serial 0 was never given to client
[wlr] [types/wlr_xdg_activation_v1.c:306] Rejecting activate request: unknown token
[LOG] Registered signal for owner 3d8cb20: 2aa64e0 -> 3d8d138 (owner: Toplevel)
[LOG] Registered signal for owner 3d8cb20: 2aa64f0 -> 3d8d1a0 (owner: Toplevel)
[LOG] Registered signal for owner 3d8cb20: 2aa6500 -> 3d8d0d0 (owner: Toplevel)
[LOG] Registered signal for owner 3d8d340: 3ddc720 -> 3d8d348 (owner: CWLSurface)
[LOG] CWLSurface 3d8d340 called init()
[LOG] Registered signal for owner 3d8cb20: 3ddc700 -> 3d8cbf0 (owner: CWindow)
[LOG] Searching for matching rules for org.gnome.Logs (title: Logs)
[LOG] OPENINGON: [Node 3d968c0: workspace: 1, pos: [46.00, 0.00], size: [1224.00, 847.00], window: 3d88c50], Monitor: 0
[LOG] Set keyboard focus to surface 3ddc410, with [Window 3d8cb20: title: "Logs"]
[LOG] Window got assigned a surfaceTreeNode 0
[LOG] Registered signal for owner 3d8cb20: 3ddc6e0 -> 3d8cb20 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807668 -> 3d8ccc0 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 3d8ca58 -> 3d8cdf8 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 28075f8 -> 3d8cf30 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807618 -> 3d8cec8 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807628 -> 3d8ce60 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807638 -> 3d8cf98 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807608 -> 3d8cd90 (owner: XDG Window Late)
[LOG] Registered signal for owner 2b215c0: 3ddc710 -> 2b21638 (owner: SurfaceTreeNode)
[LOG] Registered signal for owner 2b215c0: 3ddc6e0 -> 2b216a0 (owner: SurfaceTreeNode)
[LOG] Registered signal for owner 2b215c0: 3ddc720 -> 2b21708 (owner: SurfaceTreeNode)
[LOG] Creating a surfaceTree Root! [Window 3d8cb20: title: "Logs"]
[LOG] Map request dispatched, monitor eDP-1, window pos: [666.00000, 8.00000], window size: [596.00000, 831.00000]

Hyprland crashes on newest commit

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Who tried dividing by zero?!

Hyprland received signal 11 (Segmentation fault)

Version: 3f09b14381e8b28dd2cc1d292763374f2d6c8484
Tag: ?

Hyprland seems to be running with plugins. This crash might not be Hyprland's fault.
Plugins:
	 () 


System info:
	System name: Linux
	Node name: wim
	Release: 6.5.5
	Version: #1-NixOS SMP PREEMPT_DYNAMIC Sat Sep 23 09:14:39 UTC 2023

GPU:
	07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Barcelo [1002:15e7] (rev d1) (prog-if 00 [VGA controller])


os-release:
	BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
	BUILD_ID="23.11pre528952.6500b4580c2a"
	DOCUMENTATION_URL="https://nixos.org/learn.html"
	HOME_URL="https://nixos.org/"
	ID=nixos
	LOGO="nix-snowflake"
	NAME=NixOS
	PRETTY_NAME="NixOS 23.11 (Tapir)"
	SUPPORT_URL="https://nixos.org/community.html"
	VERSION="23.11 (Tapir)"
	VERSION_CODENAME=tapir
	VERSION_ID="23.11"
	


Backtrace:
	#0 | /etc/profiles/per-user/matt/bin/Hyprland(_Z12getBacktracev+0x48) [0x55bbd8]
		_Z12getBacktracev
		??:?
	#1 | /etc/profiles/per-user/matt/bin/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x59f) [0x5194af]
		_ZN13CrashReporter18createAndSaveCrashEi
		??:?
	#2 | /etc/profiles/per-user/matt/bin/Hyprland(_Z25handleUnrecoverableSignali+0x3f) [0x493eef]
		_Z25handleUnrecoverableSignali
		??:?
	#3 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x38d30) [0x7f932ef4dd30]
		??
		??:0
	#4 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x1530e0) [0x7f932f0680e0]
		??
		??:0
	#5 | /etc/profiles/per-user/matt/bin/Hyprland(_ZN13CFunctionHook4hookEv+0x1de) [0x5e8c4e]
		_ZN13CFunctionHook4hookEv
		??:?
	#6 | /nix/store/vgr7f3m01c3l2wv1zvg2r927singnswl-hyprgrass-0.3.0/lib/libhyprgrass.so(pluginInit+0x2be) [0x7f93200fe3fe]
		??
		??:0
	#7 | /etc/profiles/per-user/matt/bin/Hyprland(_ZN13CPluginSystem10loadPluginERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x985) [0x5f2a05]
		_ZN13CPluginSystem10loadPluginERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
		??:?
	#8 | /etc/profiles/per-user/matt/bin/Hyprland(_Z14dispatchPluginNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x156) [0x522166]
		_Z14dispatchPluginNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
		??:?
	#9 | /etc/profiles/per-user/matt/bin/Hyprland(_Z8getReplyNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x587) [0x529407]
		_Z8getReplyNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
		??:?
	#10 | /etc/profiles/per-user/matt/bin/Hyprland(_Z13hyprCtlFDTickijPv+0x166) [0x52a846]
		_Z13hyprCtlFDTickijPv
		??:?
	#11 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f932fbb88f2]
		??
		??:0
	#12 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7f932fbb6455]
		??
		??:0
	#13 | /etc/profiles/per-user/matt/bin/Hyprland(main+0x780) [0x4816e0]
		main
		??:?
	#14 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x23ace) [0x7f932ef38ace]
		??
		??:0
	#15 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(__libc_start_main+0x89) [0x7f932ef38b89]
		??
		??:0
	#16 | /etc/profiles/per-user/matt/bin/Hyprland(_start+0x25) [0x493d65]
		_start
		??:?


Log tail:
[LOG] Registered signal for owner 208ed30: 208ec70 -> 208ee00 (owner: CWindow)
[LOG] Searching for matching rules for Alacritty (title: Alacritty)
[LOG] OPENINGON: [Node 2029db0: workspace: 1, pos: [0.00, 0.00], size: [0.00, 0.00], window: 208ed30], Monitor: 0
[LOG] Set keyboard focus to surface 208e980, with [Window 208ed30: title: "Alacritty"]
[LOG] Window got assigned a surfaceTreeNode 0
[LOG] Registered signal for owner 208ed30: 208ec50 -> 208ed30 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 208c6e0 -> 208eed0 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 1fc1900 -> 208f008 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 208c670 -> 208f140 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 208c690 -> 208f0d8 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 208c6a0 -> 208f070 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 208c6b0 -> 208f1a8 (owner: XDG Window Late)
[LOG] Registered signal for owner 208ed30: 208c680 -> 208efa0 (owner: XDG Window Late)
[LOG] Registered signal for owner 1e390c0: 208ec80 -> 1e39138 (owner: SurfaceTreeNode)
[LOG] Registered signal for owner 1e390c0: 208ec50 -> 1e391a0 (owner: SurfaceTreeNode)
[LOG] Registered signal for owner 1e390c0: 208ec90 -> 1e39208 (owner: SurfaceTreeNode)
[LOG] Creating a surfaceTree Root! [Window 208ed30: title: "Alacritty"]
[LOG] Map request dispatched, monitor eDP-1, window pos: [7.00000, 57.00000], window size: [1906.00000, 1136.00000]
[LOG] Enable TextInput
[LOG] Framebuffer created, status 36053
[LOG] Searching for matching rules for thunderbird (title: - Mozilla Thunderbird)
[LOG] Window rule workspace special silent -> ^(thunderbird)$ matched [Window 208d4b0: title: "- Mozilla Thunderbird"]
[LOG] Window 208d4b0 set title to  - Mozilla Thunderbird
[LOG] Cleanup: destroyed a window
[LOG] Hiding the cursor (timeout)
[LOG] [hookSystem] New hook event registered: moveWindow
[LOG] Searching for matching rules for thunderbird (title:  - Mozilla Thunderbird)
[LOG] Window rule workspace special silent -> ^(thunderbird)$ matched [Window 208d4b0: title: " - Mozilla Thunderbird"]
[ERR] Orphaned Node [Node 20391a0: workspace: -99, pos: [0.00, 32.00], size: [1920.00, 1168.00], window: 2025d00]!!
[LOG] OPENINGON: [Node 2029db0: workspace: 1, pos: [0.00, 50.00], size: [1920.00, 1150.00], window: 208ed30], Monitor: 0
[ERR] Orphaned Node [Node 2039220: workspace: -98, pos: [0.00, 50.00], size: [1920.00, 1150.00], window: 208d4b0]!!
[LOG] Hyprctl: dispatcher movetoworkspacesilent : special:thunder,^(thunderbird)$
[LOG] Searching for matching rules for Spotify (title: Spotify)
[LOG] Window rule workspace special silent -> ^(Spotify)$ matched [Window 2025d00: title: "Spotify"]
[LOG] Removing last node (dwindle)
[LOG] OPENINGON: [Node 2029db0: workspace: 1, pos: [0.00, 50.00], size: [1920.00, 1150.00], window: 208ed30], Monitor: 0
[ERR] Orphaned Node [Node 20391a0: workspace: -97, pos: [0.00, 50.00], size: [1920.00, 1150.00], window: 2025d00]!!
[LOG] Hyprctl: dispatcher movetoworkspacesilent : special:spot,^(Spotify)$
[LOG] New XDG Surface created. (class: com.nextcloud.desktopclient.nextcloud)
[LOG] Registered signal for owner 20ad030: 20a8230 -> 20ad098 (owner: XDG Window)
[LOG] Registered signal for owner 20ad030: 202feb0 -> 20ad168 (owner: XDG Window)
[LOG] [Window 20ad030: title: "", class: ] destroyed, queueing.
[LOG] Callback 20ad0c0 -> 20ad0b8, XDG Window removed.
[LOG] Callback 20ad190 -> 20ad188, XDG Window removed.
[ERR] onWindowRemovedTiling node null?
[LOG] Unmapped [Window 20ad030: title: ""] removed instantly
[LOG] Showing the cursor (timeout)
[LOG] Searching for matching rules for Alacritty (title: Alacritty)
[LOG] Window 208ed30 set title to Alacritty
[LOG] [hookSystem] New hook event registered: mouseButton

Build fails on NixOS

[1/5] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o
g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/518ba5vj332la1af6nyc12j8ash59rwl-wf-touch-git-dev/include -I/nix/store/mhrvlcdplm5rnw7554pqxg05nxakgm46-glm-0.9.9.8/include -I/nix/store/il59v28gchkxs2xhn1llin96ci60y1zh-pixman-0.42.2/include/pixman-1 -I/nix/store/vlkhrqkf7scs3rr260w5cj58csn5vvf8-libdrm-2.4.115-dev/include -I/nix/store/vlkhrqkf7scs3rr260w5cj58csn5vvf8-libdrm-2.4.115-dev/include/libdrm -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/protocols -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
In file included from ../src/GestureManager.hpp:4,
                 from ../src/GestureManager.cpp:1:
/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/src/debug/Log.hpp:4:10: fatal error: format: No such file or directory
    4 | #include <format>
      |          ^~~~~~~~
compilation terminated.
[2/5] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
FAILED: src/libhyprgrass.so.p/main.cpp.o
g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/518ba5vj332la1af6nyc12j8ash59rwl-wf-touch-git-dev/include -I/nix/store/mhrvlcdplm5rnw7554pqxg05nxakgm46-glm-0.9.9.8/include -I/nix/store/il59v28gchkxs2xhn1llin96ci60y1zh-pixman-0.42.2/include/pixman-1 -I/nix/store/vlkhrqkf7scs3rr260w5cj58csn5vvf8-libdrm-2.4.115-dev/include -I/nix/store/vlkhrqkf7scs3rr260w5cj58csn5vvf8-libdrm-2.4.115-dev/include/libdrm -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/protocols -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
In file included from ../src/GestureManager.hpp:4,
                 from ../src/main.cpp:1:
/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/src/debug/Log.hpp:4:10: fatal error: format: No such file or directory
    4 | #include <format>
      |          ^~~~~~~~
compilation terminated.
[ 90%] Built target nvim
[ 90%] Generating doc/tags
[ 90%] Generating pack/dist/opt/matchit/doc/tags
[ 90%] Generating nvim.pot
[3/5] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
ninja: build stopped: subcommand failed.
error: builder for '/nix/store/1bgxk57dc5dxv869hlzjmi7k8y2g99k4-hyprgrass-0.3.0.drv' failed with exit code 1;
       last 10 log lines:
       > FAILED: src/libhyprgrass.so.p/main.cpp.o
       > g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/518ba5vj332la1af6nyc12j8ash59rwl-wf-touch-git-dev/include -I/nix/store/mhrvlcdplm5rnw7554pqxg05nxakgm46-glm-0.9.9.8/include -I/nix/store/il59v28gchkxs2xhn1llin96ci60y1zh-pixman-0.42.2/include/pixman-1 -I/nix/store/vlkhrqkf7scs3rr260w5cj58csn5vvf8-libdrm-2.4.115-dev/include -I/nix/store/vlkhrqkf7scs3rr260w5cj58csn5vvf8-libdrm-2.4.115-dev/include/libdrm -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/protocols -I/nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
       > In file included from ../src/GestureManager.hpp:4,
       >                  from ../src/main.cpp:1:
       > /nix/store/zns0kczk280c3hni52aiz6vpf7vj354d-hyprland-0.29.1+date=2023-09-09_1a6f961-dev/include/hyprland/src/debug/Log.hpp:4:10: fatal error: format: No such file or directory
       >     4 | #include <format>
       >       |          ^~~~~~~~
       > compilation terminated.
       > [3/5] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/1bgxk57dc5dxv869hlzjmi7k8y2g99k4-hyprgrass-0.3.0.drv'.
error: 1 dependencies of derivation '/nix/store/rhdx8sgiy1z39266ihmsinqndb6pd77k-hm_hyprhyprland.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dwcs4q0d7jy9jrgkhsy8bb3jad1gikx7-activation-script.drv' failed to build
error: 1 dependencies of derivation '/nix/store/kia82i1igaqqkii0mm7hwanq6gp4bpbw-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/asbmdjx4vnfyx16mizwk6l6pfvflphn0-unit-home-manager-matt.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j7wasq6a852jnpsbqmwmiljhhdg0xlsl-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/iy68g5lv0nff6zd4n2fmdn5ximxmsi48-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/45ml2asrfdyi5j8csp5wzr41c0a81k8v-nixos-system-wim-23.11pre519881.3efb0f6f404e.drv' failed to build

Cannot build hyprgrass on nixos unstable

I had hyprgrass installed and working correctly as recently as last week, but today I was updating my system again and I got this error message:

g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/ddm2gijvzba4bil3z35q515ap185jpsk-wf-touch-git-dev/include -I/nix/store/p624jarli65hvy4lx49l1ppv523ilfi3-glm-0.9.9.8/include -I/nix/store/aldmf9w7jiss99b93dfndd1nsb9s5qn7-pixman-0.43.4/include/pixman-1 -I/nix/store/bf9ay9lix3w9830i65a4pvwjznx3ggc5-libdrm-2.4.120-dev/include -I/nix/store/bf9ay9lix3w9830i65a4pvwjznx3ggc5-libdrm-2.4.120-dev/include/libdrm -I/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include -I/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include/hyprland/protocols -I/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
../src/GestureManager.cpp: In member function 'bool GestureManager::handleWorkspaceSwipe(GestureDirection)':
../src/GestureManager.cpp:247:91: error: cannot convert 'PHLWORKSPACE' {aka 'std::shared_ptr<CWorkspace>'} to 'const int&'
  247 |     const auto VERTANIMS = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace)
      |                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           PHLWORKSPACE {aka std::shared_ptr<CWorkspace>}
Full log:
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/lqbxf5fqky2zlp6jkpabsxr6pd58gk0r-b3zhff76y96rw90phzy3h88iw9zhrdpn-source
source root is b3zhff76y96rw90phzy3h88iw9zhrdpn-source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
mesonConfigurePhase flags: --prefix=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0 --libdir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/lib --libexecdir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/libexec --bindir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/bin --sbindir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/sbin --includedir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/include --mandir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/share/man --infodir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/share/info --localedir=/nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain
The Meson build system
Version: 1.3.2
Source dir: /build/b3zhff76y96rw90phzy3h88iw9zhrdpn-source
Build dir: /build/b3zhff76y96rw90phzy3h88iw9zhrdpn-source/build
Build type: native build
Project name: hyprgrass
Project version: 0.6.0
C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
C linker for the host machine: gcc ld.bfd 2.41
C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0")
C++ linker for the host machine: g++ ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -std=c++23: YES 
meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Found pkg-config: YES (/nix/store/zwkj99kd2dzccjvnclys91cvs5cg9cib-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency hyprland found: YES 0.38.0
Run-time dependency wftouch found: YES 0.0
Found CMake: /nix/store/17r6ld906midfv8y7997fd56s7a87vrg-cmake-3.28.3/bin/cmake (3.28.3)
Run-time dependency doctest found: YES 2.4.11
Run-time dependency pixman-1 found: YES 0.43.4
Run-time dependency libdrm found: YES 2.4.120
Build targets in project: 3

hyprgrass 0.6.0

  User defined options
    auto_features: enabled
    bindir       : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/bin
    buildtype    : plain
    includedir   : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/include
    infodir      : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/share/info
    libdir       : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/lib
    libexecdir   : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/libexec
    localedir    : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/share/locale
    mandir       : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/share/man
    prefix       : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0
    sbindir      : /nix/store/i8zzd2y5r0l5l4f8m9dgc8j62a5phqkh-hyprgrass-0.6.0/sbin
    wrap_mode    : nodownload

Found ninja-1.11.1 at /nix/store/sxkp17y5ilj8j2kabc6lh74d6v0mhpgq-ninja-1.11.1/bin/ninja
mesonConfigurePhase: enabled\ parallel\ building
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
build flags: -j24
[1/12] Compiling C++ object src/gestures/libgestures.a.p/Shared.cpp.o
[2/12] Compiling C++ object src/gestures/libgestures.a.p/DragGesture.cpp.o
[3/12] Compiling C++ object src/gestures/libgestures.a.p/CompletedGesture.cpp.o
[4/12] Compiling C++ object src/gestures/test/test-gestures.p/MockGestureManager.cpp.o
[5/12] Compiling C++ object src/gestures/libgestures.a.p/Actions.cpp.o
[6/12] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
[7/12] Linking static target src/gestures/libgestures.a
[8/12] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o 
g++ -Isrc/libhyprgrass.so.p -Isrc -I../src -I/nix/store/ddm2gijvzba4bil3z35q515ap185jpsk-wf-touch-git-dev/include -I/nix/store/p624jarli65hvy4lx49l1ppv523ilfi3-glm-0.9.9.8/include -I/nix/store/aldmf9w7jiss99b93dfndd1nsb9s5qn7-pixman-0.43.4/include/pixman-1 -I/nix/store/bf9ay9lix3w9830i65a4pvwjznx3ggc5-libdrm-2.4.120-dev/include -I/nix/store/bf9ay9lix3w9830i65a4pvwjznx3ggc5-libdrm-2.4.120-dev/include/libdrm -I/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include -I/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include/hyprland/protocols -I/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
../src/GestureManager.cpp: In member function 'bool GestureManager::handleWorkspaceSwipe(GestureDirection)':
../src/GestureManager.cpp:247:91: error: cannot convert 'PHLWORKSPACE' {aka 'std::shared_ptr<CWorkspace>'} to 'const int&'
  247 |     const auto VERTANIMS = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace)
      |                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           PHLWORKSPACE {aka std::shared_ptr<CWorkspace>}
In file included from /nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include/hyprland/src/managers/KeybindManager.hpp:5,
                 from ../src/GestureManager.hpp:8,
                 from ../src/GestureManager.cpp:1:
/nix/store/4173v1jzz279illgdjv5smih57r0y807-hyprland-0.38.0+date=2024-04-03_fbdaf74-dev/include/hyprland/src/Compositor.hpp:148:37: note:   initializing argument 1 of 'PHLWORKSPACE CCompositor::getWorkspaceByID(const int&)'
  148 |     PHLWORKSPACE   getWorkspaceByID(const int&);
      |                                     ^~~~~~~~~~
[9/12] Compiling C++ object src/gestures/test/test-gestures.p/test.cpp.o
[10/12] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
ninja: build stopped: subcommand failed.

Relevant parts of my nixos config are:

flake.nix in inputs:

# hyprland
hyprland = {
  url = "github:hyprwm/Hyprland";
};

hyprland-contrib = {
  url = "github:hyprwm/contrib";
};

hyprgrass = {
  url = "github:horriblename/hyprgrass";
  inputs.hyprland.follows = "hyprland";
};

Hyprland setup:

wayland.windowManager.hyprland = {
  enable = true;
  plugins = [
    hyprgrass.packages.${pkgs.system}.default
  ];
 # Other hyprland settings... omitted
};

Thanks in advance for your assistance!

Hyprgrass fails to build

OS: EndeavourOS
Hyprland Version: 0.40.0

Logs
[v] version returned: Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)


[v] parsed commit cba1ade848feac44b2eda677503900639581c3f4 at branch  on Sat May 4 15:42:32 2024, commits 4606

✔ Headers up to date.

 → checking for updates for hyprland-plugins                                                                                                                                                                         
 → Cloning https://github.com/hyprwm/hyprland-plugins                                                                                                                                                                
✔ repository hyprland-plugins is up-to-date.                                                                                                                                                                         
 → checking for updates for hyprgrass                                                                                                                                                                                
 → Cloning https://github.com/horriblename/hyprgrass                                                                                                                                                                 
 → Plugin has revision set, resetting: c3313dbbf64508118deb01e44ac2186d9b219285                                                                                                                                      
✔ repository hyprgrass has updates.                                                                                                                                                                                  
 → Building hyprgrass                                                                                                                                                                                                
✔ found hyprpm manifest                                                                                                                                                                                              
 → Building hyprgrass                                                                                                                                                                                                
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━  4 / 6  Updating hyprgrass[v] shell returned:  -> cd /tmp/hyprpm/fahmed && PKG_CONFIG_PATH="/home/fahmed/.local/share/hyprpm/headersRoot/share/pkgconfig" meson setup build
The Meson build system
Version: 1.4.0
Source dir: /tmp/hyprpm/fahmed
Build dir: /tmp/hyprpm/fahmed/build
Build type: native build
Project name: hyprgrass
Project version: 0.6.0
C compiler for the host machine: cc (gcc 14.1.1 "cc (GCC) 14.1.1 20240522")
C linker for the host machine: cc ld.bfd 2.42.0
C++ compiler for the host machine: c++ (gcc 14.1.1 "c++ (GCC) 14.1.1 20240522")
C++ linker for the host machine: c++ ld.bfd 2.42.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -std=c++23: YES 
meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.1
Run-time dependency hyprland found: YES 0.40.0
Found CMake: /usr/bin/cmake (3.29.3)
Run-time dependency wftouch found: NO (tried pkgconfig and cmake)

Executing subproject wf-touch 

wf-touch| Project name: wf-touch
wf-touch| Project version: 0.0
wf-touch| C++ compiler for the host machine: c++ (gcc 14.1.1 "c++ (GCC) 14.1.1 20240522")
wf-touch| C++ linker for the host machine: c++ ld.bfd 2.42.0
wf-touch| Run-time dependency glm found: YES 1.0.1
wf-touch| Run-time dependency doctest found: NO (tried pkgconfig and cmake)
wf-touch| Build targets in project: 1
wf-touch| Subproject wf-touch finished.

Run-time dependency doctest found: NO (tried pkgconfig and cmake)
Run-time dependency pixman-1 found: YES 0.43.4
Run-time dependency libdrm found: YES 2.4.120
Build targets in project: 3

hyprgrass 0.6.0

  Subprojects
    wf-touch: YES

Found ninja-1.12.1 at /usr/bin/ninja
                                                
 -> cd /tmp/hyprpm/fahmed && PKG_CONFIG_PATH="/home/fahmed/.local/share/hyprpm/headersRoot/share/pkgconfig" ninja -C build
ninja: Entering directory `build'
[1/13] Compiling C++ object src/gestures/libgestures.a.p/Shared.cpp.o
[2/13] Compiling C++ object src/gestures/libgestures.a.p/CompletedGesture.cpp.o
[3/13] Compiling C++ object src/gestures/libgestures.a.p/DragGesture.cpp.o
[4/13] Compiling C++ object src/gestures/libgestures.a.p/Actions.cpp.o
[5/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_touch.cpp.o
[6/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_actions.cpp.o
[7/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_math.cpp.o
[8/13] Linking static target subprojects/wf-touch/libwftouch.a
[9/13] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
[10/13] Linking static target src/gestures/libgestures.a
[11/13] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
FAILED: src/libhyprgrass.so.p/main.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/protocols -I/home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/wlroots-hyprland -I/home/fahmed/.local/share/hyprpm/headersRoot/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
In file included from /usr/include/c++/14.1.1/chrono:45,
                 from /home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:6,
                 from ../src/GestureManager.hpp:7,
                 from ../src/main.cpp:1:
/usr/include/c++/14.1.1/sstream:457:7: error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’ redeclared with different access
  457 |       struct __xfer_bufptrs
      |       ^~~~~~
../src/GestureManager.hpp:25:22: error: ‘ITouch::SDownEvent’ has not been declared
   25 |     bool onTouchDown(ITouch::SDownEvent e);
      |                      ^~~~~~
../src/GestureManager.hpp:29:20: error: ‘ITouch::SUpEvent’ has not been declared
   29 |     bool onTouchUp(ITouch::SUpEvent e);
      |                    ^~~~~~
../src/GestureManager.hpp:33:22: error: ‘ITouch::SMotionEvent’ has not been declared
   33 |     bool onTouchMove(ITouch::SMotionEvent e);
      |                      ^~~~~~
../src/main.cpp: In function ‘void hkOnTouchDown(void*, SCallbackInfo&, std::any)’:
../src/main.cpp:17:37: error: incomplete type ‘ITouch’ used in nested name specifier
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |                                     ^~~~~~~~~~
../src/main.cpp:17:48: error: no matching function for call to ‘any_cast<<expression error> >(std::any&)’
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/hyprlang.hpp:6,
                 from /home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../helpers/Vector2D.hpp:6,
                 from /home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/../SharedDefs.hpp:3,
                 from /home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/src/plugins/PluginAPI.hpp:25,
                 from ../src/globals.hpp:3,
                 from ../src/GestureManager.hpp:4:
/usr/include/c++/14.1.1/any:462:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(const any&)’
  462 |     inline _ValueType any_cast(const any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:462:23: note:   template argument deduction/substitution failed:
../src/main.cpp:17:48: error: template argument 1 is invalid
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:488:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&)’
  488 |     inline _ValueType any_cast(any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:488:23: note:   template argument deduction/substitution failed:
../src/main.cpp:17:48: error: template argument 1 is invalid
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:502:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&&)’
  502 |     inline _ValueType any_cast(any&& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:502:23: note:   template argument deduction/substitution failed:
../src/main.cpp:17:48: error: template argument 1 is invalid
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:555:30: note: candidate: ‘template<class _ValueType> const _ValueType* std::any_cast(const any*)’
  555 |     inline const _ValueType* any_cast(const any* __any) noexcept
      |                              ^~~~~~~~
/usr/include/c++/14.1.1/any:555:30: note:   template argument deduction/substitution failed:
../src/main.cpp:17:48: error: template argument 1 is invalid
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:564:24: note: candidate: ‘template<class _ValueType> _ValueType* std::any_cast(any*)’
  564 |     inline _ValueType* any_cast(any* __any) noexcept
      |                        ^~~~~~~~
/usr/include/c++/14.1.1/any:564:24: note:   template argument deduction/substitution failed:
../src/main.cpp:17:48: error: template argument 1 is invalid
   17 |     auto ev = std::any_cast<ITouch::SDownEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
../src/main.cpp: In function ‘void hkOnTouchUp(void*, SCallbackInfo&, std::any)’:
../src/main.cpp:23:37: error: incomplete type ‘ITouch’ used in nested name specifier
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |                                     ^~~~~~~~
../src/main.cpp:23:46: error: no matching function for call to ‘any_cast<<expression error> >(std::any&)’
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:462:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(const any&)’
  462 |     inline _ValueType any_cast(const any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:462:23: note:   template argument deduction/substitution failed:
../src/main.cpp:23:46: error: template argument 1 is invalid
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:488:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&)’
  488 |     inline _ValueType any_cast(any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:488:23: note:   template argument deduction/substitution failed:
../src/main.cpp:23:46: error: template argument 1 is invalid
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:502:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&&)’
  502 |     inline _ValueType any_cast(any&& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:502:23: note:   template argument deduction/substitution failed:
../src/main.cpp:23:46: error: template argument 1 is invalid
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:555:30: note: candidate: ‘template<class _ValueType> const _ValueType* std::any_cast(const any*)’
  555 |     inline const _ValueType* any_cast(const any* __any) noexcept
      |                              ^~~~~~~~
/usr/include/c++/14.1.1/any:555:30: note:   template argument deduction/substitution failed:
../src/main.cpp:23:46: error: template argument 1 is invalid
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:564:24: note: candidate: ‘template<class _ValueType> _ValueType* std::any_cast(any*)’
  564 |     inline _ValueType* any_cast(any* __any) noexcept
      |                        ^~~~~~~~
/usr/include/c++/14.1.1/any:564:24: note:   template argument deduction/substitution failed:
../src/main.cpp:23:46: error: template argument 1 is invalid
   23 |     auto ev = std::any_cast<ITouch::SUpEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
../src/main.cpp: In function ‘void hkOnTouchMove(void*, SCallbackInfo&, std::any)’:
../src/main.cpp:29:37: error: incomplete type ‘ITouch’ used in nested name specifier
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |                                     ^~~~~~~~~~~~
../src/main.cpp:29:50: error: no matching function for call to ‘any_cast<<expression error> >(std::any&)’
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:462:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(const any&)’
  462 |     inline _ValueType any_cast(const any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:462:23: note:   template argument deduction/substitution failed:
../src/main.cpp:29:50: error: template argument 1 is invalid
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:488:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&)’
  488 |     inline _ValueType any_cast(any& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:488:23: note:   template argument deduction/substitution failed:
../src/main.cpp:29:50: error: template argument 1 is invalid
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:502:23: note: candidate: ‘template<class _ValueType> _ValueType std::any_cast(any&&)’
  502 |     inline _ValueType any_cast(any&& __any)
      |                       ^~~~~~~~
/usr/include/c++/14.1.1/any:502:23: note:   template argument deduction/substitution failed:
../src/main.cpp:29:50: error: template argument 1 is invalid
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:555:30: note: candidate: ‘template<class _ValueType> const _ValueType* std::any_cast(const any*)’
  555 |     inline const _ValueType* any_cast(const any* __any) noexcept
      |                              ^~~~~~~~
/usr/include/c++/14.1.1/any:555:30: note:   template argument deduction/substitution failed:
../src/main.cpp:29:50: error: template argument 1 is invalid
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14.1.1/any:564:24: note: candidate: ‘template<class _ValueType> _ValueType* std::any_cast(any*)’
  564 |     inline _ValueType* any_cast(any* __any) noexcept
      |                        ^~~~~~~~
/usr/include/c++/14.1.1/any:564:24: note:   template argument deduction/substitution failed:
../src/main.cpp:29:50: error: template argument 1 is invalid
   29 |     auto ev = std::any_cast<ITouch::SMotionEvent>(e);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
[12/13] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/protocols -I/home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/wlroots-hyprland -I/home/fahmed/.local/share/hyprpm/headersRoot/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
In file included from /usr/include/c++/14.1.1/chrono:45,
                 from /home/fahmed/.local/share/hyprpm/headersRoot/include/hyprland/src/debug/Log.hpp:6,
                 from ../src/GestureManager.hpp:7,
                 from ../src/GestureManager.cpp:1:
/usr/include/c++/14.1.1/sstream:457:7: error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’ redeclared with different access
  457 |       struct __xfer_bufptrs
      |       ^~~~~~
../src/GestureManager.hpp:25:22: error: ‘ITouch::SDownEvent’ has not been declared
   25 |     bool onTouchDown(ITouch::SDownEvent e);
      |                      ^~~~~~
../src/GestureManager.hpp:29:20: error: ‘ITouch::SUpEvent’ has not been declared
   29 |     bool onTouchUp(ITouch::SUpEvent e);
      |                    ^~~~~~
../src/GestureManager.hpp:33:22: error: ‘ITouch::SMotionEvent’ has not been declared
   33 |     bool onTouchMove(ITouch::SMotionEvent e);
      |                      ^~~~~~
../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeBegin(uint32_t)’:
../src/GestureManager.cpp:89:37: error: incomplete type ‘IPointer’ used in nested name specifier
   89 |     auto emulated_swipe = IPointer::SSwipeBeginEvent{
      |                                     ^~~~~~~~~~~~~~~~
../src/GestureManager.cpp:83:23: warning: unused variable ‘PSWIPEFINGERS’ [-Wunused-variable]
   83 |     static auto const PSWIPEFINGERS =
      |                       ^~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeEnd(uint32_t, bool)’:
../src/GestureManager.cpp:100:37: error: incomplete type ‘IPointer’ used in nested name specifier
  100 |     auto emulated_swipe = IPointer::SSwipeEndEvent{
      |                                     ^~~~~~~~~~~~~~
../src/GestureManager.cpp: In member function ‘void GestureManager::emulateSwipeUpdate(uint32_t)’:
../src/GestureManager.cpp:121:37: error: incomplete type ‘IPointer’ used in nested name specifier
  121 |     auto emulated_swipe = IPointer::SSwipeUpdateEvent{
      |                                     ^~~~~~~~~~~~~~~~~
../src/GestureManager.cpp:108:23: warning: unused variable ‘PSWIPEDIST’ [-Wunused-variable]
  108 |     static auto const PSWIPEDIST =
      |                       ^~~~~~~~~~
../src/GestureManager.cpp: At global scope:
../src/GestureManager.cpp:315:6: error: no declaration matches ‘bool GestureManager::onTouchDo
wn(ITouch::SDownEvent)’
  315 | bool GestureManager::onTouchDown(ITouch::SDownEvent ev) {
      |      ^~~~~~~~~~~~~~
../src/GestureManager.hpp:25:10: note: candidate is: ‘bool GestureManager::onTouchDown(int)’
   25 |     bool onTouchDown(ITouch::SDownEvent e);
      |          ^~~~~~~~~~~
../src/GestureManager.hpp:18:7: note: ‘class GestureManager’ defined here
   18 | class GestureManager : public IGestureManager {
      |       ^~~~~~~~~~~~~~
../src/GestureManager.cpp:356:6: error: no declaration matches ‘bool GestureManager::onTouchUp(ITouch::SUpEvent)’
  356 | bool GestureManager::onTouchUp(ITouch::SUpEvent ev) {
      |      ^~~~~~~~~~~~~~
../src/GestureManager.hpp:29:10: note: candidate is: ‘bool GestureManager::onTouchUp(int)’
   29 |     bool onTouchUp(ITouch::SUpEvent e);
      |          ^~~~~~~~~
../src/GestureManager.hpp:18:7: note: ‘class GestureManager’ defined here
   18 | class GestureManager : public IGestureManager {
      |       ^~~~~~~~~~~~~~
../src/GestureManager.cpp:387:6: error: no declaration matches ‘bool GestureManager::onTouchMove(ITouch::SMotionEvent)’
  387 | bool GestureManager::onTouchMove(ITouch::SMotionEvent ev) {
      |      ^~~~~~~~~~~~~~
../src/GestureManager.hpp:33:10: note: candidate is: ‘bool GestureManager::onTouchMove(int)’
   33 |     bool onTouchMove(ITouch::SMotionEvent e);
      |          ^~~~~~~~~~~
../src/GestureManager.hpp:18:7: note: ‘class GestureManager’ defined here
   18 | class GestureManager : public IGestureManager {
      |       ^~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.



✖ Plugin hyprgrass failed to build.
  This likely means that the plugin is either outdated, not yet available for your version, or broken.
  If you are on -git, update first.
  Try re-running with -v to see more verbose output.
Fetching submodule subprojects/wf-touch
✔ updated hyprgrass                                                                                                                                                                                                  
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  6 / 6  Done!                                                                                                                                                    
✔ Ensuring plugin load state
✔ Loaded hyprgrass
✔ Plugin load state ensured

hyprgrass failing to build (GestureManager.cpp)

When trying to install hyprgrass, it encounters an error when compiling GestureManager.cpp (see Sceenshot)
After using hyprpm update -v, you can enable hyprgrass, but the plugin fails as it cannot find hyprgrass.so.

image

OS: Arch Linux x86_64 (6.8.9-arch1-2)
Hyprland Version 0.40.0

I am new to linux and not used to submitting issues, so if you require any more logs or info please tell me! ^^

Cant install using hyprpm

Hyprland version: AUR hyprland-git:0.33.1.r16.af6aae4e-1
Logs:

 hyprpm add https://github.com/horriblename/hyprgrass -v -n
✔ adding a new plugin repository from https://github.com/horriblename/hyprgrass
  MAKE SURE that you trust the authors. DO NOT install random plugins without verifying the code and author.
  Are you sure? [Y/n] y

! old plugin repo build files found in temp directory, removing.                                                                                                                        
 → Cloning https://github.com/horriblename/hyprgrass                                                                                                                                    
✔ cloned                                                                                                                                                                                
✔ found hyprload manifest                                                                                                                                                               
✔ parsed manifest, found 1 plugins:                                                                                                                                                     
 → hyprgrass by horriblename version 0.4.0                                                                                                                                              
 ━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  2 / 5  Verifying headers[v] version returned: Hyprland, built from branch main at commit af6aae4e12b96fff701d8ae8fcb48ea8bb51009f dirty (renderer: don't use clipBox for pinned window occlusion during animations).
Tag: v0.33.1-16-gaf6aae4e

flags: (if any)
debug


[v] parsed commit af6aae4e12b96fff701d8ae8fcb48ea8bb51009f at branch main
✔ Hyprland headers OK                                                                                                                                                                   
 → Building hyprgrass                                                                                                                                                                   
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━━━━━━━━  3 / 5  Building plugin(s)                                                                                                          
✖ Plugin hyprgrass failed to build.
[v] shell returned: Submodule 'wf-touch' (https://github.com/WayfireWM/wf-touch) registered for path './'
Cloning into '/tmp/hyprpm/new/subprojects/wf-touch'...
Submodule path './': checked out '8974eb0f6a65464b63dd03b842795cb441fb6403'
The Meson build system
Version: 1.3.0
Source dir: /tmp/hyprpm/new
Build dir: /tmp/hyprpm/new/build
Build type: native build
Project name: hyprgrass
Project version: 0.0.4
C compiler for the host machine: cc (gcc 13.2.1 "cc (GCC) 13.2.1 20230801")
C linker for the host machine: cc ld.bfd 2.41.0
C++ compiler for the host machine: c++ (gcc 13.2.1 "c++ (GCC) 13.2.1 20230801")
C++ linker for the host machine: c++ ld.bfd 2.41.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -std=c++23: YES 
meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Found pkg-config: YES (/usr/bin/pkg-config) 2.0.3
Run-time dependency hyprland found: YES 0.33.1
Found CMake: /usr/bin/cmake (3.27.9)
Run-time dependency wftouch found: NO (tried pkgconfig and cmake)

Executing subproject wf-touch 

wf-touch| Project name: wf-touch
wf-touch| Project version: 0.0
wf-touch| C++ compiler for the host machine: c++ (gcc 13.2.1 "c++ (GCC) 13.2.1 20230801")
wf-touch| C++ linker for the host machine: c++ ld.bfd 2.41.0
wf-touch| Run-time dependency glm found: YES 0.9.9.8
wf-touch| Run-time dependency doctest found: NO (tried pkgconfig and cmake)
wf-touch| Build targets in project: 1
wf-touch| Subproject wf-touch finished.

Run-time dependency pixman-1 found: YES 0.42.2
Run-time dependency libdrm found: YES 2.4.118
Build targets in project: 3

hyprgrass 0.0.4

  Subprojects
    wf-touch: YES

Found ninja-1.11.1 at /usr/bin/ninja
                                                
ninja: Entering directory `build'
[1/9] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
FAILED: src/libhyprgrass.so.p/main.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/hyprland/protocols -I/usr/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/main.cpp.o -MF src/libhyprgrass.so.p/main.cpp.o.d -o src/libhyprgrass.so.p/main.cpp.o -c ../src/main.cpp
In file included from /usr/local/include/hyprland/src/debug/Log.hpp:7,
                 from ../src/GestureManager.hpp:4,
                 from ../src/main.cpp:1:
/usr/local/include/hyprland/src/includes.hpp:73:10: fatal error: wlr/types/wlr_input_inhibitor.h: No such file or directory
   73 | #include <wlr/types/wlr_input_inhibitor.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/9] Compiling C++ object src/libhyprgrass.so.p/GestureManager.cpp.o
FAILED: src/libhyprgrass.so.p/GestureManager.cpp.o 
c++ -Isrc/libhyprgrass.so.p -Isrc -I../src -Isubprojects/wf-touch -I../subprojects/wf-touch -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/hyprland/protocols -I/usr/include/hyprland/wlroots -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -std=c++23 -fPIC -DWLR_USE_UNSTABLE -MD -MQ src/libhyprgrass.so.p/GestureManager.cpp.o -MF src/libhyprgrass.so.p/GestureManager.cpp.o.d -o src/libhyprgrass.so.p/GestureManager.cpp.o -c ../src/GestureManager.cpp
In file included from /usr/local/include/hyprland/src/debug/Log.hpp:7,
                 from ../src/GestureManager.hpp:4,
                 from ../src/GestureManager.cpp:1:
/usr/local/include/hyprland/src/includes.hpp:73:10: fatal error: wlr/types/wlr_input_inhibitor.h: No such file or directory
   73 | #include <wlr/types/wlr_input_inhibitor.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/9] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_touch.cpp.o
[4/9] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_math.cpp.o
[5/9] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_actions.cpp.o
[6/9] Compiling C++ object src/gestures/libgestures.a.p/Gestures.cpp.o
ninja: build stopped: subcommand failed.


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.