rmkit-dev / rmkit

| remarkable app framework | https://rmkit.dev
https://build.rmkit.dev
368 stars 32 forks source link

[remux] gesture config example. #102

Closed sourya7 closed 3 years ago

sourya7 commented 3 years ago

Hi, first of all, thank you for this project!

I'm currently trying to use Remux to switch between koreader and the native UI for Remarkable 2. Things mostly work but I'm not able to configure custom gestures. I'm mostly interested in the 3 finger tap to toggle the Remux UI. I tried the steps mentioned in https://github.com/rmkit-dev/rmkit/tree/master/src/remux#config-017 and created a config file but that caused remux to crash.

Wondering if it would be possible to include an example configuration for remux.

My config (~/.config/remux/remux.conf) launch_gesture=gesture=tap;fingers=3

opkg list-installed
ca-certificates - 20200601-1
entware-opt - 227000-3
entware-release - 1.0-2
entware-upgrade - 1.0-1
fbdepth - 1.23.1-3
fbink - 1.23.1-3
findutils - 4.7.0-2
grep - 3.6-1
koreader - 2020.12-4
libc - 2.27-11
libgcc - 8.4.0-11
libopenssl - 1.1.1h-1
libpcre - 8.44-2
libpthread - 2.27-11
librt - 2.27-11
libssp - 8.4.0-11
libstdcpp - 8.4.0-11
locales - 2.27-9
opkg - 2020-11-24-61b3c62d-1
remux - 0.1.7-3
rm2fb - 1.0.0-7
terminfo - 6.2-1
toltec-bootstrap - 0.0.1-3
wget - 1.20.3-4
zlib - 1.2.11-3
zoneinfo-asia - 2020d-1
zoneinfo-europe - 2020d-1
sourya7 commented 3 years ago

This is what I see when I do a journalctl -u remux -r

-- Logs begin at Fri 2021-02-19 20:40:44 UTC, end at Sat 2021-02-20 06:24:55 UTC. --
Feb 20 06:24:53 reMarkable systemd[1]: [[0;1;39m[[0;1;31m[[0;1;39mremux.service: Failed with result 'exit-code'.[[0m
Feb 20 06:24:53 reMarkable systemd[1]: [[0;1;39m[[0;1;31m[[0;1;39mremux.service: Main process exited, code=exited, status=11/n/a[[0m
Feb 20 06:24:53 reMarkable remux[282]: received SIGABRT, exiting
Feb 20 06:24:53 reMarkable remux[282]: CLEANING UP FB
Feb 20 06:24:53 reMarkable remux[282]: READING CONFIG FROM /home/root/.config/remux/remux.conf
Feb 20 06:24:52 reMarkable remux[282]: SETTING UP GESTURES
Feb 20 06:24:52 reMarkable remux[282]: STARTING FIFO THREAD
Feb 20 06:24:52 reMarkable remux[282]: CHECKING PROCESS xochitl 0
Feb 20 06:24:52 reMarkable remux[282]: XOCHITL CMD IS /usr/bin/xochitl --system
Feb 20 06:24:52 reMarkable remux[282]: READING TIMEOUTS FOR SLEEP/SHUTDOWN FROM XOCHITL
raisjn commented 3 years ago

can you run remux from command line with rm2fb-client remux and see what happens? i just installed remux 0.1.7-3 and tried the config you sent and it works (no crash). you should expect to see a line like "ADDED TAP GESTURE" if it was correctly parsed.

i added and then removed 3 finger tap as a gesture because it was being accidentally triggered too often. (i do have back on 4 finger tap, though)

reMarkable: ~/ vim .config/remux/remux.conf
reMarkable: ~/ remux
No such file or directory
No such file or directory
CURRENT APP IS Remarkable
READING TIMEOUTS FOR SLEEP/SHUTDOWN FROM XOCHITL
XOCHITL CMD IS /usr/bin/xochitl --system
CHECKING PROCESS xochitl 1
xochitl IS ALREADY RUNNING, RESUMING
SENDING 18 TO GROUP -3680 RET 0
STARTING FIFO THREAD
SETTING UP GESTURES
READING CONFIG FROM /home/root/.config/remux/remux.conf
ADDED TAP GESTURE:
  command:
  gesture: tap
  fingers: 3
  zone: -1 -1 -1 -1
  duration: 0
^CCLEANING UP FB
sourya7 commented 3 years ago

Thanks, that command helped me figure out the issue. Turns out we can't have an extra newline in the remux.conf.

reMarkable: ~/ cat .config/remux/remux.conf 
launch_gesture=gesture=tap;fingers=3

reMarkable: ~/ rm2fb-client remux
No such file or directory
No such file or directory
No such file or directory
CURRENT APP IS Remarkable
READING TIMEOUTS FOR SLEEP/SHUTDOWN FROM XOCHITL
XOCHITL CMD IS /usr/bin/xochitl --system
CHECKING PROCESS xochitl 1
xochitl IS ALREADY RUNNING, RESUMING
SENDING 18 TO GROUP -660 RET 0
STARTING FIFO THREAD
SETTING UP GESTURES
READING CONFIG FROM /home/root/.config/remux/remux.conf
CLEANING UP FB
received SIGABRT, exiting

If I remove that newline EOF, it starts up just fine.

raisjn commented 3 years ago

ouch, :egg: on me - thanks for finding and diagnosing!

raisjn commented 3 years ago

i think 4f3a283ac8de094b1c290a0dd6d19b6e04597a5c will fix it for others