Skip to content

Instantly share code, notes, and snippets.

@ob-ivan
Last active September 10, 2017 20:13
Show Gist options
  • Save ob-ivan/9ac677d13ca40c8a151c0229328295a3 to your computer and use it in GitHub Desktop.
Save ob-ivan/9ac677d13ca40c8a151c0229328295a3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Your wallpapers folder
picturesPath=/home/ivan/Wallpapers
# needed to be run from cron
export DISPLAY=:0
# change `username` with your user name
export XAUTHORITY=/home/ivan/.Xauthority
pcmanfm -w "$(find "$picturesPath" -type f | shuf -n1)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment