13 lines
403 B
Bash
Executable File
13 lines
403 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
case "$SRANDRD_ACTION" in
|
|
"HDMI-1 connected") xrandr --output HDMI-1 --auto --right-of eDP-1
|
|
xinput --map-to-output $(xinput list --id-only "ELAN Touchscreen") eDP1
|
|
pacmd set-default-sink 0;;
|
|
"HDMI-1 disconnected") xrandr --output HDMI-1 --off --output eDP-1 --auto
|
|
xinput --map-to-output $(xinput list --id-only "ELAN Touchscreen") eDP1
|
|
pacmd set-default-sink 1;;
|
|
esac
|
|
|