-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchill.sh
More file actions
executable file
·50 lines (39 loc) · 774 Bytes
/
chill.sh
File metadata and controls
executable file
·50 lines (39 loc) · 774 Bytes
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
#!/bin/bash
CHILLTIME=1 # Minutes between bong hits
BONGTIME=1 # Minutes during bong hits
READYTIME=60
chillCount(){
clear
secs=$(( ${CHILLTIME} * 60))
echo "(-_-)"
echo "Seconds until next bong hit"
while [ $secs -gt 0 ]; do
echo -ne "$secs\033[0K\r"
sleep 1
: $((secs--))
done
}
bongCount(){
clear
secs=$(( ${BONGTIME} * 60))
echo "(-_-)"
echo "Seconds until next chill period"
while [ $secs -gt 0 ]; do
echo -ne "$secs\033[0K\r"
sleep 1
: $((secs--))
done
}
main(){
clear
while true;do
notify-send "Chill out and relax. (^_^)"
chillCount
beep 1000000
echo "next bong hit in ${READYTIME} seconds"
sleep ${READYTIME}
notify-send "Light the bong now!"
bongCount
done
}
main