random desktop wallpaper
Dependencies:
- this github project
- feh (sudo apt install feh)
- i3wm
Setup:
first off the settings file of wpr(.config/wallpaper-reddit/wallpaper-reddit.conf):
[Options]
subs = earthporn,spaceporn,cyberpunk,digitalpainting,wallpapers,alternativeart
minwidth = 1920
minheight = 1080
maxlinks = 20
resize = True
random = True
[Startup]
attempts = 0
interval = 0
[Save]
directory = ~/Pictures/Wallpaper-reddit
next the script(.config/i3/wpr.sh):
#!/bin/bash
rm ~/Pictures/Wallpaper-reddit/wallpaper0.jpg
wallpaper-reddit --random
wallpaper-reddit --save
feh --bg-scale /home/hisfantor/Pictures/Wallpaper-reddit/wallpaper0.jpg
and implement in i3wm(.config/i3/config):
exec_always --no-startup-id ~/.config/i3/wpr.sh
and just for fun a bash alias(.bash_aliases):
alias wpr='~/.config/i3/wpr.sh'
Explanation:
- startup of wpr is set off because i3 calls it every time it restarts
- the script deletes the last image which is called wallpaper0.jpg by wpr
- than it downloads the first best image from one of the subs
- it saves/downloads the image, which will be wallpaper0.jpg again
- feh sets the new image (location is defined in the wpr config)
- last i3 just starts the script whenever it starts or reloads($mod+r)
- a bash alias if I want to load an other image without reloading i3(consider it needs some seconds to download so don’t spam it, otherwise wpr will download multiple images and name them wallpaper1, wallpaper2, …)