#!/bin/sh STATE=`xrandr | grep "Current rotation" | grep normal | wc -c` if [ "$STATE" -gt 0 ] then screenwidth=640 screenheight=480 else screenheight=480 screenwidth=640 fi keyboardheight=150 size=36 xpos=0 ypos=$(($screenheight - $keyboardheight - $size)) geometry=${screenwidth}x${keyboardheight}+${xpos}+${ypos} if pidof xvkbd >/dev/null; then kill `pidof xvkbd` else xvkbd -no-keypad -geometry $geometry -dict /usr/share/dict/xvkbd.dic & fi