-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparrotnotify.sh
executable file
·55 lines (50 loc) · 3.57 KB
/
parrotnotify.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
#!/bin/sh
#####################################################
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏░▒▒▒▒▒▒▒▒░▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏░░░░░░▒▒░▒▒▒▒▒▒░░░░░▏▏▏▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏░▒▓█▒░░░░░░▒▒▒▒░░░░░░▓░▏▏▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏▏▏░▓▒░░░░▒░▒▒██▓▓▓▓▓░░░░░░░░▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏░▒▓░░░▒██▒░░░▒▒░░░░░░░░░░▒▒▒▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏▏▏░█▒░░▒███▒░░░▒░░░░▓▓▓░░░░▒█░▏▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏░░░░░░▓▓███▓▒▓▓█▒░░░▓▓▓░░░░░░▒░▏▏▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏▏▏░▒░░▒███████████▒░░░▓▓▓░░░░░░▒▓▒░▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏▏░▒░░░▒▓███████████▓░░░▒▓▓░░░▓░░░▓▒▒▏▏▏▏▏▏#
# ▏▏▏▏▏▏▏▏░░░░░▒▒▒████████████░░░░░░░░░█▒░░▒▒▒▏▏▏▏▏▏#
# ▏▏▏▏▏▏░▓▒░░░▓▒░░▓███████████▒▓░░░░░░▓█░░░▓▒▒▏▏▏▏▏▏#
# ▏▏▏▏▏░░░░░▒▒█▒▒░░▒▒▒▒▒████████▒░░░▒██▒░░▒▓▒░▏▏▏▏▏▏#
# ▏▏░░░░░░░▒█████▒░░░░░░▒▒▒▒███████████▒░░▒▒▏▏▏▏▏▏▏▏#
# ░▓▒░░░░░░▓▓▓▓▓▓░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓░░░▒▒▏▏▏▏▏▏▏▏#
# ▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▏▏▏▏▏▏▏▏#
#####################################################
clear=$(printf "\033[2J");
clear2=$(printf "\033[3J");
home=$(printf "\033[H");
notifId="";
while [ true ]; do
read in;
if [[ $in == *"$clear"* ]]; then
img=${img/$'\033[2J'/""};
img=${img/$'\033[3J'/""};
img=${img/$'\033[H'/""};
img=$(echo "$img" | sed -e "s/.\\[..m//g")
# Notifications usually don't use monospaced fonts, this is a way of forcing them
img=$(echo "$img" | sed \
-e "s/ /▏/g" \
-e "s/[.:;',]/░/g" \
-e "s/[coN]/▒/g" \
-e "s/[ld0]/▓/g" \
-e "s/[a-zA-Z]/█/g"
)
echo "$img";
if [[ "$notifId" == "" ]]; then
notifId=$(notify-send "$img" -p)
else
notify-send "$img" -r "$notifId"
fi
img="";
fi
img="${img}"$'\n'"${in/$'\033[39m'/$''}";
done < <(curl --silent --no-buffer parrot.live)