def get_current_rotation():
global rotations
# Extract the rotation from xrandr for the first connected screen (probably the main screen).
rotation = subprocess.check_output("xrandr | grep "+DISPLAY+" | cut -f 5 -d ' '", shell=True)
rotation = rotation.strip();
if rotation not in rotations:
rotation = rotations[0]
print "current rotation: "+rotation
return rotation
indicator-tablet-mode.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录