Code Dump: Core.sh and Startconky.sh

Used to randomly select from several wallpapers and apply a specific conky theme to it.

core.sh

“`bash
#!/bin/sh TOTAL=$(ls /home/michael/.conky/ | grep png | wc -l) if [ “x$1” != “x” ] then if [ $1 -gt -1 ] && [ $1 -lt $(ls /home/michael/.conky/| grep png | wc -l) ] then URAND=0 RANDER=$1 else echo INVALID NUMBER URAND=1 fi else URAND=1 fi if [ $URAND = 1 ] then RANDER=$(echo “$(/home/michael/apps/rand -n) % $TOTAL” | bc) fi echo $RANDER gsettings set org.gnome.desktop.background picture-uri file:///home/michael/.conky/core$RANDER.png cp /home/michael/.conkyrc$RANDER /home/michael/.conkyrc
“`

startconky.sh

“`bash
cat startconky #!/bin/bash while [ true ] do /home/michael/apps/core.sh sleep 30; conky & sleep 30m sudo killall conky done
“`