workinghard / jslisten

listen to gamepad inputs and trigger a command
GNU General Public License v3.0
31 stars 18 forks source link

More clear README.md file #30

Open benna100 opened 3 years ago

benna100 commented 3 years ago

Hey

Thanks for creating this. It is exactly what i am looking for!

I simply could not follow/did not understand your installation step:

I'm not the strongest Linux user but not a total novice either. Is it possible to be a bit more clear in the directions?

workinghard commented 3 years ago

@benna100 : I can recommend to follow some tutorials how to build/compile/install from source code in debian/linux environment.

The best approach would be to create an installation script so this manual steps are not required anymore. If someone would like to create one and submit a pull request, I would happily merge it.

cgmckeever commented 3 years ago

@benna100 --

from you home directory (~/) or /tmp or wherever you want to drop the repo

git clone https://github.com/workinghard/jslisten.git
cd jslisten
make

this should, grab the repository, change directory into it, and do the build. From there

sudo mkdir -p /opt/bin
sudo cp /bin/jslisten /opt/bin/

this should copy the binary to the above location. You need to create the config file

where bin/jslisten is the binary you created.

It gets a bit odd here, as there are potential two places for the config either in your home ~/.jslisten as a dot file or in /etc/ as jslisten.cfg .. this is a preference I believe at this point.

Whats really important, and now starts to get into deeper Linux that we can't really help here (as its user/desire specific) is WHAT goes into the config and the custom commands its to perform.

[Generic]
program="/opt/bin/modeSwitcher.sh"
button1=10
button2=11
button3=0
button4=

Now we start to get even deeper into Linux by enabling the service

sudo cp utils/jslisten.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl start jslisten.service
sudo systemctl enable jslisten

This will enable the service to start, and by default listen for Joystick 0

cgmckeever commented 3 years ago

Update README https://github.com/workinghard/jslisten/pull/31/files

cgmckeever commented 3 years ago

@benna100 https://github.com/cgmckeever/jslisten/tree/README

benna100 commented 3 years ago

Ahh perfect, thanks for this. Really appreciate it!

Gonna try it out again now :)