daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Mar 10th, 2011 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1 #!/bin/bash
  2.   2 export DIR='/home/karkusha/Pictures/Pictures/'
  3.   3 export NUMBER=$RANDOM
  4.   4 export TOTAL=0
  5.   5 for f in `ls $DIR`
  6.   6 do
  7.   7 let "TOTAL += 1"
  8.   8 done
  9.   9 let "NUMBER %= TOTAL"
  10.  10 export CURRENT=0
  11.  11 for f in `ls $DIR`
  12.  12 do
  13.  13 if [ $CURRENT = $NUMBER ]
  14.  14 then
  15.  15 /usr/bin/gconftool-2 -t string -s /desktop/gnome/background/picture_filename $DIR/$f
  16.  16 break
  17.  17 fi
  18.  18 let "CURRENT += 1"
  19.  19 done
  20. ~
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top