mirror of
https://github.com/chenasraf/BitDay-Linux.git
synced 2026-05-17 17:58:04 +00:00
Implemented BitDay 2.0
This commit is contained in:
27
install.sh
27
install.sh
@@ -4,24 +4,25 @@ pwd=`pwd` # Save current directory
|
||||
|
||||
sep="--------------------------------------------------------------------------"
|
||||
echo $sep
|
||||
echo "*** 8bit Day Wallpaper Rotator for Linux ***"
|
||||
echo "*** Rotator Script: http://www.reddit.com/u/javajames64 ***"
|
||||
echo "*** Auto Installer: http://www.reddit.com/u/OhMrBigshot ***"
|
||||
echo "*** 8bit Day Wallpaper Rotator for Linux ***"
|
||||
echo "*** Rotator Script: http://www.reddit.com/u/javajames64 ***"
|
||||
echo "*** Auto Installer: http://www.reddit.com/u/OhMrBigshot ***"
|
||||
echo $sep
|
||||
echo
|
||||
|
||||
echo "* Select a resolution (files will be downloaded): [1/5]"
|
||||
echo " 1) 1280x720"
|
||||
echo " 2) 1280x800"
|
||||
echo " 3) 1366x768"
|
||||
echo " 4) 1440x900"
|
||||
echo " 5) 1600x900"
|
||||
echo " 6) 1680x1050"
|
||||
echo " 7) 1920x1080"
|
||||
echo " 8) 1920x1200"
|
||||
echo " 9) 2560x1440"
|
||||
echo " 10) 2560x1600"
|
||||
echo " 11) 2880x1800"
|
||||
echo " 3) 1440x900"
|
||||
echo " 4) 1600x900"
|
||||
echo " 5) 1680x1050"
|
||||
echo " 6) 1920x1080"
|
||||
echo " 7) 1920x1200"
|
||||
echo " 8) 2560x1440"
|
||||
echo " 9) 2560x1600"
|
||||
echo " 10) 2880x1800"
|
||||
echo " 11) 3840x2160"
|
||||
echo " 12) 4096x2304"
|
||||
echo
|
||||
|
||||
# Only accept proper input
|
||||
@@ -39,6 +40,8 @@ while read -p " Type a number (1-11): " input; do
|
||||
9) file="2560x1440"; break;;
|
||||
10) file="2560x1600"; break;;
|
||||
11) file="2880x1800"; break;;
|
||||
12) file="3840x2160"; break;;
|
||||
13) file="4096x2304"; break;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
tars/BitDay-3840x2160.tar.gz
Normal file
BIN
tars/BitDay-3840x2160.tar.gz
Normal file
Binary file not shown.
BIN
tars/BitDay-4096x2304.tar.gz
Normal file
BIN
tars/BitDay-4096x2304.tar.gz
Normal file
Binary file not shown.
35
update.sh
35
update.sh
@@ -9,27 +9,22 @@ sessionfile=`find "${HOME}/.dbus/session-bus/" -type f`
|
||||
export `grep "DBUS_SESSION_BUS_ADDRESS" "${sessionfile}" | sed '/^#/d'`
|
||||
|
||||
files=(
|
||||
01-Morning.png
|
||||
02-Late-Morning.png
|
||||
03-Afternoon.png
|
||||
04-Late-Afternoon.png
|
||||
05-Evening.png
|
||||
06-Late-Evening.png
|
||||
07-Night.png
|
||||
08-Late-Night.png
|
||||
11-Mid-Night.png
|
||||
12-Late-Night.png
|
||||
01-Early-Morning.png
|
||||
02-Mid-Morning.png
|
||||
03-Late-Morning.png
|
||||
04-Early-Afternoon.png
|
||||
05-Mid-Afternoon.png
|
||||
06-Late-Afternoon.png
|
||||
07-Early-Evening.png
|
||||
08-Mid-Evening.png
|
||||
09-Late-Evening.png
|
||||
10-Early-Night.png
|
||||
)
|
||||
|
||||
#Timings for the backgrounds in order. Your life may vary.
|
||||
timing=(
|
||||
7
|
||||
10
|
||||
12
|
||||
17
|
||||
18
|
||||
19
|
||||
21
|
||||
23
|
||||
)
|
||||
timing=(0 2 4 6 8 10 13 16 18 20 21)
|
||||
|
||||
hour=`date +%H`
|
||||
hour=$(echo $hour | sed 's/^0*//')
|
||||
@@ -38,7 +33,7 @@ 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";;
|
||||
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
|
||||
@@ -47,7 +42,7 @@ if [[ -z $XDG_CURRENT_DESKTOP ]]; then # Fallback for i3
|
||||
esac
|
||||
fi
|
||||
|
||||
for i in {7..0..-1}; do # Loop backwards through the wallpapers
|
||||
for i in {12..0..-1}; do # Loop backwards through the wallpapers
|
||||
if [[ $hour -ge ${timing[i]} ]]; then
|
||||
$setcmd file://$DIR/${files[i]}
|
||||
echo "Wallpaper set to ${files[i]}"
|
||||
|
||||
Reference in New Issue
Block a user