Skeleton for disp script

This commit is contained in:
ville rantanen
2014-04-14 12:52:13 +03:00
parent dfca7b09f7
commit 994f36fa86

29
skel/disp Normal file
View File

@@ -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