This is what remains after the modifications:
Code:
#!/bin/sh
# Clean the screen
lipc-set-prop com.lab126.pillow customDialog '{"name": "../../../../mnt/us/extensions/kindlemenu/bin/html/blank"}'
# Launch Kindle Menu html page
(usleep 250000; lipc-set-prop com.lab126.pillow customDialog '{"name": "../../../../mnt/us/extensions/kindlemenu/bin/kindlemenupage", "clientParams": {"dismiss": true}}')
# kill already running clean_launchers.sh processes, if any
killall clean_launchers.sh
# If Kindle Touch, disable light tray buttons. Disable also
# launcher of Midori and KOreader, if not installed
/mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh
So far it seems fine, trying cold start as soon as it reboots...
Results are as follows:
KUAL > Kindle Menu > Enable status bar shortcut > (screen swipe starting from top towards bottom)
Didn't work the first time, worked the second (KOReader and Midori gone)
On the contrary, opening the menu directly yields correct results (KUAL > Kindle Menu > Show Kindle Menu). This is somewhat expected, since the initial problem was only observable in cases where menu is called using the shortcut (gesture).
Edit:
I might have found a way to cover all the aspects of the problem, and the fix requires you to use the code above but add an ampersand to the last job thus making it go to background:
Code:
/mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh &
Let me know if this helps anyone!