systemd: tentative to manage session with systemd

To me, I think it was cleaner to have a parameter with the current
display. This way, the session is specific to the current display. It
seems BindsTo doesn't think this way.
This commit is contained in:
Vincent Bernat 2020-01-19 18:36:36 +01:00
parent d5b72851ec
commit ae691bb025
20 changed files with 132 additions and 82 deletions

View file

@ -9,9 +9,6 @@ case $(hostname),$(autorandr --current --skip-options gamma) in
*,*) dpi=96 ;;
esac
# Get xsettingsd PID
pid=$(xprop -name xsettingsd _NET_WM_PID 2> /dev/null | awk '{print $NF}')
change() {
# Build xsettingsd.local
{
@ -23,11 +20,7 @@ change() {
} > ~/.xsettingsd
# Signal xsettingsd
if [ x"$pid" = x ]; then
xsettingsd -c ~/.xsettingsd &
else
kill -HUP $pid
fi
systemctl --user reload xsettingsd@$(systemd-escape -- "$DISPLAY").service
# Also use xrdb for very old stuff (you know, LibreOffice)
echo Xft.dpi: $dpi | xrdb -merge