To add the slideshow wallpaper for i3wm, run the commands:
sudo apt install feh
cd ~/apps
git clone git@github.com:thejandroman/bing-wallpaper.git
Then run crontab -e
and append:
0 3 * * * bash apps/bing-wallpaper/bing-wallpaper.sh
0 4 * * 1-5 DISPLAY=:0 feh --bg-fill -z $HOME/Pictures/bing-wallpapers/*.*
Get the value of DISPLAY
from the output of env|grep DISPLAY
.
This command is valid only in tty connected directly with the X window
via keyboard.
It will be invalid when executed in a remote shell via SSH.
The folder $HOME/Pictures/bing-wallpapers is the default download path for thejandroman/bing-wallpaper.
To change the wallpaper manually, add a script:
cat << EOF > ~/.local/bin/wapa
DISPLAY=:0 feh --bg-fill -z $HOME/Pictures/bing-wallpapers/*.*
EOF
chmod 755 ~/.local/bin/wapa
Now you can change the wallpaper anytime in an empty workspace
with Ald-d, wapa
.
Note:
45 3 * * 1-5 feh --bg-scale -r -z Pictures/**/{*.jpg,*.png}
does not work.
Maybe the {}
syntax in path is not supported?