forked from colonelpanic/dotfiles
[Linux] Add dpi setting for macbook air
This commit is contained in:
parent
b97c83f6a6
commit
9d94a09b58
@ -1,13 +1,21 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
# Don't try to guess DPI. For a laptop, we don't want the same DPI as
|
dpi="$1"
|
||||||
# for an external screen. Just hardcode stuff...
|
|
||||||
case $(hostname),$(xrandr --current | \
|
|
||||||
|
if [ -z $dpi ]; then
|
||||||
|
# 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' | \
|
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
|
sort | tr '\n' ':') in
|
||||||
# imalison-arch,DVI-D-0:HDMI-0:) dpi=144 ;;
|
# imalison-arch,DVI-D-0:HDMI-0:) dpi=144 ;;
|
||||||
*) dpi=${1:-144} ;;
|
imalison-uber-loaner,eDP1:) dpi=72 ;;
|
||||||
esac
|
*) dpi=96 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Setting dpi to $dpi"
|
||||||
|
|
||||||
# Build xsettingsd.local
|
# Build xsettingsd.local
|
||||||
cp ~/.xsettingsd ~/.xsettingsd.local
|
cp ~/.xsettingsd ~/.xsettingsd.local
|
||||||
@ -22,4 +30,4 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# # Also use xrdb for very old stuff (you know, LibreOffice)
|
# # Also use xrdb for very old stuff (you know, LibreOffice)
|
||||||
# echo Xft.dpi: "$dpi" | xrdb -merge
|
echo Xft.dpi: "$dpi" | xrdb -merge
|
||||||
|
Loading…
Reference in New Issue
Block a user