Skip to content

Instantly share code, notes, and snippets.

@qizhihere
Created July 9, 2015 01:59
Show Gist options
  • Save qizhihere/bf5117c5cbd80d109019 to your computer and use it in GitHub Desktop.
Save qizhihere/bf5117c5cbd80d109019 to your computer and use it in GitHub Desktop.
randomly pick a wallpaper from one or more directory(or directories)
#!/usr/bin/env bash
WALLPAPER_DIR="/home/xxx/Pictures/Wallpapers/normal/"
find "$WALLPAPER_DIR/" -type f -regex ".*\.\(png\|jpe?g\)" |
shuf -n1 | xargs -I__ feh --bg-scale "__"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment