open reader using shift+P+P from Kindle's pdf viewer using launchpad

lsof is used to find path of current opened pdf
This commit is contained in:
Dobrica Pavlinusic
2011-11-26 16:19:38 +01:00
parent 04087c072f
commit aa55dca677
2 changed files with 10 additions and 0 deletions

2
launchpad/kpdf.ini Executable file
View File

@@ -0,0 +1,2 @@
[Actions]
P P = !/mnt/us/launchpad/kpdf.sh

8
launchpad/kpdf.sh Executable file
View File

@@ -0,0 +1,8 @@
echo unlock > /proc/keypad
echo unlock > /proc/fiveway
cd /mnt/us/test/
cat /dev/fb0 > screen.fb0 &
pdf=`lsof | grep /mnt/us/documents | cut -c81- | sort -u`
./reader.lua "$pdf"
cat screen.fb0 > /dev/fb0
echo 1 > /proc/eink_fb/update_display