From 0160f35be676a130adfe41d3711fe971e8501943 Mon Sep 17 00:00:00 2001 From: William Todt Date: Fri, 19 Feb 2016 16:13:24 +0100 Subject: [PATCH] Update flux.sh --- flux.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/flux.sh b/flux.sh index 2d8d3ae..abaf438 100644 --- a/flux.sh +++ b/flux.sh @@ -64,6 +64,24 @@ function checkupdatess { fi } +#Animationen +function spinner { + + local pid=$1 + local delay=0.15 + local spinstr='|/-\' + while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do + local temp=${spinstr#?} + printf " [%c] " "$spinstr" + local spinstr=$temp${spinstr%"$temp"} + sleep $delay + printf "\b\b\b\b\b\b" + done + printf " \b\b\b\b" +} + + + function exitmode { echo -e "\n\n"$Weis["$Rot" "$Weiß"] "$rot"ERROR 01"$Transparent"