xsettingsd: use autorandr current profile

This commit is contained in:
Vincent Bernat 2020-01-16 21:31:23 +01:00
parent 556aa785e8
commit 5ab1f901dd

View file

@ -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