forked from colonelpanic/dotfiles
Merge branch 'master' of github.com:IvanMalison/dotfiles
This commit is contained in:
commit
1320c59a6c
25
dotfiles/lib/bin/xsettingsd-setup
Executable file
25
dotfiles/lib/bin/xsettingsd-setup
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# imalison-arch,DVI-D-0:HDMI-0:) dpi=144 ;;
|
||||||
|
*) dpi=${1:-144} ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Build xsettingsd.local
|
||||||
|
cp ~/.xsettingsd ~/.xsettingsd.local
|
||||||
|
echo Xft/DPI $(( $dpi * 1024 )) >> ~/.xsettingsd.local
|
||||||
|
|
||||||
|
# Signal xsettingsd
|
||||||
|
pid=$(xprop -name xsettingsd _NET_WM_PID 2> /dev/null | awk '{print $NF}')
|
||||||
|
if [ x"$pid" = x ]; then
|
||||||
|
xsettingsd -c ~/.xsettingsd.local &
|
||||||
|
else
|
||||||
|
kill -HUP $pid
|
||||||
|
fi
|
||||||
|
|
||||||
|
# # Also use xrdb for very old stuff (you know, LibreOffice)
|
||||||
|
# echo Xft.dpi: "$dpi" | xrdb -merge
|
Loading…
Reference in New Issue
Block a user