Auto-Rotation ein-ausschalten/nl

Auto-Rotatie in/uitschakelen via de Info toets in de rechter Pinbord kolom
De Auto-Rotatie kan men activeren via 'Info' -> Algemeen-> 'Rotatie' activeren/deactiveren.

Auto-Rotatie via een script in/uitschakelen
Bij Ausführen von Skripten wordt toegelicht hoe een script goed toegepast moet worden.

rotation.sh


 * 1) !/bin/bash

if [ -z "$1" ] ; then echo "usage: rotation.sh start|stop|toggle" exit 1 fi

ACTION="$1"

if [ "$ACTION" == "toggle" ] ; then

if ps ax | grep -v grep | grep tiitoo-g-sensor-daemon > /dev/null ; then ACTION="stop" else ACTION="start" fi fi

if [ "$ACTION" == "stop" ] ; then

ps ax | grep -v grep | grep tiitoo-rotated        | awk '{print $1}' | xargs --no-run-if-empty kill -STOP ps ax | grep -v grep | grep tiitoo-rotate-daemon  | awk '{print $1}' | xargs --no-run-if-empty kill -TERM ps ax | grep -v grep | grep tiitoo-gsensord       | awk '{print $1}' | xargs --no-run-if-empty kill -STOP ps ax | grep -v grep | grep tiitoo-g-sensor-daemon | awk '{print $1}' | xargs --no-run-if-empty kill -TERM echo "rotation stopped"

fi

if [ "$ACTION" == "start" ] ; then ps ax | grep -v grep | grep tiitoo-rotated | awk '{print $1}' | xargs --no-run-if-empty kill -CONT ps ax | grep -v grep | grep tiitoo-gsensord | awk '{print $1}' | xargs --no-run-if-empty kill -CONT echo "rotation started"

fi