View Single Post
Old 09-01-2016, 11:21 AM   #16
encol
Evangelist
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 765432
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
Quote:
Originally Posted by knc1 View Post
Re-read your script.
What is it suppose to do if the screen is NOT gt 600 pixels?

Hint: Right now, it is doing just what you told it to do if the test fails.
Right!
Copy & Paste is the best friend/worst enemy of a programmer
(I copied it from kterm.sh script)

then try this:
Code:
#!/bin/sh

EXPORT LD_LIBRARY_PATH=/mnt/us/local/lib

EXTENSION=/mnt/us/extensions/kterm


WIDTH=`xwininfo -root|grep Width|cut -d ':' -f 2`
# use wider keyboard layout for screen width greater than 600 px
if [ ${WIDTH} -gt 600 ]; then
  PARAM="-l ${EXTENSION}/layouts/keyboard-wide.xml -e /mnt/us/local/mc/bin/mc"
else
  PARAM="-e /mnt/us/local/mc/bin/mc"
fi

${EXTENSION}/bin/kterm ${PARAM}

# when started from launcher kterm doesn't kill keyboard (why?) so:
killall matchbox-keyboard
if you launch from kterm:
Code:
/mnt/us/local/mc/bin/mc
mc is loaded?

Last edited by encol; 09-01-2016 at 11:23 AM.
encol is offline   Reply With Quote