wallpaperctl/readme.md

102 lines
2.6 KiB
Markdown
Raw Normal View History

2022-04-10 20:50:17 +00:00
# Wallpaperctl
2021-05-13 21:46:12 +00:00
- **Note:** Adjust paths as applicable to the desired OS.
- **Note:** The "$" represents the terminal prompt.
2022-04-10 20:50:17 +00:00
- **Note:** Verified to work on Arch Linux with Gnome v3.14 to v42.
2021-05-13 21:46:12 +00:00
## Installation Instructions
2022-04-10 20:50:17 +00:00
1. Download "wallpaperctl.service", "wallpaperctl.timer" and "gnome_rotate_wallpaper".
2021-05-13 21:46:12 +00:00
2. Move the 3 files to where Systemd user files are stored.
```bash
2022-04-10 20:50:17 +00:00
$ mv wallpaperctl.service wallpaperctl.timer /etc/systemd/user/
2021-05-13 21:46:12 +00:00
```
3. Move the BASH script "gnome_rotate_wallpaper".
```bash
$ mv gnome_rotate_wallpaper /usr/local/bin/
```
4. Set execute permissions.
```bash
$ chmod +x /usr/local/bin/gnome_rotate_wallpaper
```
5. Enable the timer.
```bash
2022-04-10 20:50:17 +00:00
$ systemctl --user enable wallpaperctl.timer
2021-05-13 21:46:12 +00:00
```
6. Verify the timer is enabled.
```bash
$ systemctl --user list-unit-files
2022-04-10 20:50:17 +00:00
wallpaperctl.service disabled
wallpaperctl.timer enabled
2021-05-13 21:46:12 +00:00
2 unit files listed.
```
7. Start the timer.
```bash
2022-04-10 20:50:17 +00:00
$ systemctl --user start wallpaperctl.timer
2021-05-13 21:46:12 +00:00
```
8. Verify the timer has been started.
```bash
$ systemctl --user list-timers
2022-04-10 20:50:17 +00:00
NEXT LEFT LAST PASSED UNIT ACTIVATES
Thu 2016-03-10 18:49:00 CST 1s left Thu 2016-03-10 18:48:56 CST 1s ago wallpaperctl.timer wallpaperctl.service
2021-05-13 21:46:12 +00:00
1 timers listed.
Pass --all to see loaded but inactive timers, too.
```
## User Configuration
### Change the default wallpaper directory.
1. Create the required directories.
```bash
$ mkdir ~/.config/systemd ~/.config/systemd/user
```
2. Create the configuration file. Replace "username" with applicable value.
```bash
2022-04-10 20:50:17 +00:00
$ nano ~/.config/systemd/user/wallpaperctl.conf
2021-05-13 21:46:12 +00:00
```
WALLPAPER_DIR=/home/username/Pictures/wallpaper
### Set the Interval to When the Wallpaper Changes.
Create the timer file and then change the "OnCalendar" value to the desired interval. Refer to [ArchLinux: systemd/Timers](https://wiki.archlinux.org/index.php/Systemd/Timers#Realtime_timer) for further details.
1. Create the required directories.
```bash
$ mkdir ~/.config/systemd ~/.config/systemd/user
```
2. Create the configuration file.
```bash
2022-04-10 20:50:17 +00:00
$ nano ~/.config/systemd/user/wallpaperctl.timer
2021-05-13 21:46:12 +00:00
```
```
[Unit]
2022-04-10 20:50:17 +00:00
Description=Wallpaperctl - Systemd GNOME wallpaper changer
2021-05-13 21:46:12 +00:00
[Timer]
OnCalendar=*:0/1
Persistent=true
2022-04-10 20:50:17 +00:00
Unit=wallpaperctl.service
2021-05-13 21:46:12 +00:00
[Install]
2022-04-10 20:50:17 +00:00
WantedBy=wallpaperctl.service
2021-05-13 21:46:12 +00:00
```
2022-04-10 19:48:09 +00:00
## Available picture-options
2021-05-13 21:46:12 +00:00
- none
- wallpaper
- centered
- scaled
- stretched
- zoom
- spanned
## External Links
* https://wiki.archlinux.org/index.php/Systemd/User
* https://wiki.archlinux.org/index.php/Systemd/Timers
* https://major.io/2015/02/11/rotate-gnome-3s-wallpaper-systemd-user-units-timers/
* https://stackoverflow.com/questions/10374520/gsettings-with-cron