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
  • 相关阅读:
    为什么说 Java 程序员必须掌握 Spring Boot ?(转)
    Vert.x 之 HelloWorld
    Vert.x Web 文档手册
    Vert.x Core 文档手册
    Android数据存储五种方式总结
    设置简单的定时
    自定义dialog
    Android DrawerLayout 高仿QQ5.2双向侧滑菜单
    Fragments碎片
    理解Fragment生命周期
  • 原文地址:https://www.cnblogs.com/blfshiye/p/3798964.html
Copyright © 2011-2022 走看看