Quote:
Originally Posted by knc1
MrDCorn has a better idea.
When this version is considered stable (as in no code changes for xxyy time) -
We can wrap it in an update_*.bin package.
The install script of the package can selectively install the file(s) that match the Kindle model on which the updater is running.
This will also probably get rid of the keyboard flashing during application start-up when the code has to switch from the default keyboard.
|
That's clever idea, but the gain will be minimal. Average images folder size is 9 KB plus 10 KB of xml config. Removing two layouts you will save 40 KB.
Neither will it solve flashing problem. As we specify keyboard layout on command line kterm will just start with given config instead of default one. It won't be switched later.
I don't quite get what problems it could solve, but if there is need for
kterm.sh script to accept the arguments that will be passed to kterm, the patch is trivial.
Code:
#!/bin/sh
EXTENSION=/mnt/us/extensions/kterm
DPI=`cat /var/log/Xorg.0.log | grep DPI | sed -n 's/.*(\([0-9]\+\), [0-9]\+).*/\1/p'`
#use different layouts for high resolution devices
if [ ${DPI} -gt 290 ]; then
PARAM="-l ${EXTENSION}/layouts/keyboard-300dpi.xml"
elif [ ${DPI} -gt 200 ]; then
PARAM="-l ${EXTENSION}/layouts/keyboard-200dpi.xml"
fi
${EXTENSION}/bin/kterm ${PARAM} "$@"