-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfastcat.sh
173 lines (156 loc) · 6.34 KB
/
fastcat.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
########################################
# Made By M3TOZZ #
# https://m3tozz.github.io #
########################################
# FastCat Version
version='FastCat- 1.2'
#Colors
red='\e[1;31m'
yellow='\e[1;33m'
blue='\e[1;34m'
tp='\e[0m'
green='\e[0;32m'
bgreen='\033[1;32m'
# Define Constants.
export APP="FastCat" # Project Name
export CWD="${PWD}" # Current Work Directory
export BASENAME="${0##*/}" # Base Name of This Script
# Functions.
help() {
echo -e "Wrong usage, there is 3 arguments for ${BASENAME}\n
\t${BASENAME} --shell: run the ${APP} .
\t${BASENAME} --backup: back up your own fastfetch configuration.
\t${BASENAME} --version: show the version.
\t${BASENAME} --about: about ${APP} project.
\t${BASENAME} --help: show this page.
"
}
fastcat:version() {
echo "$version"
}
fastcat:about() {
echo -e '
_____ _ ____ _
| ___|_ _ ___| |_ / ___|__ _| |_
| |_ / _` / __| __| | / _` | __|FastFetch Theme Pack!
| _| (_| \__ \ |_| |__| (_| | |_
|_| \__,_|___/\__|\____\__,_|\__|
'
echo -e "$blue##########################################################$tp"
echo -e " Create by ":" $red M3TOZZ$tp"
echo -e " Contributors ":" $red LierB & m3tozz$tp"
echo -e " Github ":" $red github.com/m3tozz/FastCat$tp"
echo -e " Community Server ":" $red discord.com/invite/sQwYCZer95$tp"
echo -e " Version ":" $red ${version} $tp"
echo -e "$blue##########################################################$tp"
exit 1
}
fastcat:backup() {
bash ./backup.sh
}
help() {
echo -e "
--shell: run the ${APP} .
--backup: back up your own fastfetch configuration.
--version: show the version.
--about: about ${APP} project.
--help: show this page."
}
shell(){
if ! command -v fastfetch
then
clear
echo -e "\033[1;31m
FastFetch Not Found!\033[0m"
exit 1
fi
mkdir /home/$USER/.config/fastfetch
clear
banner(){
echo -e '\033[1;36m
⠀⠀⠀⢠⣾⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⣰⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢰⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⣀⣀⣤⣤⣶⣾⣿⣿⣿⡷
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀ \033[0;31m ______ _ _____ _ \033[1;36m
⣿⣿⣿⡇⠀⡾⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀ \033[0;31m | ____| | | / ____| | | \033[1;36m
⣿⣿⣿⣧⡀⠁⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ \033[0;31m | |__ __ _ ___| |_| | __ _| |_ \033[1;36m
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⢹⠉⠙⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀ \033[0;31m | __/ _` / __| __| | / _` | __|\033[1;36m
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣀⠀⣀⣼⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀ \033[0;31m | | | (_| \__ \ |_| |___| (_| | |_ \033[1;36m
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀ \033[0;31m |_| \__,_|___/\__|\_____\__,_|\__|\033[1;36m
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀ \033[0;36m FastFetch Theme Pack.\033[1;36m
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠀⠤⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⠿⣿⣿⣿⣿⣿⣿⣿⠿⠋⢃⠈⠢⡁⠒⠄⡀⠈⠁⠀⠀⠀⠀⠀⠀⠀
⣿⣿⠟⠁⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠈⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
'
echo -e '
\e[1;34m[01]\e[0;32mSmall Themes \e[1;35m[02]\e[0;32mLarge Themes\e[1;34m \033[0;33m[C]\e[0;32mCommunity-Themes \e[1;31m[A]\e[0;32mAbout \e[1;31m[B]\e[0;32mBackup \e[1;31m[x]\e[0;32mExit
'
echo -ne "\e[1;31mm3tozz\033[0;36m@\033[1;33mfastcat\n\e \033[0;36m↳\033[0m " ; read islem
}
banner
if [[ $islem == 1 || $islem == 01 ]]; then
clear
cd Small-Themes/
bash start.sh
elif [[ $islem == 2 || $islem == 02 ]]; then
clear
cd Large-Themes/
bash start.sh
elif [[ $islem == x || $islem == X ]]; then
clear
elif [[ $islem == c || $islem == C ]]; then
clear
echo -e '\033[0;33mTo add your own fastfetch configuration to the FastCat community,'
echo -e '\033[0;31mAdd your own configuration at https://github.com/m3tozz/fastcat-community-themes'
echo -e 'and submit a Pull Request..\e[0m'
echo -e "\e[3m\e[1;34mThis folder is currently empty\e[0m"
echo -e '\033[0;33mYou need to manually install the themes in this folder into .config/fastfetch.'
elif [[ $islem == a || $islem == A ]]; then
clear
echo -e '
_____ _ ____ _
| ___|_ _ ___| |_ / ___|__ _| |_
| |_ / _` / __| __| | / _` | __|FastFetch Theme Pack!
| _| (_| \__ \ |_| |__| (_| | |_
|_| \__,_|___/\__|\____\__,_|\__|
'
echo -e "$blue##########################################################$tp"
echo -e " Create by ":" $red M3TOZZ$tp"
echo -e " Contributors ":" $red LierB & m3tozz$tp"
echo -e " Github ":" $red github.com/m3tozz/FastCat$tp"
echo -e " Community Server ":" $red discord.com/invite/sQwYCZer95$tp"
echo -e " Version ":" $red ${version} $tp"
echo -e "$blue##########################################################$tp"
exit 1
elif [[ $islem == b || $islem == B ]]; then
bash ./backup.sh
else
echo -e '\e[1;34m Wrong transaction number!\033[0m'
fi
}
# Argument Parser.
case "${1,,}" in
"--shell"|"-s")
shell
;;
"--backup"|"-b")
fastcat:backup
;;
"--about"|"-a")
fastcat:about
;;
"--version"|"-v")
fastcat:version
;;
*)
help
;;
esac