forked from dianariyanto/virtual-display-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vdl-monitor
executable file
·35 lines (29 loc) · 937 Bytes
/
vdl-monitor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
source vdl-monitor.conf
if [ -e /usr/share/X11/xorg.conf.d/20-intel.conf ]
then
echo "Start configuration"
xrandr --addmode VIRTUAL1 $screen1
sleep 3s
echo "add resolution $screen1"
xrandr --output VIRTUAL1 --mode $screen1 --left-of LVDS1
sleep 3s
echo "start display VIRTUAL1 to $screen1"
#xrandr --addmode VIRTUAL2 $screen2
#sleep 3s
#echo "add resolution $screen2"
#xrandr --output VIRTUAL2 --mode $screen2 --right-of LVDS1
#sleep 3s
#echo "start display VIRTUAL2 to $screen2"
# via https://bbs.archlinux.org/viewtopic.php?id=180904
xrandr
sleep 3s
echo ""
echo "Done, Check your VDL Monitor on System Setting > Display"
#sleep 10s
else
cp 20-intel.conf /usr/share/X11/xorg.conf.d/20-intel.conf
# via https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
echo "[vdl-monitor] You must reboot or relogin current session to finish setup"
sleep 10s
fi