changed install and update after the fork so it works with my system

This commit is contained in:
Thorben Rudeloff
2017-01-12 19:28:21 +01:00
parent b86b6dacdf
commit 1b375ae3d2
3 changed files with 18 additions and 40 deletions
+6 -5
View File
@@ -9,22 +9,23 @@ Requirements are usually built into most Linux distributions:
* **wget** to download the zip * **wget** to download the zip
* **tar** to extract the downloaded zip * **tar** to extract the downloaded zip
* **cronie** to execute the script every hour
* **feh** to set the background
## How to use? ## How to use?
Just make a new directory where you want the wallpapers to be placed and installs, and run the following command: Just make a new directory where you want the wallpapers to be placed and installs, and run the following command:
wget https://github.com/chenasraf/BitDay-Linux/raw/master/install.sh wget https://github.com/Kuchenm0nster/BitDay-Linux/raw/master/install.sh
Then just make sure you have execute permissions on the install.sh file: Then just make sure you have execute permissions on the install.sh file:
chmod +x install.sh chmod +x install.sh
And run it: And run it:
./install.sh ./install.sh
That's it! You'll be prompted for everything you need, and the script will download any remaining files that are missing. Enjoy! That's it! You'll be prompted for everything you need, and the script will download any remaining files that are missing. Enjoy!
## How can I help? ## How can I help?
+3 -3
View File
@@ -50,7 +50,7 @@ if [[ -z $file ]]; then
fi fi
# Actual download link for tar # Actual download link for tar
download="https://github.com/chenasraf/BitDay-Linux/raw/master/tars/BitDay-$file.tar.gz" download="https://github.com/kuchenm0nster/BitDay-Linux/raw/master/tars/BitDay-$file.tar.gz"
echo $sep echo $sep
echo "* Downloading scripts & wallpapers, please wait... [2/5]" echo "* Downloading scripts & wallpapers, please wait... [2/5]"
@@ -64,8 +64,8 @@ else
fi fi
# Download update & uninstall scripts # Download update & uninstall scripts
wget "https://github.com/chenasraf/BitDay-Linux/raw/master/update.sh" wget "https://github.com/kuchenm0nster/BitDay-Linux/raw/master/update.sh"
wget "https://github.com/chenasraf/BitDay-Linux/raw/master/uninstall.sh" wget "https://github.com/kuchenm0nster/BitDay-Linux/raw/master/uninstall.sh"
echo $sep echo $sep
+9 -32
View File
@@ -1,12 +1,6 @@
#!/bin/bash #!/bin/bash
# Original script by http://www.reddit.com/u/javajames64 DIR=`pwd`
# Updates by http://www.reddit.com/u/OhMrBigshot
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
sessionfile=`find "${HOME}/.dbus/session-bus/" -type f`
export `grep "DBUS_SESSION_BUS_ADDRESS" "${sessionfile}" | sed '/^#/d'`
files=( files=(
11-Mid-Night.png 11-Mid-Night.png
@@ -24,32 +18,15 @@ files=(
) )
#Timings for the backgrounds in order. Your life may vary. #Timings for the backgrounds in order. Your life may vary.
timing=(0 2 4 6 8 10 13 16 18 20 21) timing=(11 10 9 8 7 6 5 4 3 2 1 0)
hour=`date +%H` hour=`date +%H`
hour=$(echo $hour | sed 's/^0*//') hour=$(echo $hour | sed 's/0//')
for i in "${timing[@]}"; do # Loop backwards through the wallpapers
# Different desktop environment implementations if (( $hour <= $(($i*2)) )); then
case $XDG_CURRENT_DESKTOP in feh --bg-fill $DIR/*/${files[i]}
Mint|Mate) setcmd="gsettings set org.mate.background picture-uri";; echo "Wallpaper set to ${files[i]}"
Cinnamon) setcmd="gsettings set org.cinnamon.background picture-uri";; exit
*) setcmd="gsettings set org.gnome.desktop.background picture-uri";; # GNOME/Unity, default fi
esac
if [[ -z $XDG_CURRENT_DESKTOP ]]; then # Fallback for i3
case $DESKTOP_SESSION in
i3) setcmd="feh --bg-fill"
esac
fi
for i in $timing; do # Loop backwards through the wallpapers
if (( $hour >= $i )); then
$setcmd file://$DIR/${files[i]}
echo "Wallpaper set to ${files[i]}"
exit
fi
done done
# Fallback at last wallpaper if time is not relevant
$setcmd file://$DIR/${files[7]}
echo "Wallpaper set to ${files[7]}"