Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Random Wallpaper Bash Script

Name: Anonymous 2009-05-02 21:20

Here is my piece of code for that; Nice code?

#!/bin/bash

DIRBG=~/Yo/walls/
PROG=feh
PARAM="--bg-scale"

IFS=$'\x0A'$'\x0D'
MYBG=(`ls "$DIRBG"| sed -e 's/ /\\ /g' | grep -P 'jpe?g|png|gif|bmp$'`)
rnd=$(($RANDOM%${#MYBG[@]}))
$PROG "$PARAM" ${DIRBG}${MYBG[$rnd]}
unset IFS

Name: Anonymous 2009-05-03 13:52

>>2
But is very useful :}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List