voorkant / voorkant-core

https://voorkant.org/
MIT License
2 stars 3 forks source link

create a toonstore app #102

Open Habbie opened 5 months ago

Habbie commented 5 months ago

Even though we are not a QML app like other toonstore apps, there's no reason we could not be in their 'store' (all of which is free). My current thinking is a Voorkant button that opens a simple confirmation dialogue, that explains that returning to Toon will take a few minutes.

As for implementation, I do not know if QML apps can execute things, but I do know they can write files, so one approach might be that some voorkant-launcher-daemon is running, waiting for the appearance of some file somewhere, and then it kills qt-gui and starts voorkant-lvgl.

For bonus points (I've been pondering this for a while without a sensible outcome so far), find a way to suspend qt-gui -without- it getting delivered 500 touch events when it resumes, so we can cheaply switch back and forth. chvt does not appear to be the way, it's in the wrong layer.

Habbie commented 2 months ago

-without- it getting delivered 500 touch events when it resumes

EVIOCGRAB works for this - tested with evtest --grab (evtest 1.35)

Habbie commented 2 months ago

Alternative idea: a toon app that just clears out as much as possible of the screen and tells us what rectangle on fb0 is ours. Then only handle touch for that area.

Toon's Home button (or, well, its touch area) appears to be 86 wide, 55 tall, so either we get 800x(480-55=425), or we get 800x480 minus that 86x55 square.

image

Habbie commented 2 months ago

as far as I can tell, we cannot spawn processes from QML, but writing external-voorkant to /tmp/tsc.command should execute /qmf/qml/apps/voorkant/voorkant.sh within five seconds, which is a start.

# echo 'external-voorkant' > /tmp/tsc.command; sleep 5; tail -3 /var/log/tsc
External sh request found (request app): voorkant
01/09/2024 18:36:36 voorkant app  instructed me to do some external scripting : voorkant.sh
/qmf/qml/apps/voorkant/voorkant.sh does not exist
Habbie commented 2 months ago

Braindump: