Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #!/bin/bash
- 2 export DIR='/home/karkusha/Pictures/Pictures/'
- 3 export NUMBER=$RANDOM
- 4 export TOTAL=0
- 5 for f in `ls $DIR`
- 6 do
- 7 let "TOTAL += 1"
- 8 done
- 9 let "NUMBER %= TOTAL"
- 10 export CURRENT=0
- 11 for f in `ls $DIR`
- 12 do
- 13 if [ $CURRENT = $NUMBER ]
- 14 then
- 15 /usr/bin/gconftool-2 -t string -s /desktop/gnome/background/picture_filename $DIR/$f
- 16 break
- 17 fi
- 18 let "CURRENT += 1"
- 19 done
- ~
Advertisement
Add Comment
Please, Sign In to add comment