From 5ab1f901dd9c1e3418dbd729862c5f08a8bc1aec Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 16 Jan 2020 21:31:23 +0100 Subject: [PATCH] xsettingsd: use autorandr current profile --- bin/xsettingsd-setup | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/xsettingsd-setup b/bin/xsettingsd-setup index 8ecd988..7acda84 100755 --- a/bin/xsettingsd-setup +++ b/bin/xsettingsd-setup @@ -2,14 +2,11 @@ # 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 .*[0-9][0-9]*x[0-9][0-9]*+[0-9][0-9]*+[0-9][0-9]* .*/\1/p' | \ - sort | tr '\n' ':') in - zoro,eDP-1:) dpi=144 ;; - guybrush,eDP-1:) dpi=144 ;; - neo,HDMI-1:HDMI-2:) dpi=96 ;; +case $(hostname),$(autorandr --current) in + zoro,default) dpi=144 ;; + guybrush,default) dpi=144 ;; neo,*) dpi=192 ;; - *) dpi=96 ;; + *,*) dpi=96 ;; esac # Get xsettingsd PID