zoukankan      html  css  js  c++  java
  • 使用命令xrandr设置当前系统的显示分辨率及显示的旋转脚本

    /*********************************************************************
     * Author  : Samson
     * Date    : 06/15/2014
     * Test platform:
     *              Mint 15-3.8.13.13
     *              GNU bash, version 4.2.45
     * *******************************************************************/

    #!/bin/bash
    echo "try to set 800x600"
     xrandr -s 8
    sleep 10
    echo "try to set 1680x1050"
    xrandr -s 2
    sleep 10
    echo "try to set 1440x900"
    xrandr -s 4
    sleep 10
    echo "try to set 1280x1024"
    xrandr -s 3
    sleep 10
    echo "try to set 1024x768"
     xrandr -s 6
    sleep 10
    echo "try to set 1920x1080"
     xrandr -s 0
    sleep 10
    以上的-s后的參数值后跟的数值是相应的显示配置中的项从上至下的索引號,索引號从0開始,这个须要打开的你的电脑的“显示”属性配置对话框进行查看。例如以下图,若是xrandr -s 0相应的就不是 1920x1080,而是1600*900了。
    下面是使用命令进行显示器旋转的配置脚本:
    echo "try to set left"
    xrandr -o leftsleep 3
    echo "try to set right"
    xrandr -o right
    sleep 3
    echo "try to set inverted "
    xrandr -o inverted
    sleep 3
    echo "try to set normal"
    xrandr -o normal
    sleep 3
  • 相关阅读:
    OO第一单元总结
    [软件工程]提问回顾与个人总结
    结对项目-最长单词链总结
    [软件工程]第一次阅读作业
    [软件工程] 第0次作业
    提问回顾与个人总结
    结对作业博客
    软工第1次个人作业
    软工第0次个人作业
    OO第四次总结
  • 原文地址:https://www.cnblogs.com/blfshiye/p/3798964.html
Copyright © 2011-2022 走看看