xinitrc/.config/srandrd.conf

12 lines
321 B
Bash
Executable File

#!/bin/bash
case "$SRANDRD_ACTION" in
"HDMI1 connected") xrandr --output HDMI1 --auto --right-of eDP1
xinput --map-to-output $(xinput list --id-only "ELAN Touchscreen") eDP1
pacmd set-default-sink 0;;
"HDMI1 disconnected") xrandr --output HDMI1 --off --output eDP1 --auto
pacmd set-default-sink 1;;
esac