View Single Post
Old 10-28-2014, 06:25 AM   #14
traycold
Connoisseur
traycold doesn't littertraycold doesn't litter
 
Posts: 63
Karma: 196
Join Date: Oct 2010
Device: Kobo Glo Hd, Kobo H2O2
hi all,
I'm trying to write a sort of "toast" notification message to the screen, when nickel is running.
My use case is:
  • I modified the Night Mode in a way so that when the screen is inverted, a script "/mnt/onboard/.kobo/button_longpressed.sh" is invoked;
  • this script do something in the background (actually, it syncs a folder with dropbox);
  • when it ends execution, I would like the user is informed with a sort of popup / toast notification showing a message like "operation XXX completed, status YYY".
I just miss now the latest step, i.e. to display a notification.
Reading this thread, I tried invoking pickel at the end of my script:
Code:
zcat someimage.raw.gz | /usr/local/Kobo/pickel showpic 1;
but, while the image of pickel is correctly shown, then apparently the nickel rendering is totally messed up (meaning: the application itself still works, the touchscreen input is processed, but what appears on the screen is sort of random pixels).
I also tried with KoboLauncher msgbox utility, but it didn't display anything (probably it needs the correct Qt environment to work).

Do you think there is in theory a way to do what I described above? or it's impossible to make other tools write to the screen when nickel is active?

Thanks

EDIT 28/10/2014 13:20: apparently I found a solution: after executing pickel, it's necessary to restore the rotate value for nickel, so the code should be something like:
Code:
ROTATE_NICKEL=$(cat /sys/class/graphics/fb0/rotate);
zcat someimage.raw.gz | /usr/local/Kobo/pickel showpic 1;
echo $ROTATE_NICKEL > /sys/class/graphics/fb0/rotate
In my case, the rotate value good for nickel is 3, but is set to 0 after running pickel.

Last edited by traycold; 10-28-2014 at 08:24 AM.
traycold is offline   Reply With Quote