summaryrefslogtreecommitdiff
path: root/f7-script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'f7-script.sh')
-rwxr-xr-xf7-script.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/f7-script.sh b/f7-script.sh
index db4022f..55a2962 100755
--- a/f7-script.sh
+++ b/f7-script.sh
@@ -2,8 +2,8 @@
set -e
-INTERNAL=LVDS1
-EXTERNAL=HDMI1
+INTERNAL=$(xrandr --query | gawk '/^LVDS[0-9] connected /{ print $1; exit }')
+EXTERNAL=$(xrandr --query | gawk '!/^LVDS[0-9]/ && / connected /{print $1; exit }')
show_usage() {
cat <<END