Skip to content

Instantly share code, notes, and snippets.

@bytepossum
Created August 27, 2015 14:39
Show Gist options
  • Save bytepossum/030dc49267fd9d950296 to your computer and use it in GitHub Desktop.
Save bytepossum/030dc49267fd9d950296 to your computer and use it in GitHub Desktop.
Bash script to set random wallpaper from directory using feh
#!/bin/bash
WLPDIR="$HOME/images/wallpapers/"
files=($WLPDIR*)
wlpfile=${files[RANDOM % ${#files[@]}]}
printf "Setting wallpaper to %s\n" "$wlpfile"
feh --bg-fill "$wlpfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment