-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuck.sh
executable file
·124 lines (103 loc) · 2.19 KB
/
fuck.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
# Command: Fuck
# Author: Sandro Rüfenacht
# Date: 16.11.2020
source bin/fuck-files/config.sh
function oneLineFuck {
if [ $oneLineFuckBackgroundColor != false ]; then
printf %b $oneLineFuckBackgroundColor '\e[8]' '\e[H\e[J'
fi
color=$COLOR_WHITE
if [ $oneLineFuckForegroundColor != false ]; then
color=$oneLineFuckForegroundColor
fi
echo -e $color
clear
echo "FUCK!"
goToEnd
sleep 0.5s
clear
echo "FUCK FUCK!"
goToEnd
sleep 0.5s
clear
echo "FUCK FUCK FUCK!"
goToEnd
sleep 1s
}
function moveFuck {
spacing=""
if [ $moveFuckBackgroundColor != false ]; then
printf %b $moveFuckBackgroundColor '\e[8]' '\e[H\e[J'
fi
color=$COLOR_WHITE
if [ $moveFuckForegroundColor != false ]; then
color=$moveFuckForegroundColor
fi
echo -e $color
for((i=1; i<=num_lines-2; i++)) do
clear
for (( c=1; c<=i; c++ ))
do
echo
done
spacing="$spacing "
echo "$spacing Fuck"
goToEnd
sleep 0.1s
done
}
function egocentricFuck {
halfWordLength=3
y_center=`expr $y_center - $halfWordLength`
if [ $egocentricFuckBackgroundColor != false ]; then
printf %b $egocentricFuckBackgroundColor '\e[8]' '\e[H\e[J'
fi
color=$COLOR_WHITE
if [ $egocentricFuckForegroundColor != false ]; then
color=$egocentricFuckForegroundColor
fi
echo -e $color
clear
tput cup $x_center $y_center
echo "F "
goToEnd
sleep 0.5s
clear
tput cup $x_center $y_center
echo "FU "
goToEnd
sleep 0.5s
clear
tput cup $x_center $y_center
echo "FUC "
goToEnd
sleep 0.5s
clear
tput cup $x_center $y_center
echo "FUCK "
goToEnd
sleep 0.5s
clear
tput cup $x_center $y_center
echo "FUCK!"
goToEnd
sleep 1s
}
function goToEnd {
tput cup $num_lines 0
}
# Egocentric fuck
num_lines=`tput lines`
num_cols=`tput cols`
x_center=`expr $num_lines / 2`
y_center=`expr $num_cols / 2`
if [ $oneLine == true ]; then
oneLineFuck
fi
if [ $movingFuck == true ]; then
moveFuck
fi
if [ $egocentricFuck == true ]; then
egocentricFuck
fi