add delay to create artistic effect

This commit is contained in:
urban
2023-09-01 01:31:04 +02:00
parent ae67845b2c
commit 98408c18bf
3 changed files with 45 additions and 7 deletions

View File

@@ -5,9 +5,9 @@ source ./utils.sh
new_configuration(){
msg logo.txt
p "We will create a new configuration"
p "We will create a new configuration."
user_pause
msg wallet_suggestions.txt
echo ""
r "Your bitcoin address:" address
#python3 ../Tools/address_validation.py $address
echo ""
@@ -25,7 +25,7 @@ new_configuration(){
echo "address: $address" > ../Worker/worker.conf
echo "pool: $mining_pool" >> ../Worker/worker.conf
p "Ready to boil the oceans captain!"
p_ok "To start mining, use the command 'shuriken start'"
p "To start mining, use the command 'shuriken start'"
echo ""
}

View File

@@ -8,32 +8,46 @@ r(){
p() {
echo -e " » $1"
sleep 0.1
}
p_user() {
echo -e " $1"
echo -e " \e[35m $1\033[0m"
sleep 0.1
}
p_err(){
echo -e " \033[31m»\033[0m $1"
sleep 0.1
}
p_fatal(){
echo -e " \033[31m» $1\033[0m"
sleep 0.1
}
p_ok(){
echo -e " \033[32m»\033[0m $1"
sleep 0.1
}
p_warn(){
echo -e " \033[33m!\033[0m $1"
sleep 0.1
}
msg() {
echo ""
echo -e "$(cat ../Messages/$1)"
sleep 0.1
while IFS= read -r line
do
echo -e "$line"
sleep 0.1
done < "../Messages/$1"
echo "$line"
sleep 0.1
echo ""
sleep 0.1
}
ask_yes_or_no(){
@@ -47,6 +61,11 @@ ask_yes_or_no(){
return 1
}
user_pause(){
result=$(gum choose --cursor=    Continue)
p_user "Continue"
}
spin_it(){
local msg=$1
shift

View File

@@ -41,32 +41,46 @@ r(){
p() {
echo -e " » $1"
sleep 0.1
}
p_user() {
echo -e " $1"
echo -e " \e[35m $1\033[0m"
sleep 0.1
}
p_err(){
echo -e " \033[31m»\033[0m $1"
sleep 0.1
}
p_fatal(){
echo -e " \033[31m» $1\033[0m"
sleep 0.1
}
p_ok(){
echo -e " \033[32m»\033[0m $1"
sleep 0.1
}
p_warn(){
echo -e " \033[33m!\033[0m $1"
sleep 0.1
}
msg() {
echo ""
echo -e "$(cat ../Messages/$1)"
sleep 0.1
while IFS= read -r line
do
echo -e "$line"
sleep 0.1
done < "../Messages/$1"
echo "$line"
sleep 0.1
echo ""
sleep 0.1
}
ask_yes_or_no(){
@@ -80,6 +94,11 @@ ask_yes_or_no(){
return 1
}
user_pause(){
result=$(gum choose --cursor=    Continue)
p_user "Continue"
}
spin_it(){
local msg=$1
shift