2020-08-11 18:50:17 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Apply wallpaper on screen-change event
|
|
|
|
Requires=graphical-session.target
|
|
|
|
After=graphical-session.target
|
|
|
|
|
|
|
|
[Service]
|
2020-08-19 20:49:10 +01:00
|
|
|
Environment=FEH_OPTIONS="--no-fehbg --no-xinerama"
|
|
|
|
Environment=WALLPAPER=/home/frebib/pictures/lakesidesunrise.jpg
|
2020-09-26 14:12:01 +01:00
|
|
|
ExecStartPre=/bin/sh -c "exec feh $FEH_OPTIONS --bg-fill $WALLPAPER"
|
2020-08-19 20:49:10 +01:00
|
|
|
ExecStart=/bin/sh -c "xev -root -event randr 2>&1 | while awk -v RS=\\n\\n '{exit;}'; do echo 'Applying wallpaper'; feh $FEH_OPTIONS --bg-fill $WALLPAPER; done"
|
2020-08-11 18:50:17 +01:00
|
|
|
Restart=always
|
2020-09-26 14:12:01 +01:00
|
|
|
SyslogIdentifier=wallpaper
|
2020-08-23 01:16:54 +01:00
|
|
|
Slice=session.slice
|
2020-08-11 18:50:17 +01:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=desktop.target
|