mirror of
https://github.com/Threnklyn/BitDay-Linux.git
synced 2026-05-18 20:13:27 +02:00
changed install and update after the fork so it works with my system
This commit is contained in:
@@ -9,22 +9,23 @@ Requirements are usually built into most Linux distributions:
|
||||
|
||||
* **wget** to download the zip
|
||||
* **tar** to extract the downloaded zip
|
||||
|
||||
* **cronie** to execute the script every hour
|
||||
* **feh** to set the background
|
||||
|
||||
## How to use?
|
||||
|
||||
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:
|
||||
|
||||
chmod +x install.sh
|
||||
|
||||
|
||||
And run it:
|
||||
|
||||
./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!
|
||||
|
||||
## How can I help?
|
||||
|
||||
+3
-3
@@ -50,7 +50,7 @@ if [[ -z $file ]]; then
|
||||
fi
|
||||
|
||||
# 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 "* Downloading scripts & wallpapers, please wait... [2/5]"
|
||||
@@ -64,8 +64,8 @@ else
|
||||
fi
|
||||
|
||||
# Download update & uninstall scripts
|
||||
wget "https://github.com/chenasraf/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/update.sh"
|
||||
wget "https://github.com/kuchenm0nster/BitDay-Linux/raw/master/uninstall.sh"
|
||||
|
||||
|
||||
echo $sep
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Original script by http://www.reddit.com/u/javajames64
|
||||
# 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'`
|
||||
DIR=`pwd`
|
||||
|
||||
files=(
|
||||
11-Mid-Night.png
|
||||
@@ -24,32 +18,15 @@ files=(
|
||||
)
|
||||
|
||||
#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=$(echo $hour | sed 's/^0*//')
|
||||
hour=$(echo $hour | sed 's/0//')
|
||||
|
||||
|
||||
# Different desktop environment implementations
|
||||
case $XDG_CURRENT_DESKTOP in
|
||||
Mint|Mate) setcmd="gsettings set org.mate.background picture-uri";;
|
||||
Cinnamon) setcmd="gsettings set org.cinnamon.background picture-uri";;
|
||||
*) setcmd="gsettings set org.gnome.desktop.background picture-uri";; # GNOME/Unity, default
|
||||
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
|
||||
for i in "${timing[@]}"; do # Loop backwards through the wallpapers
|
||||
if (( $hour <= $(($i*2)) )); then
|
||||
feh --bg-fill $DIR/*/${files[i]}
|
||||
echo "Wallpaper set to ${files[i]}"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
# Fallback at last wallpaper if time is not relevant
|
||||
$setcmd file://$DIR/${files[7]}
|
||||
echo "Wallpaper set to ${files[7]}"
|
||||
|
||||
Reference in New Issue
Block a user