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 · 4 comments
Open

Can long-press/gestures be reassigned? #359

kubycsolutions opened this issue Jun 5, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

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.

@Eeems Eeems removed the to-triage This needs to be triaged label Oct 14, 2024
@Eeems
Copy link
Collaborator

Eeems commented Oct 14, 2024

I'd be open to a PR where someone adds an application that listens to all the actions and can run a configurable action.

@Eeems Eeems added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed question Further information is requested labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants