gnome-gesture-improvements icon indicating copy to clipboard operation
gnome-gesture-improvements copied to clipboard

[Feature Request] GNOME 45 Support

Open luismxlina opened this issue 1 year ago • 25 comments

This extension works and feels as if it should be native on Gnome DE for every laptop. It's great.

The process to adapt existing extensions to the problematic Gnome Shell 45 it is sort of explained here https://gjs.guide/extensions/upgrading/gnome-shell-45.html However searching through the source code of this extension, every requirement, ESM imports and good practises from the previous guide are already achieved, so changing the metadata.json file, and leaving "45" as the only compatible version, for then reinstalling and enabling "Gestures Improvements" apparently should do the trick. Sadly it doesn't, and the next error is thrown when trying to load the extension:

The settings of extension gestureImprovements@gestures had an error:

SyntaxError: import declarations may only appear at top level of a module


Stack trace:

@file:///home/lviz/.local/share/gnome-shell/extensions/gestureImprovements@gestures/prefs.js:4:12
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

I hope @harshadgavali, collaborators or any interested and experienced programmer can find a solution, or guide unexperienced programmers as me to fix this great tool.

luismxlina avatar Oct 22 '23 11:10 luismxlina

you got any solutions ?

logans3c avatar Oct 27 '23 07:10 logans3c

you got any solutions ?

@jaophi got the transpiled version of the source code working, because this project is made with TypeScript. It's not a perfect solution, but it works for now and we gotta give props to this man. I quote him here in case someone didn't see the previous issue: https://github.com/harshadgavali/gnome-gesture-improvements/issues/199#issuecomment-1752162371

Hey guys, I did the necessary changes to run in GNOME 45, here's the zip: [email protected]

I can't make a PR because I don’t know how to make those changes (ESM imports) work with all the ts transpilation this project uses, I just applied them in the final (js) zip release.

The process to get it running:

gnome-extensions install -f ~/Downloads/[email protected]

Logout and login, it should be working already.

luismxlina avatar Oct 27 '23 11:10 luismxlina

rm -rf ~/.local/share/gnome-shell/extensions/gestureImprovements@gestures;
unzip ~/Downloads/[email protected];
cp -r ~/Downloads/gestureImprovements@gestures ~/.local/share/gnome-shell/extensions/;
gnome-extensions enable gestureImprovements@gestures;

You can alternatively just run gnome-extensions install -f ~/Downloads/[email protected] instead. The -f flag will overwrite the extension if it's already installed.

FlynnD273 avatar Oct 27 '23 18:10 FlynnD273

Could someone fork and update the project please?

Neo-29 avatar Oct 29 '23 00:10 Neo-29

As discussed previously, that takes a lot of work, and it requires either getting the TypeScript transpilation working, or simply maintaining a JavaScript-only version both of which are... complicated

FlynnD273 avatar Oct 29 '23 03:10 FlynnD273

+1 please

grigio avatar Oct 31 '23 19:10 grigio

https://github.com/JoseExposito/touchegg#readme

I think this is a viable alternative. I don't know if the gestures are one-to-one though.

mbeps avatar Nov 06 '23 19:11 mbeps

https://github.com/JoseExposito/touchegg#readme

I think this is a viable alternative. I don't know if the gestures are one-to-one though.

It doesn't seem to work for me. The name of the companion GNOME extension for Touchegg is X11 gestures, maybe it doesn't work on Wayland?

FlynnD273 avatar Nov 06 '23 21:11 FlynnD273

https://github.com/JoseExposito/touchegg#readme I think this is a viable alternative. I don't know if the gestures are one-to-one though.

It doesn't seem to work for me. The name of the companion GNOME extension for Touchegg is X11 gestures, maybe it doesn't work on Wayland?

Yep, seems like Wayland is not supported yet. This is a major problem. Fedora 39 is out and all of my favourite extensions have also been ported except this one.

mbeps avatar Nov 07 '23 16:11 mbeps

I tried refactoring the code as per the GJS port extension guide for GNOME 45.

Will need to update how the transpilation works, I'll need help.

adhadse avatar Nov 13 '23 09:11 adhadse

Is this project abandoned? Looks like the owner has not posted anything over half a year. Also, why is this issue not going anywhere? Is this because the problem is on Gnome's side and it cannot be fixed until Gnome developers make some changes?

HubKing avatar Jan 27 '24 01:01 HubKing

Is this project abandoned? Looks like the owner has not posted anything over half a year. Also, why is this issue not going anywhere? Is this because the problem is on Gnome's side and it cannot be fixed until Gnome developers make some changes?

The Zip version given above is fully operational

https://github.com/harshadgavali/gnome-gesture-improvements/files/12841762/gestureImprovements%40gestures.zip

Only solution for the moment

Neo-29 avatar Jan 28 '24 11:01 Neo-29

Why can't that be merged in and published?

nafg avatar Jan 30 '24 17:01 nafg

Because this extension uses TypeScript and a transpiler. The zipped file is a ported version of the transpiled code. So unless the owner wants to switch to JavaScript, it can't be merged until the source code itself is ported.

FlynnD273 avatar Jan 30 '24 18:01 FlynnD273

What would it take to port the existing (TS) code?

nafg avatar Jan 30 '24 20:01 nafg

Unsure. I looked into it a little bit but wasn't familiar enough with how the custom transpilers work generally (and specifically this one). I'm hesitant to speculate at the complexity of porting the TypeScript code. Hopefully someone else has more experience than I

FlynnD273 avatar Jan 30 '24 22:01 FlynnD273

Coming from GNOME 46, I changed the GNOME version to 46 and version to 27 in metadata.json and its still working perfectly! Credit to @joaophi for porting it and @luismxlina for the install instructions. Post the zip here to save others' time editing the files.

[email protected]

7HE-W0R1D avatar Mar 27 '24 17:03 7HE-W0R1D

Coming from GNOME 46, I changed the GNOME version to 46 and version to 27 in metadata.json and its still working perfectly! Credit to @joaophi for porting it and @luismxlina for the install instructions. Post the zip here to save others' time editing the files.

[email protected]

I get this error in gnome 46 by your zip file: Error: No signal 'actor-added' on object 'Gjs_ui_layout_UiActor' Any idea?

medicamin avatar Mar 28 '24 11:03 medicamin

Coming from GNOME 46, I changed the GNOME version to 46 and version to 27 in metadata.json and its still working perfectly! Credit to @joaophi for porting it and @luismxlina for the install instructions. Post the zip here to save others' time editing the files. [email protected]

I get this error in gnome 46 by your zip file: Error: No signal 'actor-added' on object 'Gjs_ui_layout_UiActor' Any idea?

I'm using Fedora 40 beta with GNOME 46 but cannot replicate the error on my side, however, I remember seeing this actor related comment in the dash to dock pull request for GNOME 46 https://github.com/micheleg/dash-to-dock/pull/2146#issue-2130480064

7HE-W0R1D avatar Mar 28 '24 14:03 7HE-W0R1D

@medicamin For the signal error change "actor-added" to "child-added" in src/snapWindow.js at line 266.

Yanndroid avatar Mar 28 '24 23:03 Yanndroid

@medicamin For the signal error change "actor-added" to "child-added" in src/snapWindow.js at line 266.

Thanks a lot. It's working now

medicamin avatar Mar 29 '24 07:03 medicamin

@medicamin For the signal error change "actor-added" to "child-added" in src/snapWindow.js at line 266.

This worked fine! Btw can someone confirm that the 3 finger pinch to close applications has broken? Btw 2: Github forces me to "close this issue as not planned" because of the fork that was made https://github.com/harshadgavali/gnome-gesture-improvements/pull/207 but feel free to discuss and comment anything related

luismxlina avatar Mar 30 '24 20:03 luismxlina

@medicamin For the signal error change "actor-added" to "child-added" in src/snapWindow.js at line 266.

This worked fine! Btw can someone confirm that the 3 finger pinch to close applications has broken? Btw 2: Github forces me to "close this issue as not planned" because of the fork that was made #207 but feel free to discuss and comment anything related

3 finger pinch and 4 finger pinch to close applications and to invoke ctrl + w command, does not seem to work for me too. Do you have any solution for this?

swapisticated avatar Apr 14 '24 20:04 swapisticated

I have pushed the transpiled version as a repo to https://github.com/sidevesh/gnome-gesture-improvements--transpiled with all the fixes from this thread and also two PRs from me which were never merged, https://github.com/harshadgavali/gnome-gesture-improvements/pull/202 https://github.com/harshadgavali/gnome-gesture-improvements/pull/203

all credit goes to the everyone who fixed the issues and got this transpiled and working, let me know if I missed crediting someone on the repo.

The issue of 3 and 4 finger pinch is still not working but I will be taking a look at fixing that, would appreciate help!

sidevesh avatar Apr 25 '24 18:04 sidevesh

My Workspace switching gesture (4 finger swipe) is also not working. Any fixes?

Beast-Viper avatar Apr 28 '24 11:04 Beast-Viper