JDAIII
March 4th, 2015, 05:09 PM
First things first, I'm on Ubuntu Gnome 14.10 and I'm using zsh as my shell. I got this script from another forum and it worked for me on 13.10 and 14.04, but I cannot figure out why it is not working now. I placed this script in it's own file ~/.backgrounds.sh and I set it with +x owned by my user. And in my ~/.zshrc file I have the command EXEC=/home/jd/.backgrounds.sh under my aliases and above a function, all of which work perfectly. This does not appear to be executing though and I'm at a loss.
What am I doing wrong? The path is correct and it has 20 something background files in it.
The script here is everything that is contained within ~/.bachgrounds.sh
#!/bin/bash
cd /home/jd/Pictures/Backgrounds
while [ 1 ]
do
set -- *
length=$#
random_num=$((( $RANDOM % ($length) +1) ))
gsettings set org.gnome.desktop.background picture-uri "file:/home/jd/Pictures/Backgrounds/${!random_num}"
sleep 300
done
What am I doing wrong? The path is correct and it has 20 something background files in it.
The script here is everything that is contained within ~/.bachgrounds.sh
#!/bin/bash
cd /home/jd/Pictures/Backgrounds
while [ 1 ]
do
set -- *
length=$#
random_num=$((( $RANDOM % ($length) +1) ))
gsettings set org.gnome.desktop.background picture-uri "file:/home/jd/Pictures/Backgrounds/${!random_num}"
sleep 300
done