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

Questions on usage #1

Closed
sodface opened this issue Aug 7, 2022 · 3 comments
Closed

Questions on usage #1

sodface opened this issue Aug 7, 2022 · 3 comments

Comments

@sodface
Copy link

sodface commented Aug 7, 2022

Hello, can you please help me understand "normal" usage? I've built libsgestures as an Alpine Linux package and separately built an sgestures binary based off your config.c with some minor modifications.

I can successfully test the above using the writer piped into the reader as illustrated in the debug section of the Makefile:

./sgestures-libinput-writer | ./sample-gesture-reader

So I feel like I'm almost there, I'm just a little confused over your sgestures.sh where it seems like when you recompile you just exec sgestures and that's it (where is the writer?):

exec "$SGESTURES_BIN"

I'm not explaining it well really, but based on our previous interaction with navboard, your approach for your usage seems similar here, in that you have this setup so you can make config changes and recompile on the device you are running it on, which is cool, but I'm trying to build just a static config to run on another machine with the understanding that if I need a config change, I'll have to do it on the builder and reinstall on the target. Can I build just a standalone writer/reader or does there need to be a separate writer piped to the reader?

@TAAPArthur
Copy link
Owner

but I'm trying to build just a static config to run on another machine with the understanding that if I need a config change, I'll have to do it on the builder and reinstall on the target.

Then you don't have to care about sgestures.sh

The default writer will be sufficent if you use libinput. All it does is translates events into sgestures format.

The way I used to use it:

sgestures-libinput-writer | sgestures

Now you can modify the source slightly and make this a single program (see the tests). I'm open to add an option to the makefile to make it easier to do so.

There are 2 reasons I separated them by default.

  1. The first is to make it easy to change the config on the fly without dropping events. Ie I could have a gesture that tells sgestures (the reader not the writer) to restart it self and therefore load the new configuration. If I restarted both, then I may lose the current write.
  2. The second is to run the writer as a system service and the reader as my local user. I start the reader from my on login generally from my xinit, but don't want to start multiple writers if I happened to login in twice. Also don't want to run the reader as root as then it won't automatically know my X display (and for security issues).

I'm under the impression that neither of these is relevant to you so there isn't a reason to have 2 separate programs. But in case you are interested, see mqbus for how I get the 2 programs to talk to each other

@sodface
Copy link
Author

sodface commented Aug 7, 2022

I'm under the impression that neither of these is relevant to you

I've been using Touchegg which is similar in that it has a system service and user client so that's ok with me, and it was working fine, but after using navboard and then going through your repos, I noticed libsgestures and had to try it because it seems like a lighter solution than Touchegg.

But in case you are interested, see mqbus for how I get the 2 programs to talk to each other

Ah! I think this is the piece I was missing. I will investigate.

Thanks again for the reply and the awesome software.

@sodface
Copy link
Author

sodface commented Aug 9, 2022

I think I understand enough now to close this. Thanks.

@sodface sodface closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants