您的位置:首页 > 其它

使用命令xrandr设置当前系统的显示分辨率及显示的旋转脚本

2014-06-20 11:26 323 查看
/*********************************************************************
* Author  : Samson
* Date    : 06/15/2014
* Test platform:
*              Mint 15-3.8.13.13
*              GNU bash, version 4.2.45
* *******************************************************************/

#!/bin/bashecho "try to set 800x600" xrandr -s 8sleep 10echo "try to set 1680x1050"xrandr -s 2sleep 10echo "try to set 1440x900"xrandr -s 4sleep 10 echo "try to set 1280x1024"xrandr -s 3sleep 10echo "try to set 1024x768" xrandr -s 6sleep 10echo "try to set 1920x1080" xrandr -s 0sleep 10以上的-s后的參数值后跟的数值是相应的显示配置中的项从上至下的索引號,索引號从0開始,这个须要打开的你的电脑的“显示”属性配置对话框进行查看。例如以下图,若是xrandr -s 0相应的就不是 1920x1080,而是1600*900了。

下面是使用命令进行显示器旋转的配置脚本:echo "try to set left"xrandr -o leftsleep 3echo "try to set right"xrandr -o rightsleep 3echo "try to set inverted "xrandr -o invertedsleep 3echo "try to set normal"xrandr -o normalsleep 3[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: