xsettings: use some helper to configure xsettingsd

This commit is contained in:
Vincent Bernat 2014-09-17 10:39:22 +02:00
parent 3743b30f3a
commit f10cb9fb84
3 changed files with 15 additions and 7 deletions

14
bin/xsettingsd-setup Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
# Build xsettingsd.local
cp ~/.config/awesome/xsettingsd ~/.config/awesome/xsettingsd.local
echo Xft/DPI $(( $(xdpyinfo | \
awk '$1 ~ /resolution:/ { print $2 }' | sed 's/x.*//') * 1024 )) >> ~/.config/awesome/xsettingsd.local
# Signal xsettingsd
pid=$(xprop -name xsettingsd _NET_WM_PID 2> /dev/null | awk '{print $NF}')
if [ -n $pid ]; then
kill -HUP $pid
else
xsettingsd -c ~/.config/awesome/xsettingsd.local &
fi

View file

@ -40,12 +40,7 @@ case "$(hostname)" in
;;
esac
if [ -f ~/.config/awesome/xsettingsd.$(hostname) ]; then
cat ~/.config/awesome/xsettingsd ~/.config/awesome/xsettingsd.$(hostname) > ~/.config/awesome/xsettingsd.local
else
cp ~/.config/awesome/xsettingsd ~/.config/awesome/xsettingsd.local
fi
xsettingsd -c ~/.config/awesome/xsettingsd.local &
. ~/.config/awesome/bin/xsettingsd-setup
xss-lock start &
inputplug -0 -c ~/.config/awesome/bin/input-event 2> /dev/null
rfkill block all 2> /dev/null

View file

@ -1 +0,0 @@
Xft/DPI 147456