Permalink
Browse files

Didn't notice there're more "finds"

Added the remaining wildcards~ (png and gif extensions need "*")
  • Loading branch information...
1 parent 7bac412 commit 3f45a0434dac076d12888d1e63673549fbfca538 Guillermo Pérez committed Dec 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 backdrop-randomizer
View
@@ -123,7 +123,7 @@ list() {
}
cycle() {
- find "${PIC_PATH}" -maxdepth "$MAXDEPTH" -name "*.jpg" -o -name "*.JPG" -o -name ".png" -o -name ".PNG" -o -name ".gif" -o -name ".GIF" > "$pic_database" 2>/dev/null
+ find "${PIC_PATH}" -maxdepth "$MAXDEPTH" -name "*.jpg" -o -name "*.JPG" -o -name "*.png" -o -name "*.PNG" -o -name "*.gif" -o -name "*.GIF" > "$pic_database" 2>/dev/null
howmany=$(cat "$pic_database" | wc -l)
}
@@ -136,7 +136,7 @@ randomize() {
# condition 1 is true
useit=$(sed -n "1 p" "$pic_database") && filename=$(basename $useit)
- find "${PIC_PATH}" -maxdepth "$MAXDEPTH" -name "*.jpg" -o -name "*.JPG" -o -name ".png" -o -name ".PNG" -o -name ".gif" -o -name ".GIF" > "$pic_database"
+ find "${PIC_PATH}" -maxdepth "$MAXDEPTH" -name "*.jpg" -o -name "*.JPG" -o -name "*.png" -o -name "*.PNG" -o -name "*.gif" -o -name "*.GIF" > "$pic_database"
sed -i "/$filename/d" "$pic_database" # exclude the one we just picked to create the illusion that we NEVER repeat :)
ln -sf "$useit" "$SLINK_DIR"/backdrop-randomizer.jpg
[[ ! -z $(pidof xfdesktop) ]] && DISPLAY=:0.0 /usr/bin/xfdesktop --reload

0 comments on commit 3f45a04

Please sign in to comment.