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

@ -1,8 +0,0 @@
#!/bin/sh
exec compton \
--backend glx \
--xrender-sync \
--xrender-sync-fence \
--vsync opengl-swc \
--paint-on-overlay

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

View file

@ -42,9 +42,9 @@ case "$1" in
xdotool key XF86AudioStop
# Then, lock screen
echo "$(date --rfc-3339=seconds) $me: lock: lock screen"
pkill compton
systemctl --user stop compton@$(systemd-escape -- "$DISPLAY").service
i3lock -n -e -i $HOME/.cache/awesome/current-wallpaper.png -t -f
~/.config/awesome/bin/compton &
systemctl --user start compton@$(systemd-escape -- "$DISPLAY").service
echo "$(date --rfc-3339=seconds) $me: lock: unlock screen"
;;
esac