wallpaper: replace lua timer by a systemd timer

This commit is contained in:
Vincent Bernat 2020-02-05 08:16:27 +01:00
parent 66d130e702
commit a528e2f242
6 changed files with 25 additions and 27 deletions

View file

@ -6,6 +6,7 @@ After=compton@%i.service
After=xsettingsd@%i.service
After=tmux.service
Before=nm-applet@%i.service
Before=wallpaper@%i.service
[Service]
Environment=DISPLAY=%I

View file

@ -1,14 +1,16 @@
[Unit]
Description=Graphical user session for %I
StopWhenUnneeded=yes
Wants=awesome@%i.service
Wants=autorandr@%i.service
Wants=awesome@%i.service
Wants=compton@%i.service
Wants=inputplug@%i.service
Wants=misc-x@%i.service
Wants=nm-applet@%i.service
Wants=policykit-agent@%i.service
Wants=redshift@%i.service
Wants=wallpaper@%i.service
Wants=wallpaper@%i.timer
Wants=xiccd@%i.service
Wants=xsettingsd@%i.service
Wants=xss-lock@%i.service

View file

@ -0,0 +1,14 @@
[Unit]
Description=Build a wallpaper for %I
PartOf=graphical-session@%i.target
[Service]
Environment=DISPLAY=%I
Environment=WALLPAPER_DIRECTORY=%h/.config/awesome/wallpapers
Environment=WALLPAPER_OUTPUT=%h/.cache/awesome/current-wallpaper.png
ExecStart=%h/.config/awesome/bin/build-wallpaper --crop \
--directory $WALLPAPER_DIRECTORY \
--target $WALLPAPER_OUTPUT
ExecStart=/usr/bin/fvwm-root -r $WALLPAPER_OUTPUT
Type=oneshot
RemainAfterExit=false

7
systemd/wallpaper@.timer Normal file
View file

@ -0,0 +1,7 @@
[Unit]
Description=Wallpaper rotation for %I
PartOf=graphical-session@%i.target
[Timer]
OnUnitActiveSec=1h
RandomizedDelaySec=10m