Quantcast
Channel: MobileRead Forums - Kindle Developer's Corner
Viewing all articles
Browse latest Browse all 4410

Native Drawing app on Paperwhite

$
0
0
When playing with my Paperwhite's console, I noticed a tiny app called xtestlab126. It looks like a small test app for touchscreen, but it works well as simple drawing application.

It has one major issue - the only way to exit it is via console.

I liked an idea of having simple drawing app available at no cost, for instance for quick tick-tac-toe sessions or something like that, so I wrote small shell script which fixes the issue mentioned above by closing app on pressing power button or closing magnetic case cover.

Code:

#!/bin/sh
/usr/bin/xtestlab126 &
( dbus-monitor "interface='com.lab126.powerd',member='goingToScreenSaver'" --system; killall xtestlab126 ) &
sleep 1
killall -INT dbus-monitor

I have saved it in /usr/bin/draw.sh and added it to search bar commands so I can run it by typing ";draw" there, but you can have different ideas, like running it via some graphical launcher ;)

PS. Tap with two fingers to clear screen :) It lacks repainting though, so it ghosts...

Viewing all articles
Browse latest Browse all 4410

Trending Articles