-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautowall-unspalsh
executable file
·62 lines (55 loc) · 1.25 KB
/
autowall-unspalsh
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
#!/bin/bash
DIRECTORY="$HOME/.autowall"
# check argument count
if [ "$#" -eq 2 ]; then
monitors=$1
keyword=$2
elif [ "$#" -eq 1 ]; then
keyword=$1
monitors=1
fi
if [ "$#" -lt 1 ]; then
echo "autowall [#monitors|list] keyword"
exit 0
fi
declare -A uscats
uscats=(
["All"]='1065976'
["1080p"]='1339107'
["4K"]='1339090'
["Ultra_Wide"]='1339089'
["Background"]='1339276'
["Lock_Screen"]='1339070'
["Nature"]='1065376'
["Tumblr"]='1111644'
["Black"]='1101680'
["Flower"]='1100232'
["Funny"]='1111682'
["Cute"]='1111680'
["Cool"]='1111678'
["Fall"]='1100229'
["Love"]='1066280'
["Design"]='1066276'
["Christmas"]='1066273'
["Travel"]='1065428'
["Beach"]='1065423'
["Car"]='1065408'
["Sports"]='1065402'
["Animal"]='1065390'
["People"]='1065386'
["Music"]='1065384'
["Summer"]='1065380'
)
if [ "$1" == "list" ]; then
echo "List of available keywords"
for key in ${!uscats[@]}; do
echo " ${key}"
done
exit 0
fi
if [ ! -d "$DIRECTORY" ]; then
mkdir $DIRECTORY
fi
uspotd="https://source.unsplash.com/collection/${uscats[${keyword}]}/1920x1080/daily"
wget -qO $DIRECTORY/paper $uspotd
feh --no-fehbg --bg-scale $DIRECTORY/paper