From f5954001cfdddf9d4006a78e2447879723653ab5 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 5 Aug 2015 19:09:39 +0200 Subject: [PATCH] xsettings: handle connected but unused screens as well --- bin/xsettingsd-setup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/xsettingsd-setup b/bin/xsettingsd-setup index 259ed68..088249b 100755 --- a/bin/xsettingsd-setup +++ b/bin/xsettingsd-setup @@ -2,7 +2,9 @@ # Don't try to guess DPI. For a laptop, we don't want the same DPI as # for an external screen. Just hardcode stuff... -case $(hostname),$(xrandr --current | sed -n 's/\([^ ]*\) connected .*/\1/p' | sort | tr '\n' ':') in +case $(hostname),$(xrandr --current | \ + sed -n 's/\([^ ]*\) connected .*[0-9][0-9]*x[0-9][0-9]*+[0-9][0-9]*+[0-9][0-9]* .*/\1/p' | \ + sort | tr '\n' ':') in zoro,eDP1:) dpi=144 ;; *) dpi=96 ;; esac