ext display type

This commit is contained in:
ackman678
2019-06-20 20:38:14 -07:00
parent d8bb5eb774
commit a8f4d6092b
2 changed files with 15 additions and 3 deletions

16
hdmi.sh
View File

@@ -1,7 +1,19 @@
#!/bin/bash
#setup external hdmi display if connected, else ensure the display is off
if [ "$1" == "-h" ] ; then
echo "
hdmi - setup external display if connected, else ensure the display is off
- run 'xrandr' to see display interface names for input
Usage: hdmi.sh
hdmi.sh DP1
"
exit 0
fi
set -e
intern=eDP1
extern=HDMI1
extern=${1:-HDMI1}
if xrandr | grep "$extern connected"; then
xrandr --output "$intern" --auto --output "$extern" --auto --right-of "$intern"