#2 Added systemd
parent
ef3316a81c
commit
d328e775a7
31
README.md
31
README.md
|
@ -47,9 +47,36 @@ reddit-wallpaper /backdrop/screen0/monitorHDMI-A-0/workspace0/last-image awww
|
|||
|
||||
*Coming soon*
|
||||
|
||||
## Automation
|
||||
## Systemd
|
||||
|
||||
**Coming soon**
|
||||
Copy the service file to your systemd configuration directory:
|
||||
|
||||
```sh
|
||||
sudo cp /usr/local/src/reddit-wallpaper/reddit-wallpaper@.service /etc/systemd/system
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
Now you can run the service with `sudo systemctl start reddit-wallpaper@awww`. You can also configure systemd timers. For example, you can use this timer to set the wallpaper to the top post on r/spaceporn every night at 8pm:
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Change desktop wallpaper to r/spaceporn's top evenings at 8pm
|
||||
|
||||
[Timer]
|
||||
OnCalendar=20:00
|
||||
Unit=reddit-wallpaper@spaceporn.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Save that to `/etc/systemd/system/space-wallpaper.timer` and then run:
|
||||
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start space-wallpaper.timer
|
||||
sudo systemctl enable space-wallpaper.timer
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Set desktop wallpaper to %i reddit images
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/reddit-wallpaper /backdrop/screen0/monitorHDMI-A-0/workspace0/last-image %i
|
Loading…
Reference in New Issue