indicator-tablet-mode.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:indicator-tablet-mode 作者: Aerilius 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号