Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can long-press/gestures be reassigned? #359

Open
kubycsolutions opened this issue Jun 5, 2024 · 3 comments
Open

Can long-press/gestures be reassigned? #359

kubycsolutions opened this issue Jun 5, 2024 · 3 comments
Assignees
Labels
question Further information is requested to-triage This needs to be triaged

Comments

@kubycsolutions
Copy link

I am hoping not to need screen capture very often. It looks like I can turn off the gesture triggering it using rot system call setSwipeEnabled 'int:2' 'bool:false' (I think that's the right one?), but it might be nice to be able to have that gesture invoke a different action.

Might also be nice to be able to distinguish swipes by where they occur on screen, come to think of it, to have more options available.

(I'm used to left and right swipes being next-page and previous-page in Android, or occasionally next/previous app.)

@kubycsolutions kubycsolutions added question Further information is requested to-triage This needs to be triaged labels Jun 5, 2024
@Eeems
Copy link
Collaborator

Eeems commented Jun 5, 2024

Screenshot taking is one of the few gestures you can have something else take over. It's managed by the screenshot tool, so you can just disable this application and write your own to handle the gesture: https://github.com/Eeems-Org/oxide/blob/master/applications%2Fscreenshot-tool%2Fmain.cpp

As for adding more complex gesture handling etc, it would be nice, but it's way down the priority list for me. For now you can use https://rmkit.dev/apps/genie to handle more complex gestures and then make calls with rot, or your own applications that use the oxide API to get things done.

@jkesselm
Copy link

jkesselm commented Jun 6, 2024

Understood. It's a WIBNI/wishlist item, not a complaint.

Thanks for the tip about subverting snapshot.

@Eeems
Copy link
Collaborator

Eeems commented Jun 6, 2024

Here is a bit more information on how to disable the screenshot tool:

  1. Run launcherctl stop-app codes.eeems.fret to stop the application
  2. Modify /opt/usr/share/applications/codes.eeems.fret.oxide and remove "autoStart" from flags to disable the application being started automatically.

You can then either register your own start application to handle the gesture, or have it start with another mechanism like systemd. I would recommend using an oxide application registration, to make sure it starts/stops with oxide's system service.

You just need to listen to the rightAction signal in the system API. The very bottom example shows you how to use rot to listen for the first leftAction signal, so you can use that as a starting point if you just want to write a shell script. I unfortunately don't have any examples other than using rot or liboxide. You would be able to use dbus directly to handle this if you prefer. You'll just need to use the general API to request the system API, and then continue from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested to-triage This needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants