Every day a new picture from: Astronomy Picture of the Day
wallpaper-switch.go
- the acctual applicationwallpaper-switch.service
- systemd servicewallpaper-switch.timer
- systemd timer
wallpaper-switch
checks the RSS feed from NASA's Astronomy Picture of the Day and, for a new content, sets a desktop background using gsettings
command.
It stores its status (file status.toml
) and the current desktop wallpaper in "XDG_DATA_HOME/wallpaper-switch"
or, if the envrionment variable is not set, in ".local/share/wallpaper-switch"
.
- Install Go (if you don't have it):
sudo pacman -S go
Create a directory to store go source code fetched from other repositories
mkdir -p ~/repos/gosource
and add it to the $GOPATH
environment variable.
- Install dependencies:
go get -u github.com/naoina/toml
go get -u github.com/nu7hatch/gouuid
go get -u golang.org/x/net/html
- compile:
go build wallpaper-switch.go
-
place files
wallpaper-switch.timer
andwallpaper-switch.service
in~/.local/share/systemd/user
-
modify variable
ExecStart
inwallpaper-switch.service
- it should point to a binary of wallpaper-switch.
Then, execute the following commands:
systemctl --user enable wallpaper-switch.timer
systemctl --user start wallpaper-switch.timer