
def slide(id,obj):
f = open(slidestatus,'r')
status = f.read()
f.close()
if status == "closed\n":
new_orientation = "closed"
rotate(new_orientation)
elif status == "open\n":
new_orientation = "open"
rotate(new_orientation)
def rotate(new_orientation):
orientation = client.get_string('/apps/rotate/orientation')
if new_orientation == "power":
if orientation == "right":
client.set_string('/apps/rotate/orientation',"normal")
rotate='DISPLAY=:0.0 /usr/bin/xrandr -o normal'
xmodmap_conf='/usr/lib/sliderotate/normal.xmodmap'
elif orientation == "normal":
client.set_string('/apps/rotate/orientation',"right")
rotate='DISPLAY=:0.0 /usr/bin/xrandr -o right'
xmodmap_conf='/usr/lib/sliderotate/right.xmodmap'
| The Following User Says Thank You to jjstewart For This Useful Post: | ||


