#!/bin/sh touch ~/.rotation if [ $(cat ~/.rotation) -eq 1 ] ; then xrandr -o normal echo 0 > ~/.rotation else xrandr -o left echo 1 > ~/.rotation fi