Advertisement
Guest User

Untitled

a guest
Sep 11th, 2010
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #!/bin/bash          
  2.  
  3. lim=`ls -1 $DIR_WALLPAPERS | wc -l`
  4.  
  5. number=$[ ($RANDOM % $lim) + 1]
  6.  
  7. count=1
  8.  
  9. for file in $DIR_WALLPAPERS/*; do
  10.     if [ $count = $number ];then
  11.         feh --bg-scale $file
  12.         break
  13.     fi
  14.     count=$[$count+1]
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement