Add conditions for disconnected HDMI on dtarchaio

This commit is contained in:
David Thurstenson 2017-02-16 17:29:24 -06:00
parent 1698c53089
commit 112ced7f3d
1 changed files with 14 additions and 4 deletions

View File

@ -20,12 +20,14 @@ case "$(hostname)" in
hdmi="HDMI-1"
case "$SRANDRD_ACTION" in
"$hdmi connected") xrandr --output $hdmi --auto --right-of $mainoutput
"$hdmi connected")
xrandr --output $hdmi --auto --right-of $mainoutput
maptouchscreen "$tsid" "$mainoutput"
setpasink hdmi
;;
"$hdmi disconnected") xrandr --output $hdmi --off --output $mainoutput --auto
"$hdmi disconnected")
xrandr --output $hdmi --off --output $mainoutput --auto
maptouchscreen "$tsid" "$mainoutput"
setpasink analog
;;
@ -37,8 +39,16 @@ case "$(hostname)" in
mainoutput="eDP1"
hdmi="HDMI1"
case "$SRANDRD_ACTION" in
"$hdmi connected")
xrandr --output $mainoutput --auto --output $hdmi --right-of $mainoutput
maptouchscreen "$tsid" "$mainoutput"
;;
"$hdmi disconnected")
xrandr --output $mainoutput --auto
maptouchscreen "$tsid" "$mainoutput"
;;
esac
;;
esac