-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallpaper.sh
executable file
·96 lines (92 loc) · 2.5 KB
/
wallpaper.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
path='"/Users/'$1'/Downloads/dynamic_wallpapers/wallpapers/'
while [[ True ]]; do
hr=$(date +"%H")
if [ $hr -ge $((0)) ] && [ $hr -le $((1)) ]
then
#echo $hr
f='01.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((2)) ] && [ $hr -le $((3)) ]
then
#echo $hr
f='23.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((4)) ] && [ $hr -le $((5)) ]
then
#echo $hr
f='45.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((6)) ] && [ $hr -le $((7)) ]
then
#echo $hr
f='67.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((8)) ] && [ $hr -le $((9)) ]
then
#echo $hr
f='89.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((10)) ] && [ $hr -le $((11)) ]
then
#echo $hr
f='1011.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((12)) ] && [ $hr -le $((13)) ]
then
#echo $hr
f='1213.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((14)) ] && [ $hr -le $((15)) ]
then
#echo $hr
f='1415.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((16)) ] && [ $hr -le $((17)) ]
then
#echo $hr
f='1617.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((18)) ] && [ $hr -le $((19)) ]
then
#echo $hr
f='1819.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((20)) ] && [ $hr -le $((21)) ]
then
#echo $hr
f='2021.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
elif [ $hr -ge $((22)) ] && [ $hr -le $((23)) ]
then
#echo $hr
f='2223.jpeg"'
file=$path$f
osascript -e 'tell application "Finder" to set desktop picture to POSIX file '$file''
#sleep 7200
else
echo Error in the script
fi
done