View Single Post
Posts: 255 | Thanked: 107 times | Joined on Nov 2010
#1179
Originally Posted by llBlackenedll View Post
I have tested this but just re-wrote it on my computer so sorry for any typos. Just get queenbeecon to run this:

Code:
sed -e 's/forcerotation=0/tmpstr/' -e 's/forcerotation=1/forcerotation=0/' -e 's/tmpstr/forcerotation=1/' /usr/share/hildon-desktop/transitions.ini > tmpFile
mv tmpFile /usr/share/hildon-desktop/transitions.ini
This code looks through transitions.ini and flips the forcerotation variable between 1 and 0. So all you'd have to do is copy that text into a file, chmod +x it, and tell queenbeecon to use it.

There's probably a much better way of doing this so that it prints out what state it has changed to, and could also be changed to add the line if it isn't there, but I didn't have time so this is a pretty basic flipper for now.
probably a stupid question but why write to tmpfile first and not directly to transitions.ini?

btw, wouldn't that not work? most of those values also require a killall hildon-desktop after