-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.sh
73 lines (69 loc) · 1.88 KB
/
script.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
#!/bin/sh
DELAY=5
while true;
do
tput cup 0 0
viu -w 70 /home/kascha/acme.png
sleep $DELAY
STARTPOS=1;
tput dim
tput cup 0 0
while [ $STARTPOS -le 60 ];
do
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '';
STARTPOS=$(( $STARTPOS + 1 ));
sleep 0.01;
done
clear;
curl "wttr.in/Bielefeld?1npQ&lang=de";
sleep $DELAY;
STARTPOS=1;
tput dim
tput cup 0 0
while [ $STARTPOS -le 60 ];
do
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '';
STARTPOS=$(( $STARTPOS + 1 ));
sleep 0.01;
done
clear;
tput cup 0 0
curl "wttr.in/moon@2022-08-09&land=de";
sleep $DELAY;
STARTPOS=1;
tput cup 0 0
while [ $STARTPOS -le 60 ];
do
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '';
STARTPOS=$(( $STARTPOS + 1 ));
sleep 0.01;
done
tput cup 0 0
clear
curl -s 'wttr.in/{Paderborn,Detmold,Hannover,Muenster,}?format=3&lang=de';
sleep $DELAY;
STARTPOS=1;
tput dim
tput cup 0 0
while [ $STARTPOS -le 60 ];
do
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '';
STARTPOS=$(( $STARTPOS + 1 ));
sleep 0.01;
done
tput sgr0
tput cup 0 0
clear;
curl -s "https://dbf.finalrewind.org/Bielefeld%20Hbf?mode=json&version=3" | jq -r '.departures[] | {scheduledDeparture,train,trainNumber,destination,platform} | select (.scheduledDeparture!=null)' | jq -r '"\(.scheduledDeparture), \(.train), \(.trainNumber), \(.destination), \(.platform)"' | awk 'ORS="\n"' | column -t -s ',' | head -n 18
sleep $DELAY;
STARTPOS=1;
tput cup 0 0
while [ $STARTPOS -le 60 ];
do
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '';
STARTPOS=$(( $STARTPOS + 1 ));
sleep 0.01;
done
tput cup 0 0
clear;
done