horriblename / hyprgrass

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

Plugin isn't correctly loading #117

Closed ForgotMyPasswd closed 2 months ago

ForgotMyPasswd commented 2 months ago

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:
ritzesrepo commented 2 months ago

Same here, gestures stopped working about a week ago, at least two git updates ago. This plugin used to work great on this host, is not a fresh install of hyprgrass

hyprctl plugin list
no plugins loaded
hyprpm list        
 → Repository hyprgrass:
  │ Plugin hyprgrass
  └─ enabled: true
 hyprctl systeminfo
Hyprland, built from branch main at commit ed3a888fc274e09a5097ebbe3d206e4bc85bbb87  (hyprpm: fix style).
Date: Fri May 10 22:56:54 2024
Tag: v0.40.0-59-ged3a888f, commits: 4665

flags: (if any)

System Information:
System name: Linux
Node name: x1yoga
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 WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (rev 02) (prog-if 00 [VGA controller])

os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo

plugins:
horriblename commented 2 months ago

does #118 fix this?

ForgotMyPasswd commented 2 months ago

Currently I'm unable to test this since this plugin doesn't compile on the latest version of Hyprland-git. I'll try this once the plugin is updated.

horriblename commented 2 months ago

https://github.com/hyprwm/Hyprland/issues/6044

ForgotMyPasswd commented 2 months ago

I've switched back to Hyprland 0.40.0 and it still fails to build after running hyprpm update -f -v. Here is the verbose output:

✔ repository hyprgrass has updates.                                                                                                                                                                                  
 → Building hyprgrass                                                                                                                                                                                                
✔ found hyprpm manifest                                                                                                                                                                                              
 → Manifest has 3 pins, checking                                                                                                                                                                                     
✔ commit pin e5a9eb57ec4ef3b89296f76912f37fd4c3bce14b matched hl, resetting                                                                                                                                          
 → Building hyprgrass                                                                                                                                                                                                
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━  6 / 8  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 20240507")
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 20240507")
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 20240507")
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/fahmed/build/meson-logs/meson-log.txt

 -> cd /tmp/hyprpm/fahmed && PKG_CONFIG_PATH="/home/fahmed/.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 hyprgrass
✔ Plugin load state ensured
horriblename commented 2 months ago

install glm

ForgotMyPasswd commented 2 months ago

I've now installed glm, but now I'm getting errors related to GestureMapper.cpp

Here is the output of hyprpm update -f -v

✔ repository hyprgrass has updates.                                                                                                                                                                                  
 → Building hyprgrass                                                                                                                                                                                                
✔ found hyprpm manifest                                                                                                                                                                                              
 → Manifest has 3 pins, checking                                                                                                                                                                                     
✔ commit pin e5a9eb57ec4ef3b89296f76912f37fd4c3bce14b matched hl, resetting                                                                                                                                          
 → Building hyprgrass                                                                                                                                                                                                
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╍━━━━━━━━━━━━  6 / 8  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 20240507")
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 20240507")
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 20240507")
wf-touch| C++ linker for the host machine: c++ ld.bfd 2.42.0
wf-touch| Run-time dependency glm found: YES 1.0.0
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/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_touch.cpp.o
[5/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_actions.cpp.o
[6/13] Compiling C++ object subprojects/wf-touch/libwftouch.a.p/src_math.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/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
../src/GestureManager.cpp: In member function ‘bool GestureManager::onTouchDown(wlr_touch_down_event*)’:
../src/GestureManager.cpp:324:55: error: ‘class CInputManager’ has no member named ‘m_lTouchDevices’; did you mean ‘newTouchDevice’?
  324 |     const auto PDEVIT = std::find_if(g_pInputManager->m_lTouchDevices.begin(), g_pInputManager->m_lTouchDevices.end(),
      |                                                       ^~~~~~~~~~~~~~~
      |                                                       newTouchDevice
../src/GestureManager.cpp:324:97: error: ‘class CInputManager’ has no member named ‘m_lTouchDevices’; did you mean ‘newTouchDevice’?
  324 |     const auto PDEVIT = std::find_if(g_pInputManager->m_lTouchDevices.begin(), g_pInputManager->m_lTouchDevices.end(),
      |                                                                                                 ^~~~~~~~~~~~~~~
      |                                                                                                 newTouchDevice
../src/GestureManager.cpp:325:48: error: ‘STouchDevice’ does not name a type; did you mean ‘SSwitchDevice’?
  325 |                                      [&](const STouchDevice& other) { return other.pWlrDevice == &ev->touch->base; });
      |                                                ^~~~~~~~~~~~
      |                                                SSwitchDevice
../src/GestureManager.cpp: In lambda function:
../src/GestureManager.cpp:325:118: error: expected ‘{’ before ‘;’ token
  325 |                                      [&](const STouchDevice& other) { return other.pWlrDevice == &ev->touch->base; });
      |                                                                                                                      ^
../src/GestureManager.cpp: In member function ‘bool GestureManager::onTouchDown(wlr_touch_down_event*)’:
../src/GestureManager.cpp:325:118: error: expected ‘)’ before ‘;’ token
  325 |                                      [&](const STouchDevice& other) { return other.pWlrDevice == &ev->touch->base; });
      |                                                                                                                      ^
      |                                                                                                                      )
../src/GestureManager.cpp:324:37: note: to match this ‘(’
  324 |     const auto PDEVIT = std::find_if(g_pInputManager->m_lTouchDevices.begin(), g_pInputManager->m_lTouchDevices.end(),
      |                                     ^
../src/GestureManager.cpp:327:36: error: ‘class CInputManager’ has no member named ‘m_lTouchDevices’; did you mean ‘newTouchDevice’?
  327 |     if (PDEVIT != g_pInputManager->m_lTouchDevices.end() && !PDEVIT->boundOutput.empty()) {
      |                                    ^~~~~~~~~~~~~~~
      |                                    newTouchDevice
[12/13] Compiling C++ object src/libhyprgrass.so.p/main.cpp.o
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                                                                                                                                                                                                  
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  8 / 8  Done!                                                                                                                                                    
✔ Ensuring plugin load state
✔ Loaded hyprbars
✔ Loaded hyprgrass
✔ Plugin load state ensured
horriblename commented 2 months ago

oh no I pinned the wrong commit

I am actually stupid my bad

horriblename commented 2 months ago

should work now (0.40.0)

ForgotMyPasswd commented 2 months ago

Yes, the latest commit now ensures this plugin loads correctly on Hyprland 0.40.0

horriblename commented 2 months ago

hyprland-git is also fixed, though I would suggest staying on 0.40.0 - vaxry's wlroots rewrite/ whatever he's doing will probably break something soon