19 lines
398 B
Bash
19 lines
398 B
Bash
#!/bin/bash
|
|
tsid="ELAN Touchscreen"
|
|
mainoutput="eDP-1"
|
|
hdmi="HDMI-1"
|
|
|
|
case "$SRANDRD_ACTION" in
|
|
"$hdmi connected")
|
|
xrandr --output $hdmi --auto --right-of $mainoutput
|
|
maptouchscreen "$tsid" "$mainoutput"
|
|
setpasink hdmi
|
|
;;
|
|
|
|
"$hdmi disconnected")
|
|
xrandr --output $hdmi --off --output $mainoutput --auto
|
|
maptouchscreen "$tsid" "$mainoutput"
|
|
setpasink analog
|
|
;;
|
|
esac
|