From 994f36fa86f9e53ed08a608004aafd35b3ca2970 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Mon, 14 Apr 2014 12:52:13 +0300 Subject: [PATCH] Skeleton for disp script --- skel/disp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 skel/disp diff --git a/skel/disp b/skel/disp new file mode 100644 index 0000000..e4a3588 --- /dev/null +++ b/skel/disp @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ -z "$1" ] +then + echo 'Choose display mode: + 1) Laptop auto + 2) Presentation (2nd arg for gamma correction) + 3) Workstation with 2nd screen + 4) External display only + ' + read i +else + i=$1 +fi +if [ -z "$2" ] +then g=1 +else g=$2 +fi +LAPTOP=eDP1 +ANALOG=DP2 +DIGITAL=DP2 + +case $i in + 1) xrandr --output $LAPTOP --auto --gamma $g:$g:$g --output $ANALOG --off --output $DIGITAL --off ;; + 2) xrandr --output $LAPTOP --mode 1024x768 --pos 0x0 --output $ANALOG --mode 1024x768 --pos 0x0 --gamma $g:$g:$g ;; + 3) xrandr --output $LAPTOP --mode auto --output $DIGITAL --mode auto --right-of $LAPTOP ;; + 4) xrandr --output $LAPTOP --off --output $DIGITAL --mode auto ;; +esac +